From 3bf707881ee767e78494c56b6a6ff8a7d03d988a Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 30 May 2022 15:30:07 -0400 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 16 + .github/.OwlBot.yaml | 32 + .github/CODEOWNERS | 10 + .github/ISSUE_TEMPLATE/bug_report.md | 51 + .github/ISSUE_TEMPLATE/feature_request.md | 21 + .github/ISSUE_TEMPLATE/support_request.md | 7 + .github/PULL_REQUEST_TEMPLATE.md | 10 + .github/auto-label.yaml | 15 + .github/blunderbuss.yml | 7 + .github/generated-files-bot.yml | 12 + .github/release-please.yml | 3 + .github/release-trigger.yml | 1 + .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 60 + .github/trusted-contribution.yml | 3 + .github/workflows/approve-readme.yaml | 69 + .github/workflows/auto-release.yaml | 103 + .github/workflows/ci.yaml | 87 + .github/workflows/samples.yaml | 30 + .gitignore | 17 + .kokoro/build.bat | 18 + .kokoro/build.sh | 134 + .kokoro/coerce_logs.sh | 37 + .kokoro/common.cfg | 13 + .kokoro/common.sh | 58 + .kokoro/continuous/common.cfg | 25 + .kokoro/continuous/java8.cfg | 12 + .kokoro/dependencies.sh | 110 + .kokoro/nightly/common.cfg | 25 + .kokoro/nightly/integration.cfg | 37 + .kokoro/nightly/java11-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/graalvm-native-17.cfg | 33 + .kokoro/presubmit/graalvm-native.cfg | 33 + .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 | 63 + .kokoro/release/snapshot.cfg | 6 + .kokoro/release/snapshot.sh | 33 + .kokoro/release/stage.cfg | 19 + .kokoro/release/stage.sh | 45 + .kokoro/trampoline.sh | 26 + .repo-metadata.json | 16 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 92 + LICENSE | 201 + README.md | 201 + SECURITY.md | 7 + google-cloud-gke-multi-cloud-bom/pom.xml | 94 + google-cloud-gke-multi-cloud/pom.xml | 111 + .../gkemulticloud/v1/AwsClustersClient.java | 2073 ++++++ .../gkemulticloud/v1/AwsClustersSettings.java | 388 ++ .../gkemulticloud/v1/AzureClustersClient.java | 2829 ++++++++ .../v1/AzureClustersSettings.java | 465 ++ .../gkemulticloud/v1/gapic_metadata.json | 111 + .../cloud/gkemulticloud/v1/package-info.java | 57 + .../v1/stub/AwsClustersStub.java | 157 + .../v1/stub/AwsClustersStubSettings.java | 992 +++ .../v1/stub/AzureClustersStub.java | 203 + .../v1/stub/AzureClustersStubSettings.java | 1279 ++++ .../stub/GrpcAwsClustersCallableFactory.java | 113 + .../v1/stub/GrpcAwsClustersStub.java | 635 ++ .../GrpcAzureClustersCallableFactory.java | 113 + .../v1/stub/GrpcAzureClustersStub.java | 823 +++ .../v1/AwsClustersClientTest.java | 1172 ++++ .../v1/AzureClustersClientTest.java | 1579 +++++ .../gkemulticloud/v1/MockAwsClusters.java | 59 + .../gkemulticloud/v1/MockAwsClustersImpl.java | 314 + .../gkemulticloud/v1/MockAzureClusters.java | 59 + .../v1/MockAzureClustersImpl.java | 400 ++ grpc-google-cloud-gke-multi-cloud-v1/pom.xml | 69 + .../gkemulticloud/v1/AwsClustersGrpc.java | 1736 +++++ .../gkemulticloud/v1/AzureClustersGrpc.java | 2273 +++++++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 188 + .../clirr-ignored-differences.xml | 19 + proto-google-cloud-gke-multi-cloud-v1/pom.xml | 46 + .../gkemulticloud/v1/AwsAuthorization.java | 1099 +++ .../v1/AwsAuthorizationOrBuilder.java | 107 + .../cloud/gkemulticloud/v1/AwsCluster.java | 5134 +++++++++++++++ .../gkemulticloud/v1/AwsClusterName.java | 223 + .../v1/AwsClusterNetworking.java | 1308 ++++ .../v1/AwsClusterNetworkingOrBuilder.java | 184 + .../gkemulticloud/v1/AwsClusterOrBuilder.java | 688 ++ .../gkemulticloud/v1/AwsClusterUser.java | 637 ++ .../v1/AwsClusterUserOrBuilder.java | 50 + .../gkemulticloud/v1/AwsConfigEncryption.java | 639 ++ .../v1/AwsConfigEncryptionOrBuilder.java | 50 + .../gkemulticloud/v1/AwsControlPlane.java | 4613 +++++++++++++ .../v1/AwsControlPlaneOrBuilder.java | 675 ++ .../v1/AwsDatabaseEncryption.java | 639 ++ .../v1/AwsDatabaseEncryptionOrBuilder.java | 50 + .../v1/AwsInstancePlacement.java | 820 +++ .../v1/AwsInstancePlacementOrBuilder.java | 54 + .../gkemulticloud/v1/AwsK8sVersionInfo.java | 638 ++ .../v1/AwsK8sVersionInfoOrBuilder.java | 50 + .../cloud/gkemulticloud/v1/AwsNodeConfig.java | 4114 ++++++++++++ .../v1/AwsNodeConfigOrBuilder.java | 589 ++ .../cloud/gkemulticloud/v1/AwsNodePool.java | 3871 +++++++++++ .../v1/AwsNodePoolAutoscaling.java | 649 ++ .../v1/AwsNodePoolAutoscalingOrBuilder.java | 53 + .../gkemulticloud/v1/AwsNodePoolName.java | 269 + .../v1/AwsNodePoolOrBuilder.java | 514 ++ .../gkemulticloud/v1/AwsProxyConfig.java | 830 +++ .../v1/AwsProxyConfigOrBuilder.java | 79 + .../gkemulticloud/v1/AwsResourcesProto.java | 531 ++ .../gkemulticloud/v1/AwsServerConfig.java | 1423 ++++ .../gkemulticloud/v1/AwsServerConfigName.java | 193 + .../v1/AwsServerConfigOrBuilder.java | 153 + .../gkemulticloud/v1/AwsServiceProto.java | 393 ++ .../v1/AwsServicesAuthentication.java | 832 +++ .../AwsServicesAuthenticationOrBuilder.java | 79 + .../cloud/gkemulticloud/v1/AwsSshConfig.java | 636 ++ .../v1/AwsSshConfigOrBuilder.java | 50 + .../gkemulticloud/v1/AwsVolumeTemplate.java | 1189 ++++ .../v1/AwsVolumeTemplateOrBuilder.java | 115 + .../gkemulticloud/v1/AzureAuthorization.java | 1101 ++++ .../v1/AzureAuthorizationOrBuilder.java | 107 + .../cloud/gkemulticloud/v1/AzureClient.java | 2107 ++++++ .../gkemulticloud/v1/AzureClientName.java | 227 + .../v1/AzureClientOrBuilder.java | 295 + .../cloud/gkemulticloud/v1/AzureCluster.java | 5865 +++++++++++++++++ .../gkemulticloud/v1/AzureClusterName.java | 227 + .../v1/AzureClusterNetworking.java | 1600 +++++ .../v1/AzureClusterNetworkingOrBuilder.java | 243 + .../v1/AzureClusterOrBuilder.java | 797 +++ .../v1/AzureClusterResources.java | 847 +++ .../v1/AzureClusterResourcesOrBuilder.java | 79 + .../gkemulticloud/v1/AzureClusterUser.java | 638 ++ .../v1/AzureClusterUserOrBuilder.java | 50 + .../v1/AzureConfigEncryption.java | 857 +++ .../v1/AzureConfigEncryptionOrBuilder.java | 85 + .../gkemulticloud/v1/AzureControlPlane.java | 4147 ++++++++++++ .../v1/AzureControlPlaneOrBuilder.java | 563 ++ .../v1/AzureDatabaseEncryption.java | 671 ++ .../v1/AzureDatabaseEncryptionOrBuilder.java | 58 + .../gkemulticloud/v1/AzureDiskTemplate.java | 556 ++ .../v1/AzureDiskTemplateOrBuilder.java | 40 + .../gkemulticloud/v1/AzureK8sVersionInfo.java | 639 ++ .../v1/AzureK8sVersionInfoOrBuilder.java | 50 + .../gkemulticloud/v1/AzureNodeConfig.java | 3321 ++++++++++ .../v1/AzureNodeConfigOrBuilder.java | 467 ++ .../cloud/gkemulticloud/v1/AzureNodePool.java | 4046 ++++++++++++ .../v1/AzureNodePoolAutoscaling.java | 651 ++ .../v1/AzureNodePoolAutoscalingOrBuilder.java | 53 + .../gkemulticloud/v1/AzureNodePoolName.java | 269 + .../v1/AzureNodePoolOrBuilder.java | 537 ++ .../gkemulticloud/v1/AzureProxyConfig.java | 845 +++ .../v1/AzureProxyConfigOrBuilder.java | 83 + .../gkemulticloud/v1/AzureResourcesProto.java | 573 ++ .../gkemulticloud/v1/AzureServerConfig.java | 1457 ++++ .../v1/AzureServerConfigName.java | 193 + .../v1/AzureServerConfigOrBuilder.java | 162 + .../gkemulticloud/v1/AzureServiceProto.java | 497 ++ .../gkemulticloud/v1/AzureSshConfig.java | 651 ++ .../v1/AzureSshConfigOrBuilder.java | 54 + .../v1/CommonResourcesProto.java | 174 + .../v1/CreateAwsClusterRequest.java | 1287 ++++ .../v1/CreateAwsClusterRequestOrBuilder.java | 151 + .../v1/CreateAwsNodePoolRequest.java | 1291 ++++ .../v1/CreateAwsNodePoolRequestOrBuilder.java | 152 + .../v1/CreateAzureClientRequest.java | 1287 ++++ .../v1/CreateAzureClientRequestOrBuilder.java | 151 + .../v1/CreateAzureClusterRequest.java | 1287 ++++ .../CreateAzureClusterRequestOrBuilder.java | 151 + .../v1/CreateAzureNodePoolRequest.java | 1287 ++++ .../CreateAzureNodePoolRequestOrBuilder.java | 150 + .../v1/DeleteAwsClusterRequest.java | 1073 +++ .../v1/DeleteAwsClusterRequestOrBuilder.java | 122 + .../v1/DeleteAwsNodePoolRequest.java | 1077 +++ .../v1/DeleteAwsNodePoolRequestOrBuilder.java | 123 + .../v1/DeleteAzureClientRequest.java | 873 +++ .../v1/DeleteAzureClientRequestOrBuilder.java | 91 + .../v1/DeleteAzureClusterRequest.java | 1073 +++ .../DeleteAzureClusterRequestOrBuilder.java | 122 + .../v1/DeleteAzureNodePoolRequest.java | 1080 +++ .../DeleteAzureNodePoolRequestOrBuilder.java | 123 + .../google/cloud/gkemulticloud/v1/Fleet.java | 854 +++ .../gkemulticloud/v1/FleetOrBuilder.java | 83 + .../v1/GenerateAwsAccessTokenRequest.java | 688 ++ ...enerateAwsAccessTokenRequestOrBuilder.java | 62 + .../v1/GenerateAwsAccessTokenResponse.java | 947 +++ ...nerateAwsAccessTokenResponseOrBuilder.java | 91 + .../v1/GenerateAzureAccessTokenRequest.java | 691 ++ ...erateAzureAccessTokenRequestOrBuilder.java | 62 + .../v1/GenerateAzureAccessTokenResponse.java | 951 +++ ...rateAzureAccessTokenResponseOrBuilder.java | 91 + .../v1/GetAwsClusterRequest.java | 681 ++ .../v1/GetAwsClusterRequestOrBuilder.java | 62 + .../v1/GetAwsNodePoolRequest.java | 681 ++ .../v1/GetAwsNodePoolRequestOrBuilder.java | 62 + .../v1/GetAwsServerConfigRequest.java | 681 ++ .../GetAwsServerConfigRequestOrBuilder.java | 62 + .../v1/GetAzureClientRequest.java | 681 ++ .../v1/GetAzureClientRequestOrBuilder.java | 62 + .../v1/GetAzureClusterRequest.java | 681 ++ .../v1/GetAzureClusterRequestOrBuilder.java | 62 + .../v1/GetAzureNodePoolRequest.java | 681 ++ .../v1/GetAzureNodePoolRequestOrBuilder.java | 62 + .../v1/GetAzureServerConfigRequest.java | 685 ++ .../GetAzureServerConfigRequestOrBuilder.java | 62 + .../v1/ListAwsClustersRequest.java | 977 +++ .../v1/ListAwsClustersRequestOrBuilder.java | 107 + .../v1/ListAwsClustersResponse.java | 1165 ++++ .../v1/ListAwsClustersResponseOrBuilder.java | 109 + .../v1/ListAwsNodePoolsRequest.java | 984 +++ .../v1/ListAwsNodePoolsRequestOrBuilder.java | 109 + .../v1/ListAwsNodePoolsResponse.java | 1143 ++++ .../v1/ListAwsNodePoolsResponseOrBuilder.java | 104 + .../v1/ListAzureClientsRequest.java | 977 +++ .../v1/ListAzureClientsRequestOrBuilder.java | 107 + .../v1/ListAzureClientsResponse.java | 1166 ++++ .../v1/ListAzureClientsResponseOrBuilder.java | 109 + .../v1/ListAzureClustersRequest.java | 977 +++ .../v1/ListAzureClustersRequestOrBuilder.java | 107 + .../v1/ListAzureClustersResponse.java | 1173 ++++ .../ListAzureClustersResponseOrBuilder.java | 109 + .../v1/ListAzureNodePoolsRequest.java | 984 +++ .../ListAzureNodePoolsRequestOrBuilder.java | 109 + .../v1/ListAzureNodePoolsResponse.java | 1154 ++++ .../ListAzureNodePoolsResponseOrBuilder.java | 104 + .../cloud/gkemulticloud/v1/LocationName.java | 192 + .../v1/LoggingComponentConfig.java | 1058 +++ .../v1/LoggingComponentConfigOrBuilder.java | 99 + .../cloud/gkemulticloud/v1/LoggingConfig.java | 741 +++ .../v1/LoggingConfigOrBuilder.java | 60 + .../gkemulticloud/v1/MaxPodsConstraint.java | 548 ++ .../v1/MaxPodsConstraintOrBuilder.java | 38 + .../cloud/gkemulticloud/v1/NodeTaint.java | 1176 ++++ .../gkemulticloud/v1/NodeTaintOrBuilder.java | 104 + .../gkemulticloud/v1/OperationMetadata.java | 1569 +++++ .../v1/OperationMetadataOrBuilder.java | 176 + .../gkemulticloud/v1/ReplicaPlacement.java | 838 +++ .../v1/ReplicaPlacementOrBuilder.java | 81 + .../v1/UpdateAwsClusterRequest.java | 1399 ++++ .../v1/UpdateAwsClusterRequestOrBuilder.java | 183 + .../v1/UpdateAwsNodePoolRequest.java | 1339 ++++ .../v1/UpdateAwsNodePoolRequestOrBuilder.java | 168 + .../v1/UpdateAzureClusterRequest.java | 1255 ++++ .../UpdateAzureClusterRequestOrBuilder.java | 147 + .../v1/UpdateAzureNodePoolRequest.java | 1222 ++++ .../UpdateAzureNodePoolRequestOrBuilder.java | 138 + .../v1/WorkloadIdentityConfig.java | 1004 +++ .../v1/WorkloadIdentityConfigOrBuilder.java | 102 + .../gkemulticloud/v1/aws_resources.proto | 556 ++ .../cloud/gkemulticloud/v1/aws_service.proto | 548 ++ .../gkemulticloud/v1/azure_resources.proto | 632 ++ .../gkemulticloud/v1/azure_service.proto | 701 ++ .../gkemulticloud/v1/common_resources.proto | 145 + renovate.json | 74 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 6 + 284 files changed, 142132 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/auto-label.yaml create mode 100644 .github/blunderbuss.yml create mode 100644 .github/generated-files-bot.yml create mode 100644 .github/release-please.yml create mode 100644 .github/release-trigger.yml create mode 100644 .github/snippet-bot.yml create mode 100644 .github/sync-repo-settings.yaml create mode 100644 .github/trusted-contribution.yml create mode 100644 .github/workflows/approve-readme.yaml create mode 100644 .github/workflows/auto-release.yaml create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/samples.yaml create mode 100644 .gitignore create mode 100644 .kokoro/build.bat create mode 100755 .kokoro/build.sh create mode 100755 .kokoro/coerce_logs.sh create mode 100644 .kokoro/common.cfg create mode 100644 .kokoro/common.sh create mode 100644 .kokoro/continuous/common.cfg create mode 100644 .kokoro/continuous/java8.cfg create mode 100755 .kokoro/dependencies.sh create mode 100644 .kokoro/nightly/common.cfg create mode 100644 .kokoro/nightly/integration.cfg create mode 100644 .kokoro/nightly/java11-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/graalvm-native-17.cfg create mode 100644 .kokoro/presubmit/graalvm-native.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 SECURITY.md create mode 100644 google-cloud-gke-multi-cloud-bom/pom.xml create mode 100644 google-cloud-gke-multi-cloud/pom.xml create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersSettings.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersSettings.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStub.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStubSettings.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStub.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStubSettings.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersCallableFactory.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersStub.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersCallableFactory.java create mode 100644 google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersStub.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AwsClustersClientTest.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AzureClustersClientTest.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClusters.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClustersImpl.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClusters.java create mode 100644 google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClustersImpl.java create mode 100644 grpc-google-cloud-gke-multi-cloud-v1/pom.xml create mode 100644 grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersGrpc.java create mode 100644 grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersGrpc.java create mode 100644 java.header create mode 100644 license-checks.xml create mode 100644 owlbot.py create mode 100644 pom.xml create mode 100644 proto-google-cloud-gke-multi-cloud-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-gke-multi-cloud-v1/pom.xml create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorization.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorizationOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsCluster.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworking.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworkingOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUser.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUserOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryption.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryptionOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlane.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlaneOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryption.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryptionOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacement.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacementOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfo.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfoOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePool.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscaling.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscalingOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsResourcesProto.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServiceProto.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthentication.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthenticationOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplate.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplateOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorization.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorizationOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClient.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureCluster.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworking.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworkingOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResources.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResourcesOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUser.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUserOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryption.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryptionOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlane.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlaneOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryption.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryptionOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplate.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplateOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfo.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfoOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePool.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscaling.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscalingOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureResourcesProto.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CommonResourcesProto.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/Fleet.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/FleetOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponse.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponseOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LocationName.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraint.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraintOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaint.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaintOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadata.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacement.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacementOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequest.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfig.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfigOrBuilder.java create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_service.proto create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_resources.proto create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto create mode 100644 proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/common_resources.proto create mode 100644 renovate.json create mode 100644 samples/install-without-bom/pom.xml create mode 100644 samples/pom.xml create mode 100644 samples/snapshot/pom.xml create mode 100644 samples/snippets/pom.xml create mode 100644 versions.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 0000000..22c9ba3 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,16 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest \ No newline at end of file diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 0000000..5ebdd9e --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,32 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/gkemulticloud/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-gke-multi-cloud-$1/src" +- source: "/google/cloud/gkemulticloud/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-gke-multi-cloud-$1/src" +- source: "/google/cloud/gkemulticloud/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-gke-multi-cloud/src" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..30fdb7b --- /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 0000000..cee44f7 --- /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-gke-multi-cloud/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. 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 0000000..754e30c --- /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 0000000..9958690 --- /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 0000000..25ff7a0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +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-gke-multi-cloud/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 # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 0000000..4caef68 --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,15 @@ +# 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. +requestsize: + enabled: true diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..2176b05 --- /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/main/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 0000000..c644a24 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,12 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 0000000..8ca7f9c --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 0000000..d4ca941 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 0000000..4ebfe4b --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,60 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for main branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `main` +- pattern: main + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "lint" + - "clirr" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" + - "OwlBot Post Processor" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 0000000..a0ba1f7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,3 @@ +trustedContributors: +- renovate-bot +- gcf-owl-bot[bot] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 0000000..f5fc7d5 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,69 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Github action job to test core java library features on +# downstream client libraries before they are released. +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@v6 + 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 0000000..7a106d0 --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,103 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Github action job to test core java library features on +# downstream client libraries before they are released. +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v6 + 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(main): release " + if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.rest.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.rest.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.rest.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.rest.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 0000000..83ef7f9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,87 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Github action job to test core java library features on +# downstream client libraries before they are released. +on: + push: + branches: + - main + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [8, 11, 17] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11, 17] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 11 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 0000000..912ed8b --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,30 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Github action job to test core java library features on +# downstream client libraries before they are released. +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + 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 0000000..069d08f --- /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 0000000..067cf4a --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,18 @@ +:: Copyright 2022 Google LLC +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. +:: Github action job to test core java library features on +:: downstream client libraries before they are released. +:: 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 0000000..416a838 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,134 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Maven & Java version +mvn -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check -B -ntp + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc -B -ntp + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; +graalvm17) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + 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 \ + -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 -ntp -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_FLAKYBOT}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-gke-multi-cloud +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 0000000..46edbf7 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 0000000..2bcca84 --- /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-gke-multi-cloud/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-gke-multi-cloud/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 0000000..ace89f4 --- /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 0000000..9302aa1 --- /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-gke-multi-cloud/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-gke-multi-cloud/.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 0000000..495cc7b --- /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/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 0000000..d7476cf --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,110 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +shopt -s nullglob + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java +java -version +echo $JOB_TYPE + +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + if [[ $javaVersion == 17* ]] + then + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + else + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + fi +} + +export MAVEN_OPTS=$(determineMavenOpts) + +# this should run maven enforcer +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in **/.flattened-pom.xml +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 0000000..9302aa1 --- /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-gke-multi-cloud/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-gke-multi-cloud/.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 0000000..a2907a2 --- /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: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + 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-integration.cfg b/.kokoro/nightly/java11-integration.cfg new file mode 100644 index 0000000..58049cc --- /dev/null +++ b/.kokoro/nightly/java11-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-public-resources/java11014" +} + +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_FLAKYBOT" + 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 0000000..709f2b4 --- /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 0000000..cb24f44 --- /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 0000000..af65935 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-gke-multi-cloud/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..e6e32df --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-gke-multi-cloud/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 0000000..495cc7b --- /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 0000000..9761fd8 --- /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_FLAKYBOT" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 0000000..f525142 --- /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 0000000..ec57244 --- /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 0000000..69b1d1d --- /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-gke-multi-cloud/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-gke-multi-cloud/.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 0000000..c453220 --- /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-gke-multi-cloud/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg new file mode 100644 index 0000000..a3f7fb9 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-17.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/graalvm17" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm17" +} + +# 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" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 0000000..4c7225e --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.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/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# 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/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 0000000..dded67a --- /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 0000000..709f2b4 --- /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 0000000..cb24f44 --- /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 0000000..af65935 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-gke-multi-cloud/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..e6e32df --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-gke-multi-cloud/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 0000000..495cc7b --- /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 0000000..13610dd --- /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-gke-multi-cloud/.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 0000000..6d323c8 --- /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 0000000..01e0960 --- /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 0000000..9904dec --- /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-gke-multi-cloud + +# 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-gke-multi-cloud \ + --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 0000000..7922733 --- /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-gke-multi-cloud/.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-gke-multi-cloud/.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 0000000..671a3a1 --- /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-gke-multi-cloud/.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 0000000..7f78ee4 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.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 0000000..06f3b57 --- /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-gke-multi-cloud/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 0000000..742ec1a --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.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 0000000..8461d2d --- /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-gke-multi-cloud/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 0000000..3cac3d8 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.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 0000000..e0580e4 --- /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-gke-multi-cloud/.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 0000000..df89ae8 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,53 @@ +#!/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 + +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-gke-multi-cloud +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 0000000..8336017 --- /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-gke-multi-cloud/.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 0000000..fd15bf7 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# 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. + +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-gke-multi-cloud +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG +cp CHANGELOG.md target/docfx-yml/history.md + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 0000000..f535677 --- /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-gke-multi-cloud/.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 0000000..1f55b77 --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 0000000..4c55c25 --- /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-gke-multi-cloud/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-gke-multi-cloud/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-gke-multi-cloud" + } +} + +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 0000000..77dc4e8 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 0000000..8b69b79 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.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 0000000..c870647 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "gke-multi-cloud", + "name_pretty": "Anthos Multicloud", + "product_documentation": "https://cloud.google.com/anthos", + "api_description": "enables you to provision and manage GKE clusters running on AWS and Azure infrastructure through a centralized Google Cloud backed control plane.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-gke-multi-cloud/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-gke-multi-cloud", + "repo_short": "java-gke-multi-cloud", + "distribution_name": "com.google.cloud:google-cloud-gke-multi-cloud", + "api_id": "gke-multi-cloud.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2add254 --- /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 0000000..b65dd27 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# 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 + +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. 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 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 clean verify +``` + +### 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 +``` + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /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 0000000..30c402a --- /dev/null +++ b/README.md @@ -0,0 +1,201 @@ +# Google Anthos Multicloud Client for Java + +Java idiomatic client for [Anthos Multicloud][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-gke-multi-cloud + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies + +```Groovy +implementation 'com.google.cloud:google-cloud-gke-multi-cloud:0.0.0' +``` + +If you are using SBT, add this to your dependencies + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-gke-multi-cloud" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Anthos Multicloud APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Anthos Multicloud API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Anthos Multicloud [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Anthos Multicloud. +[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-gke-multi-cloud` library. See the [Quickstart](#quickstart) section +to add `google-cloud-gke-multi-cloud` as a dependency in your code. + +## About Anthos Multicloud + + +[Anthos Multicloud][product-docs] enables you to provision and manage GKE clusters running on AWS and Azure infrastructure through a centralized Google Cloud backed control plane. + +See the [Anthos Multicloud client library docs][javadocs] to learn how to +use this Anthos Multicloud Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Anthos Multicloud uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/anthos +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-gke-multi-cloud/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-multi-cloud.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gke-multi-cloud&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=gke-multi-cloud.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8b58ae9 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/google-cloud-gke-multi-cloud-bom/pom.xml b/google-cloud-gke-multi-cloud-bom/pom.xml new file mode 100644 index 0000000..2fba501 --- /dev/null +++ b/google-cloud-gke-multi-cloud-bom/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gke-multi-cloud-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 1.2.7 + + + Google Anthos Multicloud BOM + https://github.com/googleapis/java-gke-multi-cloud + + BOM for Anthos Multicloud + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-gke-multi-cloud.git + scm:git:git@github.com:googleapis/java-gke-multi-cloud.git + https://github.com/googleapis/java-gke-multi-cloud + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-gke-multi-cloud + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-gke-multi-cloud/pom.xml b/google-cloud-gke-multi-cloud/pom.xml new file mode 100644 index 0000000..38895af --- /dev/null +++ b/google-cloud-gke-multi-cloud/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gke-multi-cloud + 0.0.1-SNAPSHOT + jar + Google Anthos Multicloud + https://github.com/googleapis/java-gke-multi-cloud + Anthos Multicloud enables you to provision and manage GKE clusters running on AWS and Azure infrastructure through a centralized Google Cloud backed control plane. + + com.google.cloud + google-cloud-gke-multi-cloud-parent + 0.0.1-SNAPSHOT + + + google-cloud-gke-multi-cloud + + + + 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-gke-multi-cloud-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-gke-multi-cloud-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-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java new file mode 100644 index 0000000..5438b8b --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java @@ -0,0 +1,2073 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.stub.AwsClustersStub; +import com.google.cloud.gkemulticloud.v1.stub.AwsClustersStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The AwsClusters API provides a single centrally managed service to create + * and manage Anthos clusters that run on AWS infrastructure. + * + *

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+ *   AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+ *   AwsCluster response = awsClustersClient.getAwsCluster(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AwsClustersSettings awsClustersSettings =
+ *     AwsClustersSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AwsClustersSettings awsClustersSettings =
+ *     AwsClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AwsClustersClient implements BackgroundResource { + private final AwsClustersSettings settings; + private final AwsClustersStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of AwsClustersClient with default settings. */ + public static final AwsClustersClient create() throws IOException { + return create(AwsClustersSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AwsClustersClient, 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 AwsClustersClient create(AwsClustersSettings settings) throws IOException { + return new AwsClustersClient(settings); + } + + /** + * Constructs an instance of AwsClustersClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(AwsClustersSettings). + */ + public static final AwsClustersClient create(AwsClustersStub stub) { + return new AwsClustersClient(stub); + } + + /** + * Constructs an instance of AwsClustersClient, 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 AwsClustersClient(AwsClustersSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AwsClustersStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected AwsClustersClient(AwsClustersStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final AwsClustersSettings getSettings() { + return settings; + } + + public AwsClustersStub 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. + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP + * project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AwsCluster awsCluster = AwsCluster.newBuilder().build();
+   *   String awsClusterId = "awsClusterId1988965944";
+   *   AwsCluster response =
+   *       awsClustersClient.createAwsClusterAsync(parent, awsCluster, awsClusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param awsCluster Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @param awsClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAwsClusterAsync( + LocationName parent, AwsCluster awsCluster, String awsClusterId) { + CreateAwsClusterRequest request = + CreateAwsClusterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAwsCluster(awsCluster) + .setAwsClusterId(awsClusterId) + .build(); + return createAwsClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP + * project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AwsCluster awsCluster = AwsCluster.newBuilder().build();
+   *   String awsClusterId = "awsClusterId1988965944";
+   *   AwsCluster response =
+   *       awsClustersClient.createAwsClusterAsync(parent, awsCluster, awsClusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param awsCluster Required. The specification of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + * @param awsClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAwsClusterAsync( + String parent, AwsCluster awsCluster, String awsClusterId) { + CreateAwsClusterRequest request = + CreateAwsClusterRequest.newBuilder() + .setParent(parent) + .setAwsCluster(awsCluster) + .setAwsClusterId(awsClusterId) + .build(); + return createAwsClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP + * project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsClusterRequest request =
+   *       CreateAwsClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setAwsClusterId("awsClusterId1988965944")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AwsCluster response = awsClustersClient.createAwsClusterAsync(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 createAwsClusterAsync( + CreateAwsClusterRequest request) { + return createAwsClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP + * project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsClusterRequest request =
+   *       CreateAwsClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setAwsClusterId("awsClusterId1988965944")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.createAwsClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AwsCluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAwsClusterOperationCallable() { + return stub.createAwsClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP + * project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsClusterRequest request =
+   *       CreateAwsClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setAwsClusterId("awsClusterId1988965944")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.createAwsClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAwsClusterCallable() { + return stub.createAwsClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsCluster awsCluster = AwsCluster.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AwsCluster response = awsClustersClient.updateAwsClusterAsync(awsCluster, updateMask).get();
+   * }
+   * }
+ * + * @param awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource + * to update. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these fields from + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + *

* `description`. * `annotations`. * `control_plane.version`. * + * `authorization.admin_users`. * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. * + * `control_plane.config_encryption.kms_key_arn`. * `control_plane.instance_type`. * + * `control_plane.security_group_ids`. * `control_plane.proxy_config`. * + * `control_plane.proxy_config.secret_arn`. * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.iops`. * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.root_volume.volume_type`. * `control_plane.root_volume.size_gib`. + * * `control_plane.ssh_config`. * `control_plane.ssh_config.ec2_key_pair`. * + * `control_plane.instance_placement.tenancy`. * `logging_config`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAwsClusterAsync( + AwsCluster awsCluster, FieldMask updateMask) { + UpdateAwsClusterRequest request = + UpdateAwsClusterRequest.newBuilder() + .setAwsCluster(awsCluster) + .setUpdateMask(updateMask) + .build(); + return updateAwsClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsClusterRequest request =
+   *       UpdateAwsClusterRequest.newBuilder()
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AwsCluster response = awsClustersClient.updateAwsClusterAsync(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 updateAwsClusterAsync( + UpdateAwsClusterRequest request) { + return updateAwsClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsClusterRequest request =
+   *       UpdateAwsClusterRequest.newBuilder()
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.updateAwsClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AwsCluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAwsClusterOperationCallable() { + return stub.updateAwsClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsClusterRequest request =
+   *       UpdateAwsClusterRequest.newBuilder()
+   *           .setAwsCluster(AwsCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.updateAwsClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAwsClusterCallable() { + return stub.updateAwsClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+   *   AwsCluster response = awsClustersClient.getAwsCluster(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to describe. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsCluster getAwsCluster(AwsClusterName name) { + GetAwsClusterRequest request = + GetAwsClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAwsCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
+   *   AwsCluster response = awsClustersClient.getAwsCluster(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + * resource to describe. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsCluster getAwsCluster(String name) { + GetAwsClusterRequest request = GetAwsClusterRequest.newBuilder().setName(name).build(); + return getAwsCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsClusterRequest request =
+   *       GetAwsClusterRequest.newBuilder()
+   *           .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .build();
+   *   AwsCluster response = awsClustersClient.getAwsCluster(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 AwsCluster getAwsCluster(GetAwsClusterRequest request) { + return getAwsClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsClusterRequest request =
+   *       GetAwsClusterRequest.newBuilder()
+   *           .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future = awsClustersClient.getAwsClusterCallable().futureCall(request);
+   *   // Do something.
+   *   AwsCluster response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAwsClusterCallable() { + return stub.getAwsClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AwsCluster element : awsClustersClient.listAwsClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAwsClustersPagedResponse listAwsClusters(LocationName parent) { + ListAwsClustersRequest request = + ListAwsClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAwsClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AwsCluster element : awsClustersClient.listAwsClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAwsClustersPagedResponse listAwsClusters(String parent) { + ListAwsClustersRequest request = ListAwsClustersRequest.newBuilder().setParent(parent).build(); + return listAwsClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsClustersRequest request =
+   *       ListAwsClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AwsCluster element : awsClustersClient.listAwsClusters(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 ListAwsClustersPagedResponse listAwsClusters(ListAwsClustersRequest request) { + return listAwsClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsClustersRequest request =
+   *       ListAwsClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.listAwsClustersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AwsCluster element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAwsClustersPagedCallable() { + return stub.listAwsClustersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsClustersRequest request =
+   *       ListAwsClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAwsClustersResponse response =
+   *         awsClustersClient.listAwsClustersCallable().call(request);
+   *     for (AwsCluster element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAwsClustersCallable() { + return stub.listAwsClustersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+   *   awsClustersClient.deleteAwsClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAwsClusterAsync( + AwsClusterName name) { + DeleteAwsClusterRequest request = + DeleteAwsClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteAwsClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
+   *   awsClustersClient.deleteAwsClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAwsClusterAsync(String name) { + DeleteAwsClusterRequest request = DeleteAwsClusterRequest.newBuilder().setName(name).build(); + return deleteAwsClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsClusterRequest request =
+   *       DeleteAwsClusterRequest.newBuilder()
+   *           .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   awsClustersClient.deleteAwsClusterAsync(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 deleteAwsClusterAsync( + DeleteAwsClusterRequest request) { + return deleteAwsClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsClusterRequest request =
+   *       DeleteAwsClusterRequest.newBuilder()
+   *           .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.deleteAwsClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAwsClusterOperationCallable() { + return stub.deleteAwsClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsClusterRequest request =
+   *       DeleteAwsClusterRequest.newBuilder()
+   *           .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.deleteAwsClusterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAwsClusterCallable() { + return stub.deleteAwsClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a short-lived access token to authenticate to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GenerateAwsAccessTokenRequest request =
+   *       GenerateAwsAccessTokenRequest.newBuilder()
+   *           .setAwsCluster(
+   *               AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .build();
+   *   GenerateAwsAccessTokenResponse response = awsClustersClient.generateAwsAccessToken(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 GenerateAwsAccessTokenResponse generateAwsAccessToken( + GenerateAwsAccessTokenRequest request) { + return generateAwsAccessTokenCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a short-lived access token to authenticate to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GenerateAwsAccessTokenRequest request =
+   *       GenerateAwsAccessTokenRequest.newBuilder()
+   *           .setAwsCluster(
+   *               AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.generateAwsAccessTokenCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateAwsAccessTokenResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateAwsAccessTokenCallable() { + return stub.generateAwsAccessTokenCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+   *   AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
+   *   String awsNodePoolId = "awsNodePoolId-1885267498";
+   *   AwsNodePool response =
+   *       awsClustersClient.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get();
+   * }
+   * }
+ * + * @param parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource + * where this node pool will be created. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param awsNodePool Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @param awsNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAwsNodePoolAsync( + AwsClusterName parent, AwsNodePool awsNodePool, String awsNodePoolId) { + CreateAwsNodePoolRequest request = + CreateAwsNodePoolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAwsNodePool(awsNodePool) + .setAwsNodePoolId(awsNodePoolId) + .build(); + return createAwsNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
+   *   AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
+   *   String awsNodePoolId = "awsNodePoolId-1885267498";
+   *   AwsNodePool response =
+   *       awsClustersClient.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get();
+   * }
+   * }
+ * + * @param parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource + * where this node pool will be created. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param awsNodePool Required. The specification of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + * @param awsNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAwsNodePoolAsync( + String parent, AwsNodePool awsNodePool, String awsNodePoolId) { + CreateAwsNodePoolRequest request = + CreateAwsNodePoolRequest.newBuilder() + .setParent(parent) + .setAwsNodePool(awsNodePool) + .setAwsNodePoolId(awsNodePoolId) + .build(); + return createAwsNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsNodePoolRequest request =
+   *       CreateAwsNodePoolRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setAwsNodePoolId("awsNodePoolId-1885267498")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AwsNodePool response = awsClustersClient.createAwsNodePoolAsync(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 createAwsNodePoolAsync( + CreateAwsNodePoolRequest request) { + return createAwsNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsNodePoolRequest request =
+   *       CreateAwsNodePoolRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setAwsNodePoolId("awsNodePoolId-1885267498")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.createAwsNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AwsNodePool response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAwsNodePoolOperationCallable() { + return stub.createAwsNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   CreateAwsNodePoolRequest request =
+   *       CreateAwsNodePoolRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setAwsNodePoolId("awsNodePoolId-1885267498")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.createAwsNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAwsNodePoolCallable() { + return stub.createAwsNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AwsNodePool response =
+   *       awsClustersClient.updateAwsNodePoolAsync(awsNodePool, updateMask).get();
+   * }
+   * }
+ * + * @param awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to update. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these fields from + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + *

* `annotations`. * `version`. * `autoscaling.min_node_count`. * + * `autoscaling.max_node_count`. * `config.config_encryption.kms_key_arn`. * + * `config.security_group_ids`. * `config.root_volume.iops`. * + * `config.root_volume.kms_key_arn`. * `config.root_volume.volume_type`. * + * `config.root_volume.size_gib`. * `config.proxy_config`. * + * `config.proxy_config.secret_arn`. * `config.proxy_config.secret_version`. * + * `config.ssh_config`. * `config.ssh_config.ec2_key_pair`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAwsNodePoolAsync( + AwsNodePool awsNodePool, FieldMask updateMask) { + UpdateAwsNodePoolRequest request = + UpdateAwsNodePoolRequest.newBuilder() + .setAwsNodePool(awsNodePool) + .setUpdateMask(updateMask) + .build(); + return updateAwsNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsNodePoolRequest request =
+   *       UpdateAwsNodePoolRequest.newBuilder()
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AwsNodePool response = awsClustersClient.updateAwsNodePoolAsync(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 updateAwsNodePoolAsync( + UpdateAwsNodePoolRequest request) { + return updateAwsNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsNodePoolRequest request =
+   *       UpdateAwsNodePoolRequest.newBuilder()
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.updateAwsNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AwsNodePool response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAwsNodePoolOperationCallable() { + return stub.updateAwsNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   UpdateAwsNodePoolRequest request =
+   *       UpdateAwsNodePoolRequest.newBuilder()
+   *           .setAwsNodePool(AwsNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.updateAwsNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAwsNodePoolCallable() { + return stub.updateAwsNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsNodePoolName name =
+   *       AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]");
+   *   AwsNodePool response = awsClustersClient.getAwsNodePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to describe. + *

`AwsNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsNodePool getAwsNodePool(AwsNodePoolName name) { + GetAwsNodePoolRequest request = + GetAwsNodePoolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAwsNodePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String name =
+   *       AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *           .toString();
+   *   AwsNodePool response = awsClustersClient.getAwsNodePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + * resource to describe. + *

`AwsNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsNodePool getAwsNodePool(String name) { + GetAwsNodePoolRequest request = GetAwsNodePoolRequest.newBuilder().setName(name).build(); + return getAwsNodePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsNodePoolRequest request =
+   *       GetAwsNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   AwsNodePool response = awsClustersClient.getAwsNodePool(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 AwsNodePool getAwsNodePool(GetAwsNodePoolRequest request) { + return getAwsNodePoolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsNodePoolRequest request =
+   *       GetAwsNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.getAwsNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   AwsNodePool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAwsNodePoolCallable() { + return stub.getAwsNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+   *   for (AwsNodePool element : awsClustersClient.listAwsNodePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAwsNodePoolsPagedResponse listAwsNodePools(AwsClusterName parent) { + ListAwsNodePoolsRequest request = + ListAwsNodePoolsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAwsNodePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
+   *   for (AwsNodePool element : awsClustersClient.listAwsNodePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent `AwsCluster` which owns this collection of + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + *

`AwsCluster` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAwsNodePoolsPagedResponse listAwsNodePools(String parent) { + ListAwsNodePoolsRequest request = + ListAwsNodePoolsRequest.newBuilder().setParent(parent).build(); + return listAwsNodePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsNodePoolsRequest request =
+   *       ListAwsNodePoolsRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AwsNodePool element : awsClustersClient.listAwsNodePools(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 ListAwsNodePoolsPagedResponse listAwsNodePools(ListAwsNodePoolsRequest request) { + return listAwsNodePoolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsNodePoolsRequest request =
+   *       ListAwsNodePoolsRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.listAwsNodePoolsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AwsNodePool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAwsNodePoolsPagedCallable() { + return stub.listAwsNodePoolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given + * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   ListAwsNodePoolsRequest request =
+   *       ListAwsNodePoolsRequest.newBuilder()
+   *           .setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAwsNodePoolsResponse response =
+   *         awsClustersClient.listAwsNodePoolsCallable().call(request);
+   *     for (AwsNodePool element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAwsNodePoolsCallable() { + return stub.listAwsNodePoolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsNodePoolName name =
+   *       AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]");
+   *   awsClustersClient.deleteAwsNodePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + *

`AwsNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAwsNodePoolAsync( + AwsNodePoolName name) { + DeleteAwsNodePoolRequest request = + DeleteAwsNodePoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAwsNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String name =
+   *       AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *           .toString();
+   *   awsClustersClient.deleteAwsNodePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + *

`AwsNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAwsNodePoolAsync(String name) { + DeleteAwsNodePoolRequest request = DeleteAwsNodePoolRequest.newBuilder().setName(name).build(); + return deleteAwsNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsNodePoolRequest request =
+   *       DeleteAwsNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   awsClustersClient.deleteAwsNodePoolAsync(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 deleteAwsNodePoolAsync( + DeleteAwsNodePoolRequest request) { + return deleteAwsNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsNodePoolRequest request =
+   *       DeleteAwsNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       awsClustersClient.deleteAwsNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAwsNodePoolOperationCallable() { + return stub.deleteAwsNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   DeleteAwsNodePoolRequest request =
+   *       DeleteAwsNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.deleteAwsNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAwsNodePoolCallable() { + return stub.deleteAwsNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported AWS regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   AwsServerConfigName name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]");
+   *   AwsServerConfig response = awsClustersClient.getAwsServerConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + *

`AwsServerConfig` names are formatted as + * `projects/<project-id>/locations/<region>/awsServerConfig`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsServerConfig getAwsServerConfig(AwsServerConfigName name) { + GetAwsServerConfigRequest request = + GetAwsServerConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAwsServerConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported AWS regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   String name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AwsServerConfig response = awsClustersClient.getAwsServerConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + *

`AwsServerConfig` names are formatted as + * `projects/<project-id>/locations/<region>/awsServerConfig`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AwsServerConfig getAwsServerConfig(String name) { + GetAwsServerConfigRequest request = + GetAwsServerConfigRequest.newBuilder().setName(name).build(); + return getAwsServerConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported AWS regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsServerConfigRequest request =
+   *       GetAwsServerConfigRequest.newBuilder()
+   *           .setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   AwsServerConfig response = awsClustersClient.getAwsServerConfig(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 AwsServerConfig getAwsServerConfig(GetAwsServerConfigRequest request) { + return getAwsServerConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported AWS regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+   *   GetAwsServerConfigRequest request =
+   *       GetAwsServerConfigRequest.newBuilder()
+   *           .setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       awsClustersClient.getAwsServerConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AwsServerConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAwsServerConfigCallable() { + return stub.getAwsServerConfigCallable(); + } + + @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 ListAwsClustersPagedResponse + extends AbstractPagedListResponse< + ListAwsClustersRequest, + ListAwsClustersResponse, + AwsCluster, + ListAwsClustersPage, + ListAwsClustersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAwsClustersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAwsClustersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAwsClustersPagedResponse(ListAwsClustersPage page) { + super(page, ListAwsClustersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAwsClustersPage + extends AbstractPage< + ListAwsClustersRequest, ListAwsClustersResponse, AwsCluster, ListAwsClustersPage> { + + private ListAwsClustersPage( + PageContext context, + ListAwsClustersResponse response) { + super(context, response); + } + + private static ListAwsClustersPage createEmptyPage() { + return new ListAwsClustersPage(null, null); + } + + @Override + protected ListAwsClustersPage createPage( + PageContext context, + ListAwsClustersResponse response) { + return new ListAwsClustersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAwsClustersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAwsClustersRequest, + ListAwsClustersResponse, + AwsCluster, + ListAwsClustersPage, + ListAwsClustersFixedSizeCollection> { + + private ListAwsClustersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAwsClustersFixedSizeCollection createEmptyCollection() { + return new ListAwsClustersFixedSizeCollection(null, 0); + } + + @Override + protected ListAwsClustersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAwsClustersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAwsNodePoolsPagedResponse + extends AbstractPagedListResponse< + ListAwsNodePoolsRequest, + ListAwsNodePoolsResponse, + AwsNodePool, + ListAwsNodePoolsPage, + ListAwsNodePoolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAwsNodePoolsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAwsNodePoolsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAwsNodePoolsPagedResponse(ListAwsNodePoolsPage page) { + super(page, ListAwsNodePoolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAwsNodePoolsPage + extends AbstractPage< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, AwsNodePool, ListAwsNodePoolsPage> { + + private ListAwsNodePoolsPage( + PageContext context, + ListAwsNodePoolsResponse response) { + super(context, response); + } + + private static ListAwsNodePoolsPage createEmptyPage() { + return new ListAwsNodePoolsPage(null, null); + } + + @Override + protected ListAwsNodePoolsPage createPage( + PageContext context, + ListAwsNodePoolsResponse response) { + return new ListAwsNodePoolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAwsNodePoolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAwsNodePoolsRequest, + ListAwsNodePoolsResponse, + AwsNodePool, + ListAwsNodePoolsPage, + ListAwsNodePoolsFixedSizeCollection> { + + private ListAwsNodePoolsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAwsNodePoolsFixedSizeCollection createEmptyCollection() { + return new ListAwsNodePoolsFixedSizeCollection(null, 0); + } + + @Override + protected ListAwsNodePoolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAwsNodePoolsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersSettings.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersSettings.java new file mode 100644 index 0000000..2361c6d --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersSettings.java @@ -0,0 +1,388 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsNodePoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.gkemulticloud.v1.stub.AwsClustersStubSettings; +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 AwsClustersClient}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AwsClustersSettings.Builder awsClustersSettingsBuilder = AwsClustersSettings.newBuilder();
+ * awsClustersSettingsBuilder
+ *     .getAwsClusterSettings()
+ *     .setRetrySettings(
+ *         awsClustersSettingsBuilder
+ *             .getAwsClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AwsClustersSettings awsClustersSettings = awsClustersSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AwsClustersSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createAwsCluster. */ + public UnaryCallSettings createAwsClusterSettings() { + return ((AwsClustersStubSettings) getStubSettings()).createAwsClusterSettings(); + } + + /** Returns the object with the settings used for calls to createAwsCluster. */ + public OperationCallSettings + createAwsClusterOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).createAwsClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAwsCluster. */ + public UnaryCallSettings updateAwsClusterSettings() { + return ((AwsClustersStubSettings) getStubSettings()).updateAwsClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateAwsCluster. */ + public OperationCallSettings + updateAwsClusterOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).updateAwsClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAwsCluster. */ + public UnaryCallSettings getAwsClusterSettings() { + return ((AwsClustersStubSettings) getStubSettings()).getAwsClusterSettings(); + } + + /** Returns the object with the settings used for calls to listAwsClusters. */ + public PagedCallSettings< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings() { + return ((AwsClustersStubSettings) getStubSettings()).listAwsClustersSettings(); + } + + /** Returns the object with the settings used for calls to deleteAwsCluster. */ + public UnaryCallSettings deleteAwsClusterSettings() { + return ((AwsClustersStubSettings) getStubSettings()).deleteAwsClusterSettings(); + } + + /** Returns the object with the settings used for calls to deleteAwsCluster. */ + public OperationCallSettings + deleteAwsClusterOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).deleteAwsClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateAwsAccessToken. */ + public UnaryCallSettings + generateAwsAccessTokenSettings() { + return ((AwsClustersStubSettings) getStubSettings()).generateAwsAccessTokenSettings(); + } + + /** Returns the object with the settings used for calls to createAwsNodePool. */ + public UnaryCallSettings createAwsNodePoolSettings() { + return ((AwsClustersStubSettings) getStubSettings()).createAwsNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to createAwsNodePool. */ + public OperationCallSettings + createAwsNodePoolOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).createAwsNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAwsNodePool. */ + public UnaryCallSettings updateAwsNodePoolSettings() { + return ((AwsClustersStubSettings) getStubSettings()).updateAwsNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to updateAwsNodePool. */ + public OperationCallSettings + updateAwsNodePoolOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).updateAwsNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAwsNodePool. */ + public UnaryCallSettings getAwsNodePoolSettings() { + return ((AwsClustersStubSettings) getStubSettings()).getAwsNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to listAwsNodePools. */ + public PagedCallSettings< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings() { + return ((AwsClustersStubSettings) getStubSettings()).listAwsNodePoolsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAwsNodePool. */ + public UnaryCallSettings deleteAwsNodePoolSettings() { + return ((AwsClustersStubSettings) getStubSettings()).deleteAwsNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to deleteAwsNodePool. */ + public OperationCallSettings + deleteAwsNodePoolOperationSettings() { + return ((AwsClustersStubSettings) getStubSettings()).deleteAwsNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAwsServerConfig. */ + public UnaryCallSettings + getAwsServerConfigSettings() { + return ((AwsClustersStubSettings) getStubSettings()).getAwsServerConfigSettings(); + } + + public static final AwsClustersSettings create(AwsClustersStubSettings stub) throws IOException { + return new AwsClustersSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AwsClustersStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AwsClustersStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AwsClustersStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AwsClustersStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AwsClustersStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AwsClustersStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AwsClustersStubSettings.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 AwsClustersSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AwsClustersSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AwsClustersStubSettings.newBuilder(clientContext)); + } + + protected Builder(AwsClustersSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AwsClustersStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AwsClustersStubSettings.newBuilder()); + } + + public AwsClustersStubSettings.Builder getStubSettingsBuilder() { + return ((AwsClustersStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createAwsCluster. */ + public UnaryCallSettings.Builder + createAwsClusterSettings() { + return getStubSettingsBuilder().createAwsClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createAwsCluster. */ + public OperationCallSettings.Builder + createAwsClusterOperationSettings() { + return getStubSettingsBuilder().createAwsClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAwsCluster. */ + public UnaryCallSettings.Builder + updateAwsClusterSettings() { + return getStubSettingsBuilder().updateAwsClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateAwsCluster. */ + public OperationCallSettings.Builder + updateAwsClusterOperationSettings() { + return getStubSettingsBuilder().updateAwsClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAwsCluster. */ + public UnaryCallSettings.Builder getAwsClusterSettings() { + return getStubSettingsBuilder().getAwsClusterSettings(); + } + + /** Returns the builder for the settings used for calls to listAwsClusters. */ + public PagedCallSettings.Builder< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings() { + return getStubSettingsBuilder().listAwsClustersSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAwsCluster. */ + public UnaryCallSettings.Builder + deleteAwsClusterSettings() { + return getStubSettingsBuilder().deleteAwsClusterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAwsCluster. */ + public OperationCallSettings.Builder + deleteAwsClusterOperationSettings() { + return getStubSettingsBuilder().deleteAwsClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateAwsAccessToken. */ + public UnaryCallSettings.Builder + generateAwsAccessTokenSettings() { + return getStubSettingsBuilder().generateAwsAccessTokenSettings(); + } + + /** Returns the builder for the settings used for calls to createAwsNodePool. */ + public UnaryCallSettings.Builder + createAwsNodePoolSettings() { + return getStubSettingsBuilder().createAwsNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to createAwsNodePool. */ + public OperationCallSettings.Builder + createAwsNodePoolOperationSettings() { + return getStubSettingsBuilder().createAwsNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAwsNodePool. */ + public UnaryCallSettings.Builder + updateAwsNodePoolSettings() { + return getStubSettingsBuilder().updateAwsNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to updateAwsNodePool. */ + public OperationCallSettings.Builder + updateAwsNodePoolOperationSettings() { + return getStubSettingsBuilder().updateAwsNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAwsNodePool. */ + public UnaryCallSettings.Builder getAwsNodePoolSettings() { + return getStubSettingsBuilder().getAwsNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to listAwsNodePools. */ + public PagedCallSettings.Builder< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings() { + return getStubSettingsBuilder().listAwsNodePoolsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAwsNodePool. */ + public UnaryCallSettings.Builder + deleteAwsNodePoolSettings() { + return getStubSettingsBuilder().deleteAwsNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAwsNodePool. */ + public OperationCallSettings.Builder + deleteAwsNodePoolOperationSettings() { + return getStubSettingsBuilder().deleteAwsNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAwsServerConfig. */ + public UnaryCallSettings.Builder + getAwsServerConfigSettings() { + return getStubSettingsBuilder().getAwsServerConfigSettings(); + } + + @Override + public AwsClustersSettings build() throws IOException { + return new AwsClustersSettings(this); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java new file mode 100644 index 0000000..f2e817e --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java @@ -0,0 +1,2829 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.stub.AzureClustersStub; +import com.google.cloud.gkemulticloud.v1.stub.AzureClustersStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The AzureClusters API provides a single centrally managed service to create + * and manage Anthos clusters that run on Azure infrastructure. + * + *

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+ *   AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
+ *   AzureClient response = azureClustersClient.getAzureClient(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AzureClustersSettings azureClustersSettings =
+ *     AzureClustersSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AzureClustersSettings azureClustersSettings =
+ *     AzureClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AzureClustersClient implements BackgroundResource { + private final AzureClustersSettings settings; + private final AzureClustersStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of AzureClustersClient with default settings. */ + public static final AzureClustersClient create() throws IOException { + return create(AzureClustersSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AzureClustersClient, 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 AzureClustersClient create(AzureClustersSettings settings) + throws IOException { + return new AzureClustersClient(settings); + } + + /** + * Constructs an instance of AzureClustersClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AzureClustersSettings). + */ + public static final AzureClustersClient create(AzureClustersStub stub) { + return new AzureClustersClient(stub); + } + + /** + * Constructs an instance of AzureClustersClient, 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 AzureClustersClient(AzureClustersSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AzureClustersStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected AzureClustersClient(AzureClustersStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final AzureClustersSettings getSettings() { + return settings; + } + + public AzureClustersStub 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. + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given + * Google Cloud project and region. + * + *

`AzureClient` resources hold client authentication information needed by the Anthos + * Multicloud API to manage Azure resources on your Azure subscription on your behalf. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AzureClient azureClient = AzureClient.newBuilder().build();
+   *   String azureClientId = "azureClientId-1735934475";
+   *   AzureClient response =
+   *       azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureClient Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @param azureClientId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureClientAsync( + LocationName parent, AzureClient azureClient, String azureClientId) { + CreateAzureClientRequest request = + CreateAzureClientRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAzureClient(azureClient) + .setAzureClientId(azureClientId) + .build(); + return createAzureClientAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given + * Google Cloud project and region. + * + *

`AzureClient` resources hold client authentication information needed by the Anthos + * Multicloud API to manage Azure resources on your Azure subscription on your behalf. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AzureClient azureClient = AzureClient.newBuilder().build();
+   *   String azureClientId = "azureClientId-1735934475";
+   *   AzureClient response =
+   *       azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureClient Required. The specification of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + * @param azureClientId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureClientAsync( + String parent, AzureClient azureClient, String azureClientId) { + CreateAzureClientRequest request = + CreateAzureClientRequest.newBuilder() + .setParent(parent) + .setAzureClient(azureClient) + .setAzureClientId(azureClientId) + .build(); + return createAzureClientAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given + * Google Cloud project and region. + * + *

`AzureClient` resources hold client authentication information needed by the Anthos + * Multicloud API to manage Azure resources on your Azure subscription on your behalf. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClientRequest request =
+   *       CreateAzureClientRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureClient(AzureClient.newBuilder().build())
+   *           .setAzureClientId("azureClientId-1735934475")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AzureClient response = azureClustersClient.createAzureClientAsync(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 createAzureClientAsync( + CreateAzureClientRequest request) { + return createAzureClientOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given + * Google Cloud project and region. + * + *

`AzureClient` resources hold client authentication information needed by the Anthos + * Multicloud API to manage Azure resources on your Azure subscription on your behalf. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClientRequest request =
+   *       CreateAzureClientRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureClient(AzureClient.newBuilder().build())
+   *           .setAzureClientId("azureClientId-1735934475")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.createAzureClientOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AzureClient response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAzureClientOperationCallable() { + return stub.createAzureClientOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given + * Google Cloud project and region. + * + *

`AzureClient` resources hold client authentication information needed by the Anthos + * Multicloud API to manage Azure resources on your Azure subscription on your behalf. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClientRequest request =
+   *       CreateAzureClientRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureClient(AzureClient.newBuilder().build())
+   *           .setAzureClientId("azureClientId-1735934475")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.createAzureClientCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAzureClientCallable() { + return stub.createAzureClientCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
+   *   AzureClient response = azureClustersClient.getAzureClient(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource to describe. + *

[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureClient getAzureClient(AzureClientName name) { + GetAzureClientRequest request = + GetAzureClientRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAzureClient(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
+   *   AzureClient response = azureClustersClient.getAzureClient(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + * resource to describe. + *

[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureClient getAzureClient(String name) { + GetAzureClientRequest request = GetAzureClientRequest.newBuilder().setName(name).build(); + return getAzureClient(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureClientRequest request =
+   *       GetAzureClientRequest.newBuilder()
+   *           .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
+   *           .build();
+   *   AzureClient response = azureClustersClient.getAzureClient(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 AzureClient getAzureClient(GetAzureClientRequest request) { + return getAzureClientCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureClientRequest request =
+   *       GetAzureClientRequest.newBuilder()
+   *           .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.getAzureClientCallable().futureCall(request);
+   *   // Do something.
+   *   AzureClient response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAzureClientCallable() { + return stub.getAzureClientCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureClientsPagedResponse listAzureClients(LocationName parent) { + ListAzureClientsRequest request = + ListAzureClientsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAzureClients(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureClientsPagedResponse listAzureClients(String parent) { + ListAzureClientsRequest request = + ListAzureClientsRequest.newBuilder().setParent(parent).build(); + return listAzureClients(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClientsRequest request =
+   *       ListAzureClientsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AzureClient element : azureClustersClient.listAzureClients(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 ListAzureClientsPagedResponse listAzureClients(ListAzureClientsRequest request) { + return listAzureClientsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClientsRequest request =
+   *       ListAzureClientsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.listAzureClientsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AzureClient element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureClientsPagedCallable() { + return stub.listAzureClientsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google + * Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClientsRequest request =
+   *       ListAzureClientsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAzureClientsResponse response =
+   *         azureClustersClient.listAzureClientsCallable().call(request);
+   *     for (AzureClient element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureClientsCallable() { + return stub.listAzureClientsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

If the client is used by one or more clusters, deletion will fail and a + * `FAILED_PRECONDITION` error will be returned. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
+   *   azureClustersClient.deleteAzureClientAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + *

[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureClientAsync( + AzureClientName name) { + DeleteAzureClientRequest request = + DeleteAzureClientRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAzureClientAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

If the client is used by one or more clusters, deletion will fail and a + * `FAILED_PRECONDITION` error will be returned. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
+   *   azureClustersClient.deleteAzureClientAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + *

[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + * `projects/<project-id>/locations/<region>/azureClients/<client-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureClientAsync(String name) { + DeleteAzureClientRequest request = DeleteAzureClientRequest.newBuilder().setName(name).build(); + return deleteAzureClientAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

If the client is used by one or more clusters, deletion will fail and a + * `FAILED_PRECONDITION` error will be returned. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClientRequest request =
+   *       DeleteAzureClientRequest.newBuilder()
+   *           .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   azureClustersClient.deleteAzureClientAsync(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 deleteAzureClientAsync( + DeleteAzureClientRequest request) { + return deleteAzureClientOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

If the client is used by one or more clusters, deletion will fail and a + * `FAILED_PRECONDITION` error will be returned. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClientRequest request =
+   *       DeleteAzureClientRequest.newBuilder()
+   *           .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.deleteAzureClientOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAzureClientOperationCallable() { + return stub.deleteAzureClientOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + * + *

If the client is used by one or more clusters, deletion will fail and a + * `FAILED_PRECONDITION` error will be returned. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClientRequest request =
+   *       DeleteAzureClientRequest.newBuilder()
+   *           .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.deleteAzureClientCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAzureClientCallable() { + return stub.deleteAzureClientCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given + * GCP project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AzureCluster azureCluster = AzureCluster.newBuilder().build();
+   *   String azureClusterId = "azureClusterId191689446";
+   *   AzureCluster response =
+   *       azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureCluster Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @param azureClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureClusterAsync( + LocationName parent, AzureCluster azureCluster, String azureClusterId) { + CreateAzureClusterRequest request = + CreateAzureClusterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAzureCluster(azureCluster) + .setAzureClusterId(azureClusterId) + .build(); + return createAzureClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given + * GCP project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AzureCluster azureCluster = AzureCluster.newBuilder().build();
+   *   String azureClusterId = "azureClusterId191689446";
+   *   AzureCluster response =
+   *       azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent location where this + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureCluster Required. The specification of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + * @param azureClusterId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureClusterAsync( + String parent, AzureCluster azureCluster, String azureClusterId) { + CreateAzureClusterRequest request = + CreateAzureClusterRequest.newBuilder() + .setParent(parent) + .setAzureCluster(azureCluster) + .setAzureClusterId(azureClusterId) + .build(); + return createAzureClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given + * GCP project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClusterRequest request =
+   *       CreateAzureClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setAzureClusterId("azureClusterId191689446")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AzureCluster response = azureClustersClient.createAzureClusterAsync(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 createAzureClusterAsync( + CreateAzureClusterRequest request) { + return createAzureClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given + * GCP project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClusterRequest request =
+   *       CreateAzureClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setAzureClusterId("azureClusterId191689446")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.createAzureClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AzureCluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAzureClusterOperationCallable() { + return stub.createAzureClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given + * GCP project and region. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureClusterRequest request =
+   *       CreateAzureClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setAzureClusterId("azureClusterId191689446")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.createAzureClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAzureClusterCallable() { + return stub.createAzureClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureCluster azureCluster = AzureCluster.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AzureCluster response =
+   *       azureClustersClient.updateAzureClusterAsync(azureCluster, updateMask).get();
+   * }
+   * }
+ * + * @param azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + * resource to update. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these fields from + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + *

* `description`. * `annotations`. * `azureClient`. * + * `control_plane.version`. * `control_plane.vm_size`. * `authorization.admin_users`. + * * `control_plane.root_volume.size_gib`. * `logging_config` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAzureClusterAsync( + AzureCluster azureCluster, FieldMask updateMask) { + UpdateAzureClusterRequest request = + UpdateAzureClusterRequest.newBuilder() + .setAzureCluster(azureCluster) + .setUpdateMask(updateMask) + .build(); + return updateAzureClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureClusterRequest request =
+   *       UpdateAzureClusterRequest.newBuilder()
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AzureCluster response = azureClustersClient.updateAzureClusterAsync(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 updateAzureClusterAsync( + UpdateAzureClusterRequest request) { + return updateAzureClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureClusterRequest request =
+   *       UpdateAzureClusterRequest.newBuilder()
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.updateAzureClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AzureCluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAzureClusterOperationCallable() { + return stub.updateAzureClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureClusterRequest request =
+   *       UpdateAzureClusterRequest.newBuilder()
+   *           .setAzureCluster(AzureCluster.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.updateAzureClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAzureClusterCallable() { + return stub.updateAzureClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
+   *   AzureCluster response = azureClustersClient.getAzureCluster(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureCluster getAzureCluster(AzureClusterName name) { + GetAzureClusterRequest request = + GetAzureClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAzureCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
+   *   AzureCluster response = azureClustersClient.getAzureCluster(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureCluster getAzureCluster(String name) { + GetAzureClusterRequest request = GetAzureClusterRequest.newBuilder().setName(name).build(); + return getAzureCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureClusterRequest request =
+   *       GetAzureClusterRequest.newBuilder()
+   *           .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .build();
+   *   AzureCluster response = azureClustersClient.getAzureCluster(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 AzureCluster getAzureCluster(GetAzureClusterRequest request) { + return getAzureClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureClusterRequest request =
+   *       GetAzureClusterRequest.newBuilder()
+   *           .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.getAzureClusterCallable().futureCall(request);
+   *   // Do something.
+   *   AzureCluster response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAzureClusterCallable() { + return stub.getAzureClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given + * Google Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureClustersPagedResponse listAzureClusters(LocationName parent) { + ListAzureClustersRequest request = + ListAzureClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAzureClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given + * Google Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent location which owns this collection of + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureClustersPagedResponse listAzureClusters(String parent) { + ListAzureClustersRequest request = + ListAzureClustersRequest.newBuilder().setParent(parent).build(); + return listAzureClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given + * Google Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClustersRequest request =
+   *       ListAzureClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AzureCluster element : azureClustersClient.listAzureClusters(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 ListAzureClustersPagedResponse listAzureClusters(ListAzureClustersRequest request) { + return listAzureClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given + * Google Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClustersRequest request =
+   *       ListAzureClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.listAzureClustersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AzureCluster element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureClustersPagedCallable() { + return stub.listAzureClustersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given + * Google Cloud project and region. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureClustersRequest request =
+   *       ListAzureClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAzureClustersResponse response =
+   *         azureClustersClient.listAzureClustersCallable().call(request);
+   *     for (AzureCluster element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureClustersCallable() { + return stub.listAzureClustersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
+   *   azureClustersClient.deleteAzureClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureClusterAsync( + AzureClusterName name) { + DeleteAzureClusterRequest request = + DeleteAzureClusterRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAzureClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
+   *   azureClustersClient.deleteAzureClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on GCP resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureClusterAsync(String name) { + DeleteAzureClusterRequest request = + DeleteAzureClusterRequest.newBuilder().setName(name).build(); + return deleteAzureClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClusterRequest request =
+   *       DeleteAzureClusterRequest.newBuilder()
+   *           .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   azureClustersClient.deleteAzureClusterAsync(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 deleteAzureClusterAsync( + DeleteAzureClusterRequest request) { + return deleteAzureClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClusterRequest request =
+   *       DeleteAzureClusterRequest.newBuilder()
+   *           .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.deleteAzureClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAzureClusterOperationCallable() { + return stub.deleteAzureClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Fails if the cluster has one or more associated + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureClusterRequest request =
+   *       DeleteAzureClusterRequest.newBuilder()
+   *           .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.deleteAzureClusterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAzureClusterCallable() { + return stub.deleteAzureClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a short-lived access token to authenticate to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GenerateAzureAccessTokenRequest request =
+   *       GenerateAzureAccessTokenRequest.newBuilder()
+   *           .setAzureCluster(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .build();
+   *   GenerateAzureAccessTokenResponse response =
+   *       azureClustersClient.generateAzureAccessToken(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 GenerateAzureAccessTokenResponse generateAzureAccessToken( + GenerateAzureAccessTokenRequest request) { + return generateAzureAccessTokenCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a short-lived access token to authenticate to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GenerateAzureAccessTokenRequest request =
+   *       GenerateAzureAccessTokenRequest.newBuilder()
+   *           .setAzureCluster(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.generateAzureAccessTokenCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateAzureAccessTokenResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateAzureAccessTokenCallable() { + return stub.generateAzureAccessTokenCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
+   *   AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
+   *   String azureNodePoolId = "azureNodePoolId-1766264088";
+   *   AzureNodePool response =
+   *       azureClustersClient
+   *           .createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource + * where this node pool will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureNodePool Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @param azureNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureNodePoolAsync( + AzureClusterName parent, AzureNodePool azureNodePool, String azureNodePoolId) { + CreateAzureNodePoolRequest request = + CreateAzureNodePoolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAzureNodePool(azureNodePool) + .setAzureNodePoolId(azureNodePoolId) + .build(); + return createAzureNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
+   *   AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
+   *   String azureNodePoolId = "azureNodePoolId-1766264088";
+   *   AzureNodePool response =
+   *       azureClustersClient
+   *           .createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource + * where this node pool will be created. + *

Location names are formatted as `projects/<project-id>/locations/<region>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @param azureNodePool Required. The specification of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + * @param azureNodePoolId Required. A client provided ID the resource. Must be unique within the + * parent resource. + *

The provided ID will be part of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAzureNodePoolAsync( + String parent, AzureNodePool azureNodePool, String azureNodePoolId) { + CreateAzureNodePoolRequest request = + CreateAzureNodePoolRequest.newBuilder() + .setParent(parent) + .setAzureNodePool(azureNodePool) + .setAzureNodePoolId(azureNodePoolId) + .build(); + return createAzureNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureNodePoolRequest request =
+   *       CreateAzureNodePoolRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setAzureNodePoolId("azureNodePoolId-1766264088")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AzureNodePool response = azureClustersClient.createAzureNodePoolAsync(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 createAzureNodePoolAsync( + CreateAzureNodePoolRequest request) { + return createAzureNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureNodePoolRequest request =
+   *       CreateAzureNodePoolRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setAzureNodePoolId("azureNodePoolId-1766264088")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.createAzureNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AzureNodePool response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAzureNodePoolOperationCallable() { + return stub.createAzureNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   CreateAzureNodePoolRequest request =
+   *       CreateAzureNodePoolRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setAzureNodePoolId("azureNodePoolId-1766264088")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.createAzureNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAzureNodePoolCallable() { + return stub.createAzureNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AzureNodePool response =
+   *       azureClustersClient.updateAzureNodePoolAsync(azureNodePool, updateMask).get();
+   * }
+   * }
+ * + * @param azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + * resource to update. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these fields from + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + *

*. `annotations`. * `version`. * `autoscaling.min_node_count`. * + * `autoscaling.max_node_count`. * `config.vm_size`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAzureNodePoolAsync( + AzureNodePool azureNodePool, FieldMask updateMask) { + UpdateAzureNodePoolRequest request = + UpdateAzureNodePoolRequest.newBuilder() + .setAzureNodePool(azureNodePool) + .setUpdateMask(updateMask) + .build(); + return updateAzureNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureNodePoolRequest request =
+   *       UpdateAzureNodePoolRequest.newBuilder()
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AzureNodePool response = azureClustersClient.updateAzureNodePoolAsync(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 updateAzureNodePoolAsync( + UpdateAzureNodePoolRequest request) { + return updateAzureNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureNodePoolRequest request =
+   *       UpdateAzureNodePoolRequest.newBuilder()
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.updateAzureNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AzureNodePool response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAzureNodePoolOperationCallable() { + return stub.updateAzureNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   UpdateAzureNodePoolRequest request =
+   *       UpdateAzureNodePoolRequest.newBuilder()
+   *           .setAzureNodePool(AzureNodePool.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.updateAzureNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAzureNodePoolCallable() { + return stub.updateAzureNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureNodePoolName name =
+   *       AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
+   *   AzureNodePool response = azureClustersClient.getAzureNodePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + *

`AzureNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureNodePool getAzureNodePool(AzureNodePoolName name) { + GetAzureNodePoolRequest request = + GetAzureNodePoolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAzureNodePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name =
+   *       AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *           .toString();
+   *   AzureNodePool response = azureClustersClient.getAzureNodePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + *

`AzureNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureNodePool getAzureNodePool(String name) { + GetAzureNodePoolRequest request = GetAzureNodePoolRequest.newBuilder().setName(name).build(); + return getAzureNodePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureNodePoolRequest request =
+   *       GetAzureNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AzureNodePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   AzureNodePool response = azureClustersClient.getAzureNodePool(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 AzureNodePool getAzureNodePool(GetAzureNodePoolRequest request) { + return getAzureNodePoolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureNodePoolRequest request =
+   *       GetAzureNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AzureNodePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.getAzureNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   AzureNodePool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAzureNodePoolCallable() { + return stub.getAzureNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
+   *   for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureNodePoolsPagedResponse listAzureNodePools(AzureClusterName parent) { + ListAzureNodePoolsRequest request = + ListAzureNodePoolsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAzureNodePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
+   *   for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent `AzureCluster` which owns this collection of + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + *

`AzureCluster` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAzureNodePoolsPagedResponse listAzureNodePools(String parent) { + ListAzureNodePoolsRequest request = + ListAzureNodePoolsRequest.newBuilder().setParent(parent).build(); + return listAzureNodePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureNodePoolsRequest request =
+   *       ListAzureNodePoolsRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AzureNodePool element : azureClustersClient.listAzureNodePools(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 ListAzureNodePoolsPagedResponse listAzureNodePools( + ListAzureNodePoolsRequest request) { + return listAzureNodePoolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureNodePoolsRequest request =
+   *       ListAzureNodePoolsRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.listAzureNodePoolsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AzureNodePool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureNodePoolsPagedCallable() { + return stub.listAzureNodePoolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given + * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   ListAzureNodePoolsRequest request =
+   *       ListAzureNodePoolsRequest.newBuilder()
+   *           .setParent(
+   *               AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAzureNodePoolsResponse response =
+   *         azureClustersClient.listAzureNodePoolsCallable().call(request);
+   *     for (AzureNodePool element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAzureNodePoolsCallable() { + return stub.listAzureNodePoolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureNodePoolName name =
+   *       AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
+   *   azureClustersClient.deleteAzureNodePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + *

`AzureNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureNodePoolAsync( + AzureNodePoolName name) { + DeleteAzureNodePoolRequest request = + DeleteAzureNodePoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAzureNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name =
+   *       AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *           .toString();
+   *   azureClustersClient.deleteAzureNodePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name the + * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + *

`AzureNodePool` names are formatted as + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAzureNodePoolAsync(String name) { + DeleteAzureNodePoolRequest request = + DeleteAzureNodePoolRequest.newBuilder().setName(name).build(); + return deleteAzureNodePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureNodePoolRequest request =
+   *       DeleteAzureNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AzureNodePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   azureClustersClient.deleteAzureNodePoolAsync(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 deleteAzureNodePoolAsync( + DeleteAzureNodePoolRequest request) { + return deleteAzureNodePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureNodePoolRequest request =
+   *       DeleteAzureNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AzureNodePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       azureClustersClient.deleteAzureNodePoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAzureNodePoolOperationCallable() { + return stub.deleteAzureNodePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + * + *

If successful, the response contains a newly created + * [Operation][google.longrunning.Operation] resource that can be described to track the status of + * the operation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   DeleteAzureNodePoolRequest request =
+   *       DeleteAzureNodePoolRequest.newBuilder()
+   *           .setName(
+   *               AzureNodePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
+   *                   .toString())
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.deleteAzureNodePoolCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAzureNodePoolCallable() { + return stub.deleteAzureNodePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported Azure regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   AzureServerConfigName name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]");
+   *   AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + *

`AzureServerConfig` names are formatted as + * `projects/<project-id>/locations/<region>/azureServerConfig`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureServerConfig getAzureServerConfig(AzureServerConfigName name) { + GetAzureServerConfigRequest request = + GetAzureServerConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAzureServerConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported Azure regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   String name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the + * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + *

`AzureServerConfig` names are formatted as + * `projects/<project-id>/locations/<region>/azureServerConfig`. + *

See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more + * details on Google Cloud resource names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AzureServerConfig getAzureServerConfig(String name) { + GetAzureServerConfigRequest request = + GetAzureServerConfigRequest.newBuilder().setName(name).build(); + return getAzureServerConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported Azure regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureServerConfigRequest request =
+   *       GetAzureServerConfigRequest.newBuilder()
+   *           .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   AzureServerConfig response = azureClustersClient.getAzureServerConfig(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 AzureServerConfig getAzureServerConfig(GetAzureServerConfigRequest request) { + return getAzureServerConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns information, such as supported Azure regions and Kubernetes versions, on a given Google + * Cloud location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+   *   GetAzureServerConfigRequest request =
+   *       GetAzureServerConfigRequest.newBuilder()
+   *           .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       azureClustersClient.getAzureServerConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AzureServerConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAzureServerConfigCallable() { + return stub.getAzureServerConfigCallable(); + } + + @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 ListAzureClientsPagedResponse + extends AbstractPagedListResponse< + ListAzureClientsRequest, + ListAzureClientsResponse, + AzureClient, + ListAzureClientsPage, + ListAzureClientsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAzureClientsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAzureClientsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAzureClientsPagedResponse(ListAzureClientsPage page) { + super(page, ListAzureClientsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAzureClientsPage + extends AbstractPage< + ListAzureClientsRequest, ListAzureClientsResponse, AzureClient, ListAzureClientsPage> { + + private ListAzureClientsPage( + PageContext context, + ListAzureClientsResponse response) { + super(context, response); + } + + private static ListAzureClientsPage createEmptyPage() { + return new ListAzureClientsPage(null, null); + } + + @Override + protected ListAzureClientsPage createPage( + PageContext context, + ListAzureClientsResponse response) { + return new ListAzureClientsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAzureClientsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAzureClientsRequest, + ListAzureClientsResponse, + AzureClient, + ListAzureClientsPage, + ListAzureClientsFixedSizeCollection> { + + private ListAzureClientsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAzureClientsFixedSizeCollection createEmptyCollection() { + return new ListAzureClientsFixedSizeCollection(null, 0); + } + + @Override + protected ListAzureClientsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAzureClientsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAzureClustersPagedResponse + extends AbstractPagedListResponse< + ListAzureClustersRequest, + ListAzureClustersResponse, + AzureCluster, + ListAzureClustersPage, + ListAzureClustersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAzureClustersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAzureClustersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAzureClustersPagedResponse(ListAzureClustersPage page) { + super(page, ListAzureClustersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAzureClustersPage + extends AbstractPage< + ListAzureClustersRequest, + ListAzureClustersResponse, + AzureCluster, + ListAzureClustersPage> { + + private ListAzureClustersPage( + PageContext context, + ListAzureClustersResponse response) { + super(context, response); + } + + private static ListAzureClustersPage createEmptyPage() { + return new ListAzureClustersPage(null, null); + } + + @Override + protected ListAzureClustersPage createPage( + PageContext context, + ListAzureClustersResponse response) { + return new ListAzureClustersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAzureClustersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAzureClustersRequest, + ListAzureClustersResponse, + AzureCluster, + ListAzureClustersPage, + ListAzureClustersFixedSizeCollection> { + + private ListAzureClustersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAzureClustersFixedSizeCollection createEmptyCollection() { + return new ListAzureClustersFixedSizeCollection(null, 0); + } + + @Override + protected ListAzureClustersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAzureClustersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAzureNodePoolsPagedResponse + extends AbstractPagedListResponse< + ListAzureNodePoolsRequest, + ListAzureNodePoolsResponse, + AzureNodePool, + ListAzureNodePoolsPage, + ListAzureNodePoolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAzureNodePoolsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAzureNodePoolsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAzureNodePoolsPagedResponse(ListAzureNodePoolsPage page) { + super(page, ListAzureNodePoolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAzureNodePoolsPage + extends AbstractPage< + ListAzureNodePoolsRequest, + ListAzureNodePoolsResponse, + AzureNodePool, + ListAzureNodePoolsPage> { + + private ListAzureNodePoolsPage( + PageContext context, + ListAzureNodePoolsResponse response) { + super(context, response); + } + + private static ListAzureNodePoolsPage createEmptyPage() { + return new ListAzureNodePoolsPage(null, null); + } + + @Override + protected ListAzureNodePoolsPage createPage( + PageContext context, + ListAzureNodePoolsResponse response) { + return new ListAzureNodePoolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAzureNodePoolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAzureNodePoolsRequest, + ListAzureNodePoolsResponse, + AzureNodePool, + ListAzureNodePoolsPage, + ListAzureNodePoolsFixedSizeCollection> { + + private ListAzureNodePoolsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAzureNodePoolsFixedSizeCollection createEmptyCollection() { + return new ListAzureNodePoolsFixedSizeCollection(null, 0); + } + + @Override + protected ListAzureNodePoolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAzureNodePoolsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersSettings.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersSettings.java new file mode 100644 index 0000000..9d08bfd --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersSettings.java @@ -0,0 +1,465 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClientsPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureNodePoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.gkemulticloud.v1.stub.AzureClustersStubSettings; +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 AzureClustersClient}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AzureClustersSettings.Builder azureClustersSettingsBuilder = AzureClustersSettings.newBuilder();
+ * azureClustersSettingsBuilder
+ *     .getAzureClientSettings()
+ *     .setRetrySettings(
+ *         azureClustersSettingsBuilder
+ *             .getAzureClientSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AzureClustersSettings azureClustersSettings = azureClustersSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AzureClustersSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createAzureClient. */ + public UnaryCallSettings createAzureClientSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureClientSettings(); + } + + /** Returns the object with the settings used for calls to createAzureClient. */ + public OperationCallSettings + createAzureClientOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureClientOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAzureClient. */ + public UnaryCallSettings getAzureClientSettings() { + return ((AzureClustersStubSettings) getStubSettings()).getAzureClientSettings(); + } + + /** Returns the object with the settings used for calls to listAzureClients. */ + public PagedCallSettings< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings() { + return ((AzureClustersStubSettings) getStubSettings()).listAzureClientsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureClient. */ + public UnaryCallSettings deleteAzureClientSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureClientSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureClient. */ + public OperationCallSettings + deleteAzureClientOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureClientOperationSettings(); + } + + /** Returns the object with the settings used for calls to createAzureCluster. */ + public UnaryCallSettings createAzureClusterSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureClusterSettings(); + } + + /** Returns the object with the settings used for calls to createAzureCluster. */ + public OperationCallSettings + createAzureClusterOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAzureCluster. */ + public UnaryCallSettings updateAzureClusterSettings() { + return ((AzureClustersStubSettings) getStubSettings()).updateAzureClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateAzureCluster. */ + public OperationCallSettings + updateAzureClusterOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).updateAzureClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAzureCluster. */ + public UnaryCallSettings getAzureClusterSettings() { + return ((AzureClustersStubSettings) getStubSettings()).getAzureClusterSettings(); + } + + /** Returns the object with the settings used for calls to listAzureClusters. */ + public PagedCallSettings< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings() { + return ((AzureClustersStubSettings) getStubSettings()).listAzureClustersSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureCluster. */ + public UnaryCallSettings deleteAzureClusterSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureClusterSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureCluster. */ + public OperationCallSettings + deleteAzureClusterOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateAzureAccessToken. */ + public UnaryCallSettings + generateAzureAccessTokenSettings() { + return ((AzureClustersStubSettings) getStubSettings()).generateAzureAccessTokenSettings(); + } + + /** Returns the object with the settings used for calls to createAzureNodePool. */ + public UnaryCallSettings createAzureNodePoolSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to createAzureNodePool. */ + public OperationCallSettings + createAzureNodePoolOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).createAzureNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAzureNodePool. */ + public UnaryCallSettings updateAzureNodePoolSettings() { + return ((AzureClustersStubSettings) getStubSettings()).updateAzureNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to updateAzureNodePool. */ + public OperationCallSettings + updateAzureNodePoolOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).updateAzureNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAzureNodePool. */ + public UnaryCallSettings getAzureNodePoolSettings() { + return ((AzureClustersStubSettings) getStubSettings()).getAzureNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to listAzureNodePools. */ + public PagedCallSettings< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings() { + return ((AzureClustersStubSettings) getStubSettings()).listAzureNodePoolsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureNodePool. */ + public UnaryCallSettings deleteAzureNodePoolSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureNodePoolSettings(); + } + + /** Returns the object with the settings used for calls to deleteAzureNodePool. */ + public OperationCallSettings + deleteAzureNodePoolOperationSettings() { + return ((AzureClustersStubSettings) getStubSettings()).deleteAzureNodePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAzureServerConfig. */ + public UnaryCallSettings + getAzureServerConfigSettings() { + return ((AzureClustersStubSettings) getStubSettings()).getAzureServerConfigSettings(); + } + + public static final AzureClustersSettings create(AzureClustersStubSettings stub) + throws IOException { + return new AzureClustersSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AzureClustersStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AzureClustersStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AzureClustersStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AzureClustersStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AzureClustersStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AzureClustersStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AzureClustersStubSettings.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 AzureClustersSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AzureClustersSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AzureClustersStubSettings.newBuilder(clientContext)); + } + + protected Builder(AzureClustersSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AzureClustersStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AzureClustersStubSettings.newBuilder()); + } + + public AzureClustersStubSettings.Builder getStubSettingsBuilder() { + return ((AzureClustersStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createAzureClient. */ + public UnaryCallSettings.Builder + createAzureClientSettings() { + return getStubSettingsBuilder().createAzureClientSettings(); + } + + /** Returns the builder for the settings used for calls to createAzureClient. */ + public OperationCallSettings.Builder + createAzureClientOperationSettings() { + return getStubSettingsBuilder().createAzureClientOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAzureClient. */ + public UnaryCallSettings.Builder getAzureClientSettings() { + return getStubSettingsBuilder().getAzureClientSettings(); + } + + /** Returns the builder for the settings used for calls to listAzureClients. */ + public PagedCallSettings.Builder< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings() { + return getStubSettingsBuilder().listAzureClientsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureClient. */ + public UnaryCallSettings.Builder + deleteAzureClientSettings() { + return getStubSettingsBuilder().deleteAzureClientSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureClient. */ + public OperationCallSettings.Builder + deleteAzureClientOperationSettings() { + return getStubSettingsBuilder().deleteAzureClientOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createAzureCluster. */ + public UnaryCallSettings.Builder + createAzureClusterSettings() { + return getStubSettingsBuilder().createAzureClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createAzureCluster. */ + public OperationCallSettings.Builder + createAzureClusterOperationSettings() { + return getStubSettingsBuilder().createAzureClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAzureCluster. */ + public UnaryCallSettings.Builder + updateAzureClusterSettings() { + return getStubSettingsBuilder().updateAzureClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateAzureCluster. */ + public OperationCallSettings.Builder + updateAzureClusterOperationSettings() { + return getStubSettingsBuilder().updateAzureClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAzureCluster. */ + public UnaryCallSettings.Builder + getAzureClusterSettings() { + return getStubSettingsBuilder().getAzureClusterSettings(); + } + + /** Returns the builder for the settings used for calls to listAzureClusters. */ + public PagedCallSettings.Builder< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings() { + return getStubSettingsBuilder().listAzureClustersSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureCluster. */ + public UnaryCallSettings.Builder + deleteAzureClusterSettings() { + return getStubSettingsBuilder().deleteAzureClusterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureCluster. */ + public OperationCallSettings.Builder + deleteAzureClusterOperationSettings() { + return getStubSettingsBuilder().deleteAzureClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateAzureAccessToken. */ + public UnaryCallSettings.Builder< + GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse> + generateAzureAccessTokenSettings() { + return getStubSettingsBuilder().generateAzureAccessTokenSettings(); + } + + /** Returns the builder for the settings used for calls to createAzureNodePool. */ + public UnaryCallSettings.Builder + createAzureNodePoolSettings() { + return getStubSettingsBuilder().createAzureNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to createAzureNodePool. */ + public OperationCallSettings.Builder< + CreateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + createAzureNodePoolOperationSettings() { + return getStubSettingsBuilder().createAzureNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAzureNodePool. */ + public UnaryCallSettings.Builder + updateAzureNodePoolSettings() { + return getStubSettingsBuilder().updateAzureNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to updateAzureNodePool. */ + public OperationCallSettings.Builder< + UpdateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + updateAzureNodePoolOperationSettings() { + return getStubSettingsBuilder().updateAzureNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAzureNodePool. */ + public UnaryCallSettings.Builder + getAzureNodePoolSettings() { + return getStubSettingsBuilder().getAzureNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to listAzureNodePools. */ + public PagedCallSettings.Builder< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings() { + return getStubSettingsBuilder().listAzureNodePoolsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureNodePool. */ + public UnaryCallSettings.Builder + deleteAzureNodePoolSettings() { + return getStubSettingsBuilder().deleteAzureNodePoolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAzureNodePool. */ + public OperationCallSettings.Builder + deleteAzureNodePoolOperationSettings() { + return getStubSettingsBuilder().deleteAzureNodePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAzureServerConfig. */ + public UnaryCallSettings.Builder + getAzureServerConfigSettings() { + return getStubSettingsBuilder().getAzureServerConfigSettings(); + } + + @Override + public AzureClustersSettings build() throws IOException { + return new AzureClustersSettings(this); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json new file mode 100644 index 0000000..1609289 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json @@ -0,0 +1,111 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.gkemulticloud.v1", + "libraryPackage": "com.google.cloud.gkemulticloud.v1", + "services": { + "AwsClusters": { + "clients": { + "grpc": { + "libraryClient": "AwsClustersClient", + "rpcs": { + "CreateAwsCluster": { + "methods": ["createAwsClusterAsync", "createAwsClusterAsync", "createAwsClusterAsync", "createAwsClusterOperationCallable", "createAwsClusterCallable"] + }, + "CreateAwsNodePool": { + "methods": ["createAwsNodePoolAsync", "createAwsNodePoolAsync", "createAwsNodePoolAsync", "createAwsNodePoolOperationCallable", "createAwsNodePoolCallable"] + }, + "DeleteAwsCluster": { + "methods": ["deleteAwsClusterAsync", "deleteAwsClusterAsync", "deleteAwsClusterAsync", "deleteAwsClusterOperationCallable", "deleteAwsClusterCallable"] + }, + "DeleteAwsNodePool": { + "methods": ["deleteAwsNodePoolAsync", "deleteAwsNodePoolAsync", "deleteAwsNodePoolAsync", "deleteAwsNodePoolOperationCallable", "deleteAwsNodePoolCallable"] + }, + "GenerateAwsAccessToken": { + "methods": ["generateAwsAccessToken", "generateAwsAccessTokenCallable"] + }, + "GetAwsCluster": { + "methods": ["getAwsCluster", "getAwsCluster", "getAwsCluster", "getAwsClusterCallable"] + }, + "GetAwsNodePool": { + "methods": ["getAwsNodePool", "getAwsNodePool", "getAwsNodePool", "getAwsNodePoolCallable"] + }, + "GetAwsServerConfig": { + "methods": ["getAwsServerConfig", "getAwsServerConfig", "getAwsServerConfig", "getAwsServerConfigCallable"] + }, + "ListAwsClusters": { + "methods": ["listAwsClusters", "listAwsClusters", "listAwsClusters", "listAwsClustersPagedCallable", "listAwsClustersCallable"] + }, + "ListAwsNodePools": { + "methods": ["listAwsNodePools", "listAwsNodePools", "listAwsNodePools", "listAwsNodePoolsPagedCallable", "listAwsNodePoolsCallable"] + }, + "UpdateAwsCluster": { + "methods": ["updateAwsClusterAsync", "updateAwsClusterAsync", "updateAwsClusterOperationCallable", "updateAwsClusterCallable"] + }, + "UpdateAwsNodePool": { + "methods": ["updateAwsNodePoolAsync", "updateAwsNodePoolAsync", "updateAwsNodePoolOperationCallable", "updateAwsNodePoolCallable"] + } + } + } + } + }, + "AzureClusters": { + "clients": { + "grpc": { + "libraryClient": "AzureClustersClient", + "rpcs": { + "CreateAzureClient": { + "methods": ["createAzureClientAsync", "createAzureClientAsync", "createAzureClientAsync", "createAzureClientOperationCallable", "createAzureClientCallable"] + }, + "CreateAzureCluster": { + "methods": ["createAzureClusterAsync", "createAzureClusterAsync", "createAzureClusterAsync", "createAzureClusterOperationCallable", "createAzureClusterCallable"] + }, + "CreateAzureNodePool": { + "methods": ["createAzureNodePoolAsync", "createAzureNodePoolAsync", "createAzureNodePoolAsync", "createAzureNodePoolOperationCallable", "createAzureNodePoolCallable"] + }, + "DeleteAzureClient": { + "methods": ["deleteAzureClientAsync", "deleteAzureClientAsync", "deleteAzureClientAsync", "deleteAzureClientOperationCallable", "deleteAzureClientCallable"] + }, + "DeleteAzureCluster": { + "methods": ["deleteAzureClusterAsync", "deleteAzureClusterAsync", "deleteAzureClusterAsync", "deleteAzureClusterOperationCallable", "deleteAzureClusterCallable"] + }, + "DeleteAzureNodePool": { + "methods": ["deleteAzureNodePoolAsync", "deleteAzureNodePoolAsync", "deleteAzureNodePoolAsync", "deleteAzureNodePoolOperationCallable", "deleteAzureNodePoolCallable"] + }, + "GenerateAzureAccessToken": { + "methods": ["generateAzureAccessToken", "generateAzureAccessTokenCallable"] + }, + "GetAzureClient": { + "methods": ["getAzureClient", "getAzureClient", "getAzureClient", "getAzureClientCallable"] + }, + "GetAzureCluster": { + "methods": ["getAzureCluster", "getAzureCluster", "getAzureCluster", "getAzureClusterCallable"] + }, + "GetAzureNodePool": { + "methods": ["getAzureNodePool", "getAzureNodePool", "getAzureNodePool", "getAzureNodePoolCallable"] + }, + "GetAzureServerConfig": { + "methods": ["getAzureServerConfig", "getAzureServerConfig", "getAzureServerConfig", "getAzureServerConfigCallable"] + }, + "ListAzureClients": { + "methods": ["listAzureClients", "listAzureClients", "listAzureClients", "listAzureClientsPagedCallable", "listAzureClientsCallable"] + }, + "ListAzureClusters": { + "methods": ["listAzureClusters", "listAzureClusters", "listAzureClusters", "listAzureClustersPagedCallable", "listAzureClustersCallable"] + }, + "ListAzureNodePools": { + "methods": ["listAzureNodePools", "listAzureNodePools", "listAzureNodePools", "listAzureNodePoolsPagedCallable", "listAzureNodePoolsCallable"] + }, + "UpdateAzureCluster": { + "methods": ["updateAzureClusterAsync", "updateAzureClusterAsync", "updateAzureClusterOperationCallable", "updateAzureClusterCallable"] + }, + "UpdateAzureNodePool": { + "methods": ["updateAzureNodePoolAsync", "updateAzureNodePoolAsync", "updateAzureNodePoolOperationCallable", "updateAzureNodePoolCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java new file mode 100644 index 0000000..c018bf9 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Anthos Multi-Cloud API + * + *

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

======================= AwsClustersClient ======================= + * + *

Service Description: The AwsClusters API provides a single centrally managed service to create + * and manage Anthos clusters that run on AWS infrastructure. + * + *

Sample for AwsClustersClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
+ *   AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
+ *   AwsCluster response = awsClustersClient.getAwsCluster(name);
+ * }
+ * }
+ * + *

======================= AzureClustersClient ======================= + * + *

Service Description: The AzureClusters API provides a single centrally managed service to + * create and manage Anthos clusters that run on Azure infrastructure. + * + *

Sample for AzureClustersClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
+ *   AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
+ *   AzureClient response = azureClustersClient.getAzureClient(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.gkemulticloud.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStub.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStub.java new file mode 100644 index 0000000..fac79eb --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStub.java @@ -0,0 +1,157 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsNodePoolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AwsCluster; +import com.google.cloud.gkemulticloud.v1.AwsNodePool; +import com.google.cloud.gkemulticloud.v1.AwsServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest; +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 AwsClusters service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AwsClustersStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createAwsClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createAwsClusterOperationCallable()"); + } + + public UnaryCallable createAwsClusterCallable() { + throw new UnsupportedOperationException("Not implemented: createAwsClusterCallable()"); + } + + public OperationCallable + updateAwsClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateAwsClusterOperationCallable()"); + } + + public UnaryCallable updateAwsClusterCallable() { + throw new UnsupportedOperationException("Not implemented: updateAwsClusterCallable()"); + } + + public UnaryCallable getAwsClusterCallable() { + throw new UnsupportedOperationException("Not implemented: getAwsClusterCallable()"); + } + + public UnaryCallable + listAwsClustersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAwsClustersPagedCallable()"); + } + + public UnaryCallable listAwsClustersCallable() { + throw new UnsupportedOperationException("Not implemented: listAwsClustersCallable()"); + } + + public OperationCallable + deleteAwsClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAwsClusterOperationCallable()"); + } + + public UnaryCallable deleteAwsClusterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAwsClusterCallable()"); + } + + public UnaryCallable + generateAwsAccessTokenCallable() { + throw new UnsupportedOperationException("Not implemented: generateAwsAccessTokenCallable()"); + } + + public OperationCallable + createAwsNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAwsNodePoolOperationCallable()"); + } + + public UnaryCallable createAwsNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: createAwsNodePoolCallable()"); + } + + public OperationCallable + updateAwsNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAwsNodePoolOperationCallable()"); + } + + public UnaryCallable updateAwsNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: updateAwsNodePoolCallable()"); + } + + public UnaryCallable getAwsNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: getAwsNodePoolCallable()"); + } + + public UnaryCallable + listAwsNodePoolsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAwsNodePoolsPagedCallable()"); + } + + public UnaryCallable + listAwsNodePoolsCallable() { + throw new UnsupportedOperationException("Not implemented: listAwsNodePoolsCallable()"); + } + + public OperationCallable + deleteAwsNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAwsNodePoolOperationCallable()"); + } + + public UnaryCallable deleteAwsNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAwsNodePoolCallable()"); + } + + public UnaryCallable getAwsServerConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getAwsServerConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStubSettings.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStubSettings.java new file mode 100644 index 0000000..eeaa39c --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AwsClustersStubSettings.java @@ -0,0 +1,992 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsNodePoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AwsCluster; +import com.google.cloud.gkemulticloud.v1.AwsNodePool; +import com.google.cloud.gkemulticloud.v1.AwsServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest; +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 AwsClustersStub}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AwsClustersStubSettings.Builder awsClustersSettingsBuilder =
+ *     AwsClustersStubSettings.newBuilder();
+ * awsClustersSettingsBuilder
+ *     .getAwsClusterSettings()
+ *     .setRetrySettings(
+ *         awsClustersSettingsBuilder
+ *             .getAwsClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AwsClustersStubSettings awsClustersSettings = awsClustersSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AwsClustersStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createAwsClusterSettings; + private final OperationCallSettings + createAwsClusterOperationSettings; + private final UnaryCallSettings updateAwsClusterSettings; + private final OperationCallSettings + updateAwsClusterOperationSettings; + private final UnaryCallSettings getAwsClusterSettings; + private final PagedCallSettings< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings; + private final UnaryCallSettings deleteAwsClusterSettings; + private final OperationCallSettings + deleteAwsClusterOperationSettings; + private final UnaryCallSettings + generateAwsAccessTokenSettings; + private final UnaryCallSettings createAwsNodePoolSettings; + private final OperationCallSettings + createAwsNodePoolOperationSettings; + private final UnaryCallSettings updateAwsNodePoolSettings; + private final OperationCallSettings + updateAwsNodePoolOperationSettings; + private final UnaryCallSettings getAwsNodePoolSettings; + private final PagedCallSettings< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings; + private final UnaryCallSettings deleteAwsNodePoolSettings; + private final OperationCallSettings + deleteAwsNodePoolOperationSettings; + private final UnaryCallSettings + getAwsServerConfigSettings; + + private static final PagedListDescriptor< + ListAwsClustersRequest, ListAwsClustersResponse, AwsCluster> + LIST_AWS_CLUSTERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAwsClustersRequest injectToken( + ListAwsClustersRequest payload, String token) { + return ListAwsClustersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAwsClustersRequest injectPageSize( + ListAwsClustersRequest payload, int pageSize) { + return ListAwsClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAwsClustersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAwsClustersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAwsClustersResponse payload) { + return payload.getAwsClustersList() == null + ? ImmutableList.of() + : payload.getAwsClustersList(); + } + }; + + private static final PagedListDescriptor< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, AwsNodePool> + LIST_AWS_NODE_POOLS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, AwsNodePool>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAwsNodePoolsRequest injectToken( + ListAwsNodePoolsRequest payload, String token) { + return ListAwsNodePoolsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAwsNodePoolsRequest injectPageSize( + ListAwsNodePoolsRequest payload, int pageSize) { + return ListAwsNodePoolsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAwsNodePoolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAwsNodePoolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAwsNodePoolsResponse payload) { + return payload.getAwsNodePoolsList() == null + ? ImmutableList.of() + : payload.getAwsNodePoolsList(); + } + }; + + private static final PagedListResponseFactory< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + LIST_AWS_CLUSTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAwsClustersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_AWS_CLUSTERS_PAGE_STR_DESC, request, context); + return ListAwsClustersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + LIST_AWS_NODE_POOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAwsNodePoolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AWS_NODE_POOLS_PAGE_STR_DESC, request, context); + return ListAwsNodePoolsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createAwsCluster. */ + public UnaryCallSettings createAwsClusterSettings() { + return createAwsClusterSettings; + } + + /** Returns the object with the settings used for calls to createAwsCluster. */ + public OperationCallSettings + createAwsClusterOperationSettings() { + return createAwsClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAwsCluster. */ + public UnaryCallSettings updateAwsClusterSettings() { + return updateAwsClusterSettings; + } + + /** Returns the object with the settings used for calls to updateAwsCluster. */ + public OperationCallSettings + updateAwsClusterOperationSettings() { + return updateAwsClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to getAwsCluster. */ + public UnaryCallSettings getAwsClusterSettings() { + return getAwsClusterSettings; + } + + /** Returns the object with the settings used for calls to listAwsClusters. */ + public PagedCallSettings< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings() { + return listAwsClustersSettings; + } + + /** Returns the object with the settings used for calls to deleteAwsCluster. */ + public UnaryCallSettings deleteAwsClusterSettings() { + return deleteAwsClusterSettings; + } + + /** Returns the object with the settings used for calls to deleteAwsCluster. */ + public OperationCallSettings + deleteAwsClusterOperationSettings() { + return deleteAwsClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to generateAwsAccessToken. */ + public UnaryCallSettings + generateAwsAccessTokenSettings() { + return generateAwsAccessTokenSettings; + } + + /** Returns the object with the settings used for calls to createAwsNodePool. */ + public UnaryCallSettings createAwsNodePoolSettings() { + return createAwsNodePoolSettings; + } + + /** Returns the object with the settings used for calls to createAwsNodePool. */ + public OperationCallSettings + createAwsNodePoolOperationSettings() { + return createAwsNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAwsNodePool. */ + public UnaryCallSettings updateAwsNodePoolSettings() { + return updateAwsNodePoolSettings; + } + + /** Returns the object with the settings used for calls to updateAwsNodePool. */ + public OperationCallSettings + updateAwsNodePoolOperationSettings() { + return updateAwsNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getAwsNodePool. */ + public UnaryCallSettings getAwsNodePoolSettings() { + return getAwsNodePoolSettings; + } + + /** Returns the object with the settings used for calls to listAwsNodePools. */ + public PagedCallSettings< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings() { + return listAwsNodePoolsSettings; + } + + /** Returns the object with the settings used for calls to deleteAwsNodePool. */ + public UnaryCallSettings deleteAwsNodePoolSettings() { + return deleteAwsNodePoolSettings; + } + + /** Returns the object with the settings used for calls to deleteAwsNodePool. */ + public OperationCallSettings + deleteAwsNodePoolOperationSettings() { + return deleteAwsNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getAwsServerConfig. */ + public UnaryCallSettings + getAwsServerConfigSettings() { + return getAwsServerConfigSettings; + } + + public AwsClustersStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAwsClustersStub.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 "gkemulticloud.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "gkemulticloud.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default 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(AwsClustersStubSettings.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 AwsClustersStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createAwsClusterSettings = settingsBuilder.createAwsClusterSettings().build(); + createAwsClusterOperationSettings = settingsBuilder.createAwsClusterOperationSettings().build(); + updateAwsClusterSettings = settingsBuilder.updateAwsClusterSettings().build(); + updateAwsClusterOperationSettings = settingsBuilder.updateAwsClusterOperationSettings().build(); + getAwsClusterSettings = settingsBuilder.getAwsClusterSettings().build(); + listAwsClustersSettings = settingsBuilder.listAwsClustersSettings().build(); + deleteAwsClusterSettings = settingsBuilder.deleteAwsClusterSettings().build(); + deleteAwsClusterOperationSettings = settingsBuilder.deleteAwsClusterOperationSettings().build(); + generateAwsAccessTokenSettings = settingsBuilder.generateAwsAccessTokenSettings().build(); + createAwsNodePoolSettings = settingsBuilder.createAwsNodePoolSettings().build(); + createAwsNodePoolOperationSettings = + settingsBuilder.createAwsNodePoolOperationSettings().build(); + updateAwsNodePoolSettings = settingsBuilder.updateAwsNodePoolSettings().build(); + updateAwsNodePoolOperationSettings = + settingsBuilder.updateAwsNodePoolOperationSettings().build(); + getAwsNodePoolSettings = settingsBuilder.getAwsNodePoolSettings().build(); + listAwsNodePoolsSettings = settingsBuilder.listAwsNodePoolsSettings().build(); + deleteAwsNodePoolSettings = settingsBuilder.deleteAwsNodePoolSettings().build(); + deleteAwsNodePoolOperationSettings = + settingsBuilder.deleteAwsNodePoolOperationSettings().build(); + getAwsServerConfigSettings = settingsBuilder.getAwsServerConfigSettings().build(); + } + + /** Builder for AwsClustersStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createAwsClusterSettings; + private final OperationCallSettings.Builder< + CreateAwsClusterRequest, AwsCluster, OperationMetadata> + createAwsClusterOperationSettings; + private final UnaryCallSettings.Builder + updateAwsClusterSettings; + private final OperationCallSettings.Builder< + UpdateAwsClusterRequest, AwsCluster, OperationMetadata> + updateAwsClusterOperationSettings; + private final UnaryCallSettings.Builder getAwsClusterSettings; + private final PagedCallSettings.Builder< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings; + private final UnaryCallSettings.Builder + deleteAwsClusterSettings; + private final OperationCallSettings.Builder + deleteAwsClusterOperationSettings; + private final UnaryCallSettings.Builder< + GenerateAwsAccessTokenRequest, GenerateAwsAccessTokenResponse> + generateAwsAccessTokenSettings; + private final UnaryCallSettings.Builder + createAwsNodePoolSettings; + private final OperationCallSettings.Builder< + CreateAwsNodePoolRequest, AwsNodePool, OperationMetadata> + createAwsNodePoolOperationSettings; + private final UnaryCallSettings.Builder + updateAwsNodePoolSettings; + private final OperationCallSettings.Builder< + UpdateAwsNodePoolRequest, AwsNodePool, OperationMetadata> + updateAwsNodePoolOperationSettings; + private final UnaryCallSettings.Builder + getAwsNodePoolSettings; + private final PagedCallSettings.Builder< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings; + private final UnaryCallSettings.Builder + deleteAwsNodePoolSettings; + private final OperationCallSettings.Builder + deleteAwsNodePoolOperationSettings; + private final UnaryCallSettings.Builder + getAwsServerConfigSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createAwsClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAwsClusterOperationSettings = OperationCallSettings.newBuilder(); + updateAwsClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAwsClusterOperationSettings = OperationCallSettings.newBuilder(); + getAwsClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAwsClustersSettings = PagedCallSettings.newBuilder(LIST_AWS_CLUSTERS_PAGE_STR_FACT); + deleteAwsClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAwsClusterOperationSettings = OperationCallSettings.newBuilder(); + generateAwsAccessTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAwsNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAwsNodePoolOperationSettings = OperationCallSettings.newBuilder(); + updateAwsNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAwsNodePoolOperationSettings = OperationCallSettings.newBuilder(); + getAwsNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAwsNodePoolsSettings = PagedCallSettings.newBuilder(LIST_AWS_NODE_POOLS_PAGE_STR_FACT); + deleteAwsNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAwsNodePoolOperationSettings = OperationCallSettings.newBuilder(); + getAwsServerConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAwsClusterSettings, + updateAwsClusterSettings, + getAwsClusterSettings, + listAwsClustersSettings, + deleteAwsClusterSettings, + generateAwsAccessTokenSettings, + createAwsNodePoolSettings, + updateAwsNodePoolSettings, + getAwsNodePoolSettings, + listAwsNodePoolsSettings, + deleteAwsNodePoolSettings, + getAwsServerConfigSettings); + initDefaults(this); + } + + protected Builder(AwsClustersStubSettings settings) { + super(settings); + + createAwsClusterSettings = settings.createAwsClusterSettings.toBuilder(); + createAwsClusterOperationSettings = settings.createAwsClusterOperationSettings.toBuilder(); + updateAwsClusterSettings = settings.updateAwsClusterSettings.toBuilder(); + updateAwsClusterOperationSettings = settings.updateAwsClusterOperationSettings.toBuilder(); + getAwsClusterSettings = settings.getAwsClusterSettings.toBuilder(); + listAwsClustersSettings = settings.listAwsClustersSettings.toBuilder(); + deleteAwsClusterSettings = settings.deleteAwsClusterSettings.toBuilder(); + deleteAwsClusterOperationSettings = settings.deleteAwsClusterOperationSettings.toBuilder(); + generateAwsAccessTokenSettings = settings.generateAwsAccessTokenSettings.toBuilder(); + createAwsNodePoolSettings = settings.createAwsNodePoolSettings.toBuilder(); + createAwsNodePoolOperationSettings = settings.createAwsNodePoolOperationSettings.toBuilder(); + updateAwsNodePoolSettings = settings.updateAwsNodePoolSettings.toBuilder(); + updateAwsNodePoolOperationSettings = settings.updateAwsNodePoolOperationSettings.toBuilder(); + getAwsNodePoolSettings = settings.getAwsNodePoolSettings.toBuilder(); + listAwsNodePoolsSettings = settings.listAwsNodePoolsSettings.toBuilder(); + deleteAwsNodePoolSettings = settings.deleteAwsNodePoolSettings.toBuilder(); + deleteAwsNodePoolOperationSettings = settings.deleteAwsNodePoolOperationSettings.toBuilder(); + getAwsServerConfigSettings = settings.getAwsServerConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAwsClusterSettings, + updateAwsClusterSettings, + getAwsClusterSettings, + listAwsClustersSettings, + deleteAwsClusterSettings, + generateAwsAccessTokenSettings, + createAwsNodePoolSettings, + updateAwsNodePoolSettings, + getAwsNodePoolSettings, + listAwsNodePoolsSettings, + deleteAwsNodePoolSettings, + getAwsServerConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createAwsClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAwsClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAwsClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAwsClustersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAwsClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .generateAwsAccessTokenSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAwsNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAwsNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAwsNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAwsNodePoolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAwsNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAwsServerConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAwsClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AwsCluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAwsClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AwsCluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAwsClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createAwsNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AwsNodePool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAwsNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AwsNodePool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAwsNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createAwsCluster. */ + public UnaryCallSettings.Builder + createAwsClusterSettings() { + return createAwsClusterSettings; + } + + /** Returns the builder for the settings used for calls to createAwsCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createAwsClusterOperationSettings() { + return createAwsClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAwsCluster. */ + public UnaryCallSettings.Builder + updateAwsClusterSettings() { + return updateAwsClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateAwsCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateAwsClusterOperationSettings() { + return updateAwsClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAwsCluster. */ + public UnaryCallSettings.Builder getAwsClusterSettings() { + return getAwsClusterSettings; + } + + /** Returns the builder for the settings used for calls to listAwsClusters. */ + public PagedCallSettings.Builder< + ListAwsClustersRequest, ListAwsClustersResponse, ListAwsClustersPagedResponse> + listAwsClustersSettings() { + return listAwsClustersSettings; + } + + /** Returns the builder for the settings used for calls to deleteAwsCluster. */ + public UnaryCallSettings.Builder + deleteAwsClusterSettings() { + return deleteAwsClusterSettings; + } + + /** Returns the builder for the settings used for calls to deleteAwsCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAwsClusterOperationSettings() { + return deleteAwsClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateAwsAccessToken. */ + public UnaryCallSettings.Builder + generateAwsAccessTokenSettings() { + return generateAwsAccessTokenSettings; + } + + /** Returns the builder for the settings used for calls to createAwsNodePool. */ + public UnaryCallSettings.Builder + createAwsNodePoolSettings() { + return createAwsNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to createAwsNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createAwsNodePoolOperationSettings() { + return createAwsNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAwsNodePool. */ + public UnaryCallSettings.Builder + updateAwsNodePoolSettings() { + return updateAwsNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to updateAwsNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateAwsNodePoolOperationSettings() { + return updateAwsNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAwsNodePool. */ + public UnaryCallSettings.Builder getAwsNodePoolSettings() { + return getAwsNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to listAwsNodePools. */ + public PagedCallSettings.Builder< + ListAwsNodePoolsRequest, ListAwsNodePoolsResponse, ListAwsNodePoolsPagedResponse> + listAwsNodePoolsSettings() { + return listAwsNodePoolsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAwsNodePool. */ + public UnaryCallSettings.Builder + deleteAwsNodePoolSettings() { + return deleteAwsNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to deleteAwsNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAwsNodePoolOperationSettings() { + return deleteAwsNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAwsServerConfig. */ + public UnaryCallSettings.Builder + getAwsServerConfigSettings() { + return getAwsServerConfigSettings; + } + + @Override + public AwsClustersStubSettings build() throws IOException { + return new AwsClustersStubSettings(this); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStub.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStub.java new file mode 100644 index 0000000..a3ade7e --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStub.java @@ -0,0 +1,203 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClientsPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureNodePoolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AzureClient; +import com.google.cloud.gkemulticloud.v1.AzureCluster; +import com.google.cloud.gkemulticloud.v1.AzureNodePool; +import com.google.cloud.gkemulticloud.v1.AzureServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest; +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 AzureClusters service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AzureClustersStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createAzureClientOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAzureClientOperationCallable()"); + } + + public UnaryCallable createAzureClientCallable() { + throw new UnsupportedOperationException("Not implemented: createAzureClientCallable()"); + } + + public UnaryCallable getAzureClientCallable() { + throw new UnsupportedOperationException("Not implemented: getAzureClientCallable()"); + } + + public UnaryCallable + listAzureClientsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureClientsPagedCallable()"); + } + + public UnaryCallable + listAzureClientsCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureClientsCallable()"); + } + + public OperationCallable + deleteAzureClientOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAzureClientOperationCallable()"); + } + + public UnaryCallable deleteAzureClientCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAzureClientCallable()"); + } + + public OperationCallable + createAzureClusterOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAzureClusterOperationCallable()"); + } + + public UnaryCallable createAzureClusterCallable() { + throw new UnsupportedOperationException("Not implemented: createAzureClusterCallable()"); + } + + public OperationCallable + updateAzureClusterOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAzureClusterOperationCallable()"); + } + + public UnaryCallable updateAzureClusterCallable() { + throw new UnsupportedOperationException("Not implemented: updateAzureClusterCallable()"); + } + + public UnaryCallable getAzureClusterCallable() { + throw new UnsupportedOperationException("Not implemented: getAzureClusterCallable()"); + } + + public UnaryCallable + listAzureClustersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureClustersPagedCallable()"); + } + + public UnaryCallable + listAzureClustersCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureClustersCallable()"); + } + + public OperationCallable + deleteAzureClusterOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAzureClusterOperationCallable()"); + } + + public UnaryCallable deleteAzureClusterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAzureClusterCallable()"); + } + + public UnaryCallable + generateAzureAccessTokenCallable() { + throw new UnsupportedOperationException("Not implemented: generateAzureAccessTokenCallable()"); + } + + public OperationCallable + createAzureNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAzureNodePoolOperationCallable()"); + } + + public UnaryCallable createAzureNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: createAzureNodePoolCallable()"); + } + + public OperationCallable + updateAzureNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAzureNodePoolOperationCallable()"); + } + + public UnaryCallable updateAzureNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: updateAzureNodePoolCallable()"); + } + + public UnaryCallable getAzureNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: getAzureNodePoolCallable()"); + } + + public UnaryCallable + listAzureNodePoolsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureNodePoolsPagedCallable()"); + } + + public UnaryCallable + listAzureNodePoolsCallable() { + throw new UnsupportedOperationException("Not implemented: listAzureNodePoolsCallable()"); + } + + public OperationCallable + deleteAzureNodePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAzureNodePoolOperationCallable()"); + } + + public UnaryCallable deleteAzureNodePoolCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAzureNodePoolCallable()"); + } + + public UnaryCallable + getAzureServerConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getAzureServerConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStubSettings.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStubSettings.java new file mode 100644 index 0000000..8d13287 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AzureClustersStubSettings.java @@ -0,0 +1,1279 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClientsPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureNodePoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AzureClient; +import com.google.cloud.gkemulticloud.v1.AzureCluster; +import com.google.cloud.gkemulticloud.v1.AzureNodePool; +import com.google.cloud.gkemulticloud.v1.AzureServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest; +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 AzureClustersStub}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AzureClustersStubSettings.Builder azureClustersSettingsBuilder =
+ *     AzureClustersStubSettings.newBuilder();
+ * azureClustersSettingsBuilder
+ *     .getAzureClientSettings()
+ *     .setRetrySettings(
+ *         azureClustersSettingsBuilder
+ *             .getAzureClientSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AzureClustersStubSettings azureClustersSettings = azureClustersSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AzureClustersStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createAzureClientSettings; + private final OperationCallSettings + createAzureClientOperationSettings; + private final UnaryCallSettings getAzureClientSettings; + private final PagedCallSettings< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings; + private final UnaryCallSettings deleteAzureClientSettings; + private final OperationCallSettings + deleteAzureClientOperationSettings; + private final UnaryCallSettings createAzureClusterSettings; + private final OperationCallSettings + createAzureClusterOperationSettings; + private final UnaryCallSettings updateAzureClusterSettings; + private final OperationCallSettings + updateAzureClusterOperationSettings; + private final UnaryCallSettings getAzureClusterSettings; + private final PagedCallSettings< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings; + private final UnaryCallSettings deleteAzureClusterSettings; + private final OperationCallSettings + deleteAzureClusterOperationSettings; + private final UnaryCallSettings + generateAzureAccessTokenSettings; + private final UnaryCallSettings + createAzureNodePoolSettings; + private final OperationCallSettings + createAzureNodePoolOperationSettings; + private final UnaryCallSettings + updateAzureNodePoolSettings; + private final OperationCallSettings + updateAzureNodePoolOperationSettings; + private final UnaryCallSettings getAzureNodePoolSettings; + private final PagedCallSettings< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings; + private final UnaryCallSettings + deleteAzureNodePoolSettings; + private final OperationCallSettings + deleteAzureNodePoolOperationSettings; + private final UnaryCallSettings + getAzureServerConfigSettings; + + private static final PagedListDescriptor< + ListAzureClientsRequest, ListAzureClientsResponse, AzureClient> + LIST_AZURE_CLIENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAzureClientsRequest, ListAzureClientsResponse, AzureClient>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAzureClientsRequest injectToken( + ListAzureClientsRequest payload, String token) { + return ListAzureClientsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAzureClientsRequest injectPageSize( + ListAzureClientsRequest payload, int pageSize) { + return ListAzureClientsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAzureClientsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAzureClientsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAzureClientsResponse payload) { + return payload.getAzureClientsList() == null + ? ImmutableList.of() + : payload.getAzureClientsList(); + } + }; + + private static final PagedListDescriptor< + ListAzureClustersRequest, ListAzureClustersResponse, AzureCluster> + LIST_AZURE_CLUSTERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAzureClustersRequest, ListAzureClustersResponse, AzureCluster>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAzureClustersRequest injectToken( + ListAzureClustersRequest payload, String token) { + return ListAzureClustersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAzureClustersRequest injectPageSize( + ListAzureClustersRequest payload, int pageSize) { + return ListAzureClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAzureClustersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAzureClustersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAzureClustersResponse payload) { + return payload.getAzureClustersList() == null + ? ImmutableList.of() + : payload.getAzureClustersList(); + } + }; + + private static final PagedListDescriptor< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, AzureNodePool> + LIST_AZURE_NODE_POOLS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, AzureNodePool>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAzureNodePoolsRequest injectToken( + ListAzureNodePoolsRequest payload, String token) { + return ListAzureNodePoolsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAzureNodePoolsRequest injectPageSize( + ListAzureNodePoolsRequest payload, int pageSize) { + return ListAzureNodePoolsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAzureNodePoolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAzureNodePoolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAzureNodePoolsResponse payload) { + return payload.getAzureNodePoolsList() == null + ? ImmutableList.of() + : payload.getAzureNodePoolsList(); + } + }; + + private static final PagedListResponseFactory< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + LIST_AZURE_CLIENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAzureClientsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AZURE_CLIENTS_PAGE_STR_DESC, request, context); + return ListAzureClientsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + LIST_AZURE_CLUSTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAzureClustersRequest, + ListAzureClustersResponse, + ListAzureClustersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAzureClustersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AZURE_CLUSTERS_PAGE_STR_DESC, request, context); + return ListAzureClustersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + LIST_AZURE_NODE_POOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAzureNodePoolsRequest, + ListAzureNodePoolsResponse, + ListAzureNodePoolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAzureNodePoolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AZURE_NODE_POOLS_PAGE_STR_DESC, request, context); + return ListAzureNodePoolsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createAzureClient. */ + public UnaryCallSettings createAzureClientSettings() { + return createAzureClientSettings; + } + + /** Returns the object with the settings used for calls to createAzureClient. */ + public OperationCallSettings + createAzureClientOperationSettings() { + return createAzureClientOperationSettings; + } + + /** Returns the object with the settings used for calls to getAzureClient. */ + public UnaryCallSettings getAzureClientSettings() { + return getAzureClientSettings; + } + + /** Returns the object with the settings used for calls to listAzureClients. */ + public PagedCallSettings< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings() { + return listAzureClientsSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureClient. */ + public UnaryCallSettings deleteAzureClientSettings() { + return deleteAzureClientSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureClient. */ + public OperationCallSettings + deleteAzureClientOperationSettings() { + return deleteAzureClientOperationSettings; + } + + /** Returns the object with the settings used for calls to createAzureCluster. */ + public UnaryCallSettings createAzureClusterSettings() { + return createAzureClusterSettings; + } + + /** Returns the object with the settings used for calls to createAzureCluster. */ + public OperationCallSettings + createAzureClusterOperationSettings() { + return createAzureClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAzureCluster. */ + public UnaryCallSettings updateAzureClusterSettings() { + return updateAzureClusterSettings; + } + + /** Returns the object with the settings used for calls to updateAzureCluster. */ + public OperationCallSettings + updateAzureClusterOperationSettings() { + return updateAzureClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to getAzureCluster. */ + public UnaryCallSettings getAzureClusterSettings() { + return getAzureClusterSettings; + } + + /** Returns the object with the settings used for calls to listAzureClusters. */ + public PagedCallSettings< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings() { + return listAzureClustersSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureCluster. */ + public UnaryCallSettings deleteAzureClusterSettings() { + return deleteAzureClusterSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureCluster. */ + public OperationCallSettings + deleteAzureClusterOperationSettings() { + return deleteAzureClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to generateAzureAccessToken. */ + public UnaryCallSettings + generateAzureAccessTokenSettings() { + return generateAzureAccessTokenSettings; + } + + /** Returns the object with the settings used for calls to createAzureNodePool. */ + public UnaryCallSettings createAzureNodePoolSettings() { + return createAzureNodePoolSettings; + } + + /** Returns the object with the settings used for calls to createAzureNodePool. */ + public OperationCallSettings + createAzureNodePoolOperationSettings() { + return createAzureNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAzureNodePool. */ + public UnaryCallSettings updateAzureNodePoolSettings() { + return updateAzureNodePoolSettings; + } + + /** Returns the object with the settings used for calls to updateAzureNodePool. */ + public OperationCallSettings + updateAzureNodePoolOperationSettings() { + return updateAzureNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getAzureNodePool. */ + public UnaryCallSettings getAzureNodePoolSettings() { + return getAzureNodePoolSettings; + } + + /** Returns the object with the settings used for calls to listAzureNodePools. */ + public PagedCallSettings< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings() { + return listAzureNodePoolsSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureNodePool. */ + public UnaryCallSettings deleteAzureNodePoolSettings() { + return deleteAzureNodePoolSettings; + } + + /** Returns the object with the settings used for calls to deleteAzureNodePool. */ + public OperationCallSettings + deleteAzureNodePoolOperationSettings() { + return deleteAzureNodePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getAzureServerConfig. */ + public UnaryCallSettings + getAzureServerConfigSettings() { + return getAzureServerConfigSettings; + } + + public AzureClustersStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAzureClustersStub.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 "gkemulticloud.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "gkemulticloud.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default 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(AzureClustersStubSettings.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 AzureClustersStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createAzureClientSettings = settingsBuilder.createAzureClientSettings().build(); + createAzureClientOperationSettings = + settingsBuilder.createAzureClientOperationSettings().build(); + getAzureClientSettings = settingsBuilder.getAzureClientSettings().build(); + listAzureClientsSettings = settingsBuilder.listAzureClientsSettings().build(); + deleteAzureClientSettings = settingsBuilder.deleteAzureClientSettings().build(); + deleteAzureClientOperationSettings = + settingsBuilder.deleteAzureClientOperationSettings().build(); + createAzureClusterSettings = settingsBuilder.createAzureClusterSettings().build(); + createAzureClusterOperationSettings = + settingsBuilder.createAzureClusterOperationSettings().build(); + updateAzureClusterSettings = settingsBuilder.updateAzureClusterSettings().build(); + updateAzureClusterOperationSettings = + settingsBuilder.updateAzureClusterOperationSettings().build(); + getAzureClusterSettings = settingsBuilder.getAzureClusterSettings().build(); + listAzureClustersSettings = settingsBuilder.listAzureClustersSettings().build(); + deleteAzureClusterSettings = settingsBuilder.deleteAzureClusterSettings().build(); + deleteAzureClusterOperationSettings = + settingsBuilder.deleteAzureClusterOperationSettings().build(); + generateAzureAccessTokenSettings = settingsBuilder.generateAzureAccessTokenSettings().build(); + createAzureNodePoolSettings = settingsBuilder.createAzureNodePoolSettings().build(); + createAzureNodePoolOperationSettings = + settingsBuilder.createAzureNodePoolOperationSettings().build(); + updateAzureNodePoolSettings = settingsBuilder.updateAzureNodePoolSettings().build(); + updateAzureNodePoolOperationSettings = + settingsBuilder.updateAzureNodePoolOperationSettings().build(); + getAzureNodePoolSettings = settingsBuilder.getAzureNodePoolSettings().build(); + listAzureNodePoolsSettings = settingsBuilder.listAzureNodePoolsSettings().build(); + deleteAzureNodePoolSettings = settingsBuilder.deleteAzureNodePoolSettings().build(); + deleteAzureNodePoolOperationSettings = + settingsBuilder.deleteAzureNodePoolOperationSettings().build(); + getAzureServerConfigSettings = settingsBuilder.getAzureServerConfigSettings().build(); + } + + /** Builder for AzureClustersStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createAzureClientSettings; + private final OperationCallSettings.Builder< + CreateAzureClientRequest, AzureClient, OperationMetadata> + createAzureClientOperationSettings; + private final UnaryCallSettings.Builder + getAzureClientSettings; + private final PagedCallSettings.Builder< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings; + private final UnaryCallSettings.Builder + deleteAzureClientSettings; + private final OperationCallSettings.Builder + deleteAzureClientOperationSettings; + private final UnaryCallSettings.Builder + createAzureClusterSettings; + private final OperationCallSettings.Builder< + CreateAzureClusterRequest, AzureCluster, OperationMetadata> + createAzureClusterOperationSettings; + private final UnaryCallSettings.Builder + updateAzureClusterSettings; + private final OperationCallSettings.Builder< + UpdateAzureClusterRequest, AzureCluster, OperationMetadata> + updateAzureClusterOperationSettings; + private final UnaryCallSettings.Builder + getAzureClusterSettings; + private final PagedCallSettings.Builder< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings; + private final UnaryCallSettings.Builder + deleteAzureClusterSettings; + private final OperationCallSettings.Builder + deleteAzureClusterOperationSettings; + private final UnaryCallSettings.Builder< + GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse> + generateAzureAccessTokenSettings; + private final UnaryCallSettings.Builder + createAzureNodePoolSettings; + private final OperationCallSettings.Builder< + CreateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + createAzureNodePoolOperationSettings; + private final UnaryCallSettings.Builder + updateAzureNodePoolSettings; + private final OperationCallSettings.Builder< + UpdateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + updateAzureNodePoolOperationSettings; + private final UnaryCallSettings.Builder + getAzureNodePoolSettings; + private final PagedCallSettings.Builder< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings; + private final UnaryCallSettings.Builder + deleteAzureNodePoolSettings; + private final OperationCallSettings.Builder< + DeleteAzureNodePoolRequest, Empty, OperationMetadata> + deleteAzureNodePoolOperationSettings; + private final UnaryCallSettings.Builder + getAzureServerConfigSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createAzureClientSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAzureClientOperationSettings = OperationCallSettings.newBuilder(); + getAzureClientSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAzureClientsSettings = PagedCallSettings.newBuilder(LIST_AZURE_CLIENTS_PAGE_STR_FACT); + deleteAzureClientSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAzureClientOperationSettings = OperationCallSettings.newBuilder(); + createAzureClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAzureClusterOperationSettings = OperationCallSettings.newBuilder(); + updateAzureClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAzureClusterOperationSettings = OperationCallSettings.newBuilder(); + getAzureClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAzureClustersSettings = PagedCallSettings.newBuilder(LIST_AZURE_CLUSTERS_PAGE_STR_FACT); + deleteAzureClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAzureClusterOperationSettings = OperationCallSettings.newBuilder(); + generateAzureAccessTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAzureNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAzureNodePoolOperationSettings = OperationCallSettings.newBuilder(); + updateAzureNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAzureNodePoolOperationSettings = OperationCallSettings.newBuilder(); + getAzureNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAzureNodePoolsSettings = + PagedCallSettings.newBuilder(LIST_AZURE_NODE_POOLS_PAGE_STR_FACT); + deleteAzureNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAzureNodePoolOperationSettings = OperationCallSettings.newBuilder(); + getAzureServerConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAzureClientSettings, + getAzureClientSettings, + listAzureClientsSettings, + deleteAzureClientSettings, + createAzureClusterSettings, + updateAzureClusterSettings, + getAzureClusterSettings, + listAzureClustersSettings, + deleteAzureClusterSettings, + generateAzureAccessTokenSettings, + createAzureNodePoolSettings, + updateAzureNodePoolSettings, + getAzureNodePoolSettings, + listAzureNodePoolsSettings, + deleteAzureNodePoolSettings, + getAzureServerConfigSettings); + initDefaults(this); + } + + protected Builder(AzureClustersStubSettings settings) { + super(settings); + + createAzureClientSettings = settings.createAzureClientSettings.toBuilder(); + createAzureClientOperationSettings = settings.createAzureClientOperationSettings.toBuilder(); + getAzureClientSettings = settings.getAzureClientSettings.toBuilder(); + listAzureClientsSettings = settings.listAzureClientsSettings.toBuilder(); + deleteAzureClientSettings = settings.deleteAzureClientSettings.toBuilder(); + deleteAzureClientOperationSettings = settings.deleteAzureClientOperationSettings.toBuilder(); + createAzureClusterSettings = settings.createAzureClusterSettings.toBuilder(); + createAzureClusterOperationSettings = + settings.createAzureClusterOperationSettings.toBuilder(); + updateAzureClusterSettings = settings.updateAzureClusterSettings.toBuilder(); + updateAzureClusterOperationSettings = + settings.updateAzureClusterOperationSettings.toBuilder(); + getAzureClusterSettings = settings.getAzureClusterSettings.toBuilder(); + listAzureClustersSettings = settings.listAzureClustersSettings.toBuilder(); + deleteAzureClusterSettings = settings.deleteAzureClusterSettings.toBuilder(); + deleteAzureClusterOperationSettings = + settings.deleteAzureClusterOperationSettings.toBuilder(); + generateAzureAccessTokenSettings = settings.generateAzureAccessTokenSettings.toBuilder(); + createAzureNodePoolSettings = settings.createAzureNodePoolSettings.toBuilder(); + createAzureNodePoolOperationSettings = + settings.createAzureNodePoolOperationSettings.toBuilder(); + updateAzureNodePoolSettings = settings.updateAzureNodePoolSettings.toBuilder(); + updateAzureNodePoolOperationSettings = + settings.updateAzureNodePoolOperationSettings.toBuilder(); + getAzureNodePoolSettings = settings.getAzureNodePoolSettings.toBuilder(); + listAzureNodePoolsSettings = settings.listAzureNodePoolsSettings.toBuilder(); + deleteAzureNodePoolSettings = settings.deleteAzureNodePoolSettings.toBuilder(); + deleteAzureNodePoolOperationSettings = + settings.deleteAzureNodePoolOperationSettings.toBuilder(); + getAzureServerConfigSettings = settings.getAzureServerConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAzureClientSettings, + getAzureClientSettings, + listAzureClientsSettings, + deleteAzureClientSettings, + createAzureClusterSettings, + updateAzureClusterSettings, + getAzureClusterSettings, + listAzureClustersSettings, + deleteAzureClusterSettings, + generateAzureAccessTokenSettings, + createAzureNodePoolSettings, + updateAzureNodePoolSettings, + getAzureNodePoolSettings, + listAzureNodePoolsSettings, + deleteAzureNodePoolSettings, + getAzureServerConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createAzureClientSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAzureClientSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAzureClientsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAzureClientSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createAzureClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAzureClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAzureClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAzureClustersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAzureClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .generateAzureAccessTokenSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAzureNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAzureNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAzureNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAzureNodePoolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAzureNodePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAzureServerConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAzureClientOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AzureClient.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAzureClientOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createAzureClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AzureCluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAzureClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AzureCluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAzureClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createAzureNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AzureNodePool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAzureNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AzureNodePool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAzureNodePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createAzureClient. */ + public UnaryCallSettings.Builder + createAzureClientSettings() { + return createAzureClientSettings; + } + + /** Returns the builder for the settings used for calls to createAzureClient. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createAzureClientOperationSettings() { + return createAzureClientOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAzureClient. */ + public UnaryCallSettings.Builder getAzureClientSettings() { + return getAzureClientSettings; + } + + /** Returns the builder for the settings used for calls to listAzureClients. */ + public PagedCallSettings.Builder< + ListAzureClientsRequest, ListAzureClientsResponse, ListAzureClientsPagedResponse> + listAzureClientsSettings() { + return listAzureClientsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureClient. */ + public UnaryCallSettings.Builder + deleteAzureClientSettings() { + return deleteAzureClientSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureClient. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAzureClientOperationSettings() { + return deleteAzureClientOperationSettings; + } + + /** Returns the builder for the settings used for calls to createAzureCluster. */ + public UnaryCallSettings.Builder + createAzureClusterSettings() { + return createAzureClusterSettings; + } + + /** Returns the builder for the settings used for calls to createAzureCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createAzureClusterOperationSettings() { + return createAzureClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAzureCluster. */ + public UnaryCallSettings.Builder + updateAzureClusterSettings() { + return updateAzureClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateAzureCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateAzureClusterOperationSettings() { + return updateAzureClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAzureCluster. */ + public UnaryCallSettings.Builder + getAzureClusterSettings() { + return getAzureClusterSettings; + } + + /** Returns the builder for the settings used for calls to listAzureClusters. */ + public PagedCallSettings.Builder< + ListAzureClustersRequest, ListAzureClustersResponse, ListAzureClustersPagedResponse> + listAzureClustersSettings() { + return listAzureClustersSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureCluster. */ + public UnaryCallSettings.Builder + deleteAzureClusterSettings() { + return deleteAzureClusterSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAzureClusterOperationSettings() { + return deleteAzureClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateAzureAccessToken. */ + public UnaryCallSettings.Builder< + GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse> + generateAzureAccessTokenSettings() { + return generateAzureAccessTokenSettings; + } + + /** Returns the builder for the settings used for calls to createAzureNodePool. */ + public UnaryCallSettings.Builder + createAzureNodePoolSettings() { + return createAzureNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to createAzureNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + createAzureNodePoolOperationSettings() { + return createAzureNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAzureNodePool. */ + public UnaryCallSettings.Builder + updateAzureNodePoolSettings() { + return updateAzureNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to updateAzureNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateAzureNodePoolRequest, AzureNodePool, OperationMetadata> + updateAzureNodePoolOperationSettings() { + return updateAzureNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAzureNodePool. */ + public UnaryCallSettings.Builder + getAzureNodePoolSettings() { + return getAzureNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to listAzureNodePools. */ + public PagedCallSettings.Builder< + ListAzureNodePoolsRequest, ListAzureNodePoolsResponse, ListAzureNodePoolsPagedResponse> + listAzureNodePoolsSettings() { + return listAzureNodePoolsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureNodePool. */ + public UnaryCallSettings.Builder + deleteAzureNodePoolSettings() { + return deleteAzureNodePoolSettings; + } + + /** Returns the builder for the settings used for calls to deleteAzureNodePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAzureNodePoolOperationSettings() { + return deleteAzureNodePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAzureServerConfig. */ + public UnaryCallSettings.Builder + getAzureServerConfigSettings() { + return getAzureServerConfigSettings; + } + + @Override + public AzureClustersStubSettings build() throws IOException { + return new AzureClustersStubSettings(this); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersCallableFactory.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersCallableFactory.java new file mode 100644 index 0000000..2d21cd5 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AwsClusters service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAwsClustersCallableFactory 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-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersStub.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersStub.java new file mode 100644 index 0000000..190b73c --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAwsClustersStub.java @@ -0,0 +1,635 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsNodePoolsPagedResponse; + +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.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AwsCluster; +import com.google.cloud.gkemulticloud.v1.AwsNodePool; +import com.google.cloud.gkemulticloud.v1.AwsServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest; +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.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AwsClusters service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAwsClustersStub extends AwsClustersStub { + private static final MethodDescriptor + createAwsClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAwsClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAwsClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAwsClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAwsClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/GetAwsCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAwsClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AwsCluster.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAwsClustersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAwsClustersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAwsClustersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAwsClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAwsClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GenerateAwsAccessTokenRequest, GenerateAwsAccessTokenResponse> + generateAwsAccessTokenMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateAwsAccessTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateAwsAccessTokenResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAwsNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/CreateAwsNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAwsNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAwsNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAwsNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAwsNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/GetAwsNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAwsNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AwsNodePool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAwsNodePoolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAwsNodePoolsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAwsNodePoolsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAwsNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAwsNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAwsServerConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AwsClusters/GetAwsServerConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAwsServerConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AwsServerConfig.getDefaultInstance())) + .build(); + + private final UnaryCallable createAwsClusterCallable; + private final OperationCallable + createAwsClusterOperationCallable; + private final UnaryCallable updateAwsClusterCallable; + private final OperationCallable + updateAwsClusterOperationCallable; + private final UnaryCallable getAwsClusterCallable; + private final UnaryCallable + listAwsClustersCallable; + private final UnaryCallable + listAwsClustersPagedCallable; + private final UnaryCallable deleteAwsClusterCallable; + private final OperationCallable + deleteAwsClusterOperationCallable; + private final UnaryCallable + generateAwsAccessTokenCallable; + private final UnaryCallable createAwsNodePoolCallable; + private final OperationCallable + createAwsNodePoolOperationCallable; + private final UnaryCallable updateAwsNodePoolCallable; + private final OperationCallable + updateAwsNodePoolOperationCallable; + private final UnaryCallable getAwsNodePoolCallable; + private final UnaryCallable + listAwsNodePoolsCallable; + private final UnaryCallable + listAwsNodePoolsPagedCallable; + private final UnaryCallable deleteAwsNodePoolCallable; + private final OperationCallable + deleteAwsNodePoolOperationCallable; + private final UnaryCallable + getAwsServerConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAwsClustersStub create(AwsClustersStubSettings settings) + throws IOException { + return new GrpcAwsClustersStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAwsClustersStub create(ClientContext clientContext) throws IOException { + return new GrpcAwsClustersStub(AwsClustersStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAwsClustersStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAwsClustersStub( + AwsClustersStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAwsClustersStub, 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 GrpcAwsClustersStub(AwsClustersStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAwsClustersCallableFactory()); + } + + /** + * Constructs an instance of GrpcAwsClustersStub, 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 GrpcAwsClustersStub( + AwsClustersStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createAwsClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAwsClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateAwsClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAwsClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("aws_cluster.name", String.valueOf(request.getAwsCluster().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getAwsClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAwsClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAwsClustersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAwsClustersMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAwsClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAwsClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + generateAwsAccessTokenTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(generateAwsAccessTokenMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("aws_cluster", String.valueOf(request.getAwsCluster())); + return params.build(); + }) + .build(); + GrpcCallSettings createAwsNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAwsNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateAwsNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAwsNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "aws_node_pool.name", String.valueOf(request.getAwsNodePool().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getAwsNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAwsNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAwsNodePoolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAwsNodePoolsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAwsNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAwsNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getAwsServerConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAwsServerConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createAwsClusterCallable = + callableFactory.createUnaryCallable( + createAwsClusterTransportSettings, settings.createAwsClusterSettings(), clientContext); + this.createAwsClusterOperationCallable = + callableFactory.createOperationCallable( + createAwsClusterTransportSettings, + settings.createAwsClusterOperationSettings(), + clientContext, + operationsStub); + this.updateAwsClusterCallable = + callableFactory.createUnaryCallable( + updateAwsClusterTransportSettings, settings.updateAwsClusterSettings(), clientContext); + this.updateAwsClusterOperationCallable = + callableFactory.createOperationCallable( + updateAwsClusterTransportSettings, + settings.updateAwsClusterOperationSettings(), + clientContext, + operationsStub); + this.getAwsClusterCallable = + callableFactory.createUnaryCallable( + getAwsClusterTransportSettings, settings.getAwsClusterSettings(), clientContext); + this.listAwsClustersCallable = + callableFactory.createUnaryCallable( + listAwsClustersTransportSettings, settings.listAwsClustersSettings(), clientContext); + this.listAwsClustersPagedCallable = + callableFactory.createPagedCallable( + listAwsClustersTransportSettings, settings.listAwsClustersSettings(), clientContext); + this.deleteAwsClusterCallable = + callableFactory.createUnaryCallable( + deleteAwsClusterTransportSettings, settings.deleteAwsClusterSettings(), clientContext); + this.deleteAwsClusterOperationCallable = + callableFactory.createOperationCallable( + deleteAwsClusterTransportSettings, + settings.deleteAwsClusterOperationSettings(), + clientContext, + operationsStub); + this.generateAwsAccessTokenCallable = + callableFactory.createUnaryCallable( + generateAwsAccessTokenTransportSettings, + settings.generateAwsAccessTokenSettings(), + clientContext); + this.createAwsNodePoolCallable = + callableFactory.createUnaryCallable( + createAwsNodePoolTransportSettings, + settings.createAwsNodePoolSettings(), + clientContext); + this.createAwsNodePoolOperationCallable = + callableFactory.createOperationCallable( + createAwsNodePoolTransportSettings, + settings.createAwsNodePoolOperationSettings(), + clientContext, + operationsStub); + this.updateAwsNodePoolCallable = + callableFactory.createUnaryCallable( + updateAwsNodePoolTransportSettings, + settings.updateAwsNodePoolSettings(), + clientContext); + this.updateAwsNodePoolOperationCallable = + callableFactory.createOperationCallable( + updateAwsNodePoolTransportSettings, + settings.updateAwsNodePoolOperationSettings(), + clientContext, + operationsStub); + this.getAwsNodePoolCallable = + callableFactory.createUnaryCallable( + getAwsNodePoolTransportSettings, settings.getAwsNodePoolSettings(), clientContext); + this.listAwsNodePoolsCallable = + callableFactory.createUnaryCallable( + listAwsNodePoolsTransportSettings, settings.listAwsNodePoolsSettings(), clientContext); + this.listAwsNodePoolsPagedCallable = + callableFactory.createPagedCallable( + listAwsNodePoolsTransportSettings, settings.listAwsNodePoolsSettings(), clientContext); + this.deleteAwsNodePoolCallable = + callableFactory.createUnaryCallable( + deleteAwsNodePoolTransportSettings, + settings.deleteAwsNodePoolSettings(), + clientContext); + this.deleteAwsNodePoolOperationCallable = + callableFactory.createOperationCallable( + deleteAwsNodePoolTransportSettings, + settings.deleteAwsNodePoolOperationSettings(), + clientContext, + operationsStub); + this.getAwsServerConfigCallable = + callableFactory.createUnaryCallable( + getAwsServerConfigTransportSettings, + settings.getAwsServerConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createAwsClusterCallable() { + return createAwsClusterCallable; + } + + @Override + public OperationCallable + createAwsClusterOperationCallable() { + return createAwsClusterOperationCallable; + } + + @Override + public UnaryCallable updateAwsClusterCallable() { + return updateAwsClusterCallable; + } + + @Override + public OperationCallable + updateAwsClusterOperationCallable() { + return updateAwsClusterOperationCallable; + } + + @Override + public UnaryCallable getAwsClusterCallable() { + return getAwsClusterCallable; + } + + @Override + public UnaryCallable listAwsClustersCallable() { + return listAwsClustersCallable; + } + + @Override + public UnaryCallable + listAwsClustersPagedCallable() { + return listAwsClustersPagedCallable; + } + + @Override + public UnaryCallable deleteAwsClusterCallable() { + return deleteAwsClusterCallable; + } + + @Override + public OperationCallable + deleteAwsClusterOperationCallable() { + return deleteAwsClusterOperationCallable; + } + + @Override + public UnaryCallable + generateAwsAccessTokenCallable() { + return generateAwsAccessTokenCallable; + } + + @Override + public UnaryCallable createAwsNodePoolCallable() { + return createAwsNodePoolCallable; + } + + @Override + public OperationCallable + createAwsNodePoolOperationCallable() { + return createAwsNodePoolOperationCallable; + } + + @Override + public UnaryCallable updateAwsNodePoolCallable() { + return updateAwsNodePoolCallable; + } + + @Override + public OperationCallable + updateAwsNodePoolOperationCallable() { + return updateAwsNodePoolOperationCallable; + } + + @Override + public UnaryCallable getAwsNodePoolCallable() { + return getAwsNodePoolCallable; + } + + @Override + public UnaryCallable + listAwsNodePoolsCallable() { + return listAwsNodePoolsCallable; + } + + @Override + public UnaryCallable + listAwsNodePoolsPagedCallable() { + return listAwsNodePoolsPagedCallable; + } + + @Override + public UnaryCallable deleteAwsNodePoolCallable() { + return deleteAwsNodePoolCallable; + } + + @Override + public OperationCallable + deleteAwsNodePoolOperationCallable() { + return deleteAwsNodePoolOperationCallable; + } + + @Override + public UnaryCallable getAwsServerConfigCallable() { + return getAwsServerConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersCallableFactory.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersCallableFactory.java new file mode 100644 index 0000000..fdc6703 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AzureClusters service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAzureClustersCallableFactory 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-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersStub.java b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersStub.java new file mode 100644 index 0000000..61526bb --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAzureClustersStub.java @@ -0,0 +1,823 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1.stub; + +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClientsPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureNodePoolsPagedResponse; + +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.UnaryCallable; +import com.google.cloud.gkemulticloud.v1.AzureClient; +import com.google.cloud.gkemulticloud.v1.AzureCluster; +import com.google.cloud.gkemulticloud.v1.AzureNodePool; +import com.google.cloud.gkemulticloud.v1.AzureServerConfig; +import com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest; +import com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse; +import com.google.cloud.gkemulticloud.v1.GetAzureClientRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest; +import com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest; +import com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse; +import com.google.cloud.gkemulticloud.v1.OperationMetadata; +import com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest; +import com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest; +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.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AzureClusters service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAzureClustersStub extends AzureClustersStub { + private static final MethodDescriptor + createAzureClientMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureClient") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAzureClientRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAzureClientMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/GetAzureClient") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAzureClientRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AzureClient.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAzureClientsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAzureClientsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAzureClientsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAzureClientMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureClient") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAzureClientRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAzureClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAzureClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAzureClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAzureClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAzureClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/GetAzureCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAzureClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AzureCluster.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAzureClustersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAzureClustersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAzureClustersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAzureClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAzureClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GenerateAzureAccessTokenRequest, GenerateAzureAccessTokenResponse> + generateAzureAccessTokenMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateAzureAccessTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateAzureAccessTokenResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAzureNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/CreateAzureNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAzureNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAzureNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAzureNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAzureNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/GetAzureNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAzureNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AzureNodePool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAzureNodePoolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAzureNodePoolsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAzureNodePoolsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAzureNodePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAzureNodePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAzureServerConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.gkemulticloud.v1.AzureClusters/GetAzureServerConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAzureServerConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AzureServerConfig.getDefaultInstance())) + .build(); + + private final UnaryCallable createAzureClientCallable; + private final OperationCallable + createAzureClientOperationCallable; + private final UnaryCallable getAzureClientCallable; + private final UnaryCallable + listAzureClientsCallable; + private final UnaryCallable + listAzureClientsPagedCallable; + private final UnaryCallable deleteAzureClientCallable; + private final OperationCallable + deleteAzureClientOperationCallable; + private final UnaryCallable createAzureClusterCallable; + private final OperationCallable + createAzureClusterOperationCallable; + private final UnaryCallable updateAzureClusterCallable; + private final OperationCallable + updateAzureClusterOperationCallable; + private final UnaryCallable getAzureClusterCallable; + private final UnaryCallable + listAzureClustersCallable; + private final UnaryCallable + listAzureClustersPagedCallable; + private final UnaryCallable deleteAzureClusterCallable; + private final OperationCallable + deleteAzureClusterOperationCallable; + private final UnaryCallable + generateAzureAccessTokenCallable; + private final UnaryCallable createAzureNodePoolCallable; + private final OperationCallable + createAzureNodePoolOperationCallable; + private final UnaryCallable updateAzureNodePoolCallable; + private final OperationCallable + updateAzureNodePoolOperationCallable; + private final UnaryCallable getAzureNodePoolCallable; + private final UnaryCallable + listAzureNodePoolsCallable; + private final UnaryCallable + listAzureNodePoolsPagedCallable; + private final UnaryCallable deleteAzureNodePoolCallable; + private final OperationCallable + deleteAzureNodePoolOperationCallable; + private final UnaryCallable + getAzureServerConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAzureClustersStub create(AzureClustersStubSettings settings) + throws IOException { + return new GrpcAzureClustersStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAzureClustersStub create(ClientContext clientContext) throws IOException { + return new GrpcAzureClustersStub(AzureClustersStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAzureClustersStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAzureClustersStub( + AzureClustersStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAzureClustersStub, 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 GrpcAzureClustersStub(AzureClustersStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAzureClustersCallableFactory()); + } + + /** + * Constructs an instance of GrpcAzureClustersStub, 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 GrpcAzureClustersStub( + AzureClustersStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createAzureClientTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAzureClientMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getAzureClientTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAzureClientMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAzureClientsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAzureClientsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAzureClientTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAzureClientMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createAzureClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAzureClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateAzureClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAzureClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "azure_cluster.name", String.valueOf(request.getAzureCluster().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getAzureClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAzureClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAzureClustersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAzureClustersMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAzureClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAzureClusterMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + generateAzureAccessTokenTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(generateAzureAccessTokenMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("azure_cluster", String.valueOf(request.getAzureCluster())); + return params.build(); + }) + .build(); + GrpcCallSettings createAzureNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAzureNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateAzureNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAzureNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "azure_node_pool.name", String.valueOf(request.getAzureNodePool().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getAzureNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAzureNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAzureNodePoolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAzureNodePoolsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAzureNodePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAzureNodePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getAzureServerConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAzureServerConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createAzureClientCallable = + callableFactory.createUnaryCallable( + createAzureClientTransportSettings, + settings.createAzureClientSettings(), + clientContext); + this.createAzureClientOperationCallable = + callableFactory.createOperationCallable( + createAzureClientTransportSettings, + settings.createAzureClientOperationSettings(), + clientContext, + operationsStub); + this.getAzureClientCallable = + callableFactory.createUnaryCallable( + getAzureClientTransportSettings, settings.getAzureClientSettings(), clientContext); + this.listAzureClientsCallable = + callableFactory.createUnaryCallable( + listAzureClientsTransportSettings, settings.listAzureClientsSettings(), clientContext); + this.listAzureClientsPagedCallable = + callableFactory.createPagedCallable( + listAzureClientsTransportSettings, settings.listAzureClientsSettings(), clientContext); + this.deleteAzureClientCallable = + callableFactory.createUnaryCallable( + deleteAzureClientTransportSettings, + settings.deleteAzureClientSettings(), + clientContext); + this.deleteAzureClientOperationCallable = + callableFactory.createOperationCallable( + deleteAzureClientTransportSettings, + settings.deleteAzureClientOperationSettings(), + clientContext, + operationsStub); + this.createAzureClusterCallable = + callableFactory.createUnaryCallable( + createAzureClusterTransportSettings, + settings.createAzureClusterSettings(), + clientContext); + this.createAzureClusterOperationCallable = + callableFactory.createOperationCallable( + createAzureClusterTransportSettings, + settings.createAzureClusterOperationSettings(), + clientContext, + operationsStub); + this.updateAzureClusterCallable = + callableFactory.createUnaryCallable( + updateAzureClusterTransportSettings, + settings.updateAzureClusterSettings(), + clientContext); + this.updateAzureClusterOperationCallable = + callableFactory.createOperationCallable( + updateAzureClusterTransportSettings, + settings.updateAzureClusterOperationSettings(), + clientContext, + operationsStub); + this.getAzureClusterCallable = + callableFactory.createUnaryCallable( + getAzureClusterTransportSettings, settings.getAzureClusterSettings(), clientContext); + this.listAzureClustersCallable = + callableFactory.createUnaryCallable( + listAzureClustersTransportSettings, + settings.listAzureClustersSettings(), + clientContext); + this.listAzureClustersPagedCallable = + callableFactory.createPagedCallable( + listAzureClustersTransportSettings, + settings.listAzureClustersSettings(), + clientContext); + this.deleteAzureClusterCallable = + callableFactory.createUnaryCallable( + deleteAzureClusterTransportSettings, + settings.deleteAzureClusterSettings(), + clientContext); + this.deleteAzureClusterOperationCallable = + callableFactory.createOperationCallable( + deleteAzureClusterTransportSettings, + settings.deleteAzureClusterOperationSettings(), + clientContext, + operationsStub); + this.generateAzureAccessTokenCallable = + callableFactory.createUnaryCallable( + generateAzureAccessTokenTransportSettings, + settings.generateAzureAccessTokenSettings(), + clientContext); + this.createAzureNodePoolCallable = + callableFactory.createUnaryCallable( + createAzureNodePoolTransportSettings, + settings.createAzureNodePoolSettings(), + clientContext); + this.createAzureNodePoolOperationCallable = + callableFactory.createOperationCallable( + createAzureNodePoolTransportSettings, + settings.createAzureNodePoolOperationSettings(), + clientContext, + operationsStub); + this.updateAzureNodePoolCallable = + callableFactory.createUnaryCallable( + updateAzureNodePoolTransportSettings, + settings.updateAzureNodePoolSettings(), + clientContext); + this.updateAzureNodePoolOperationCallable = + callableFactory.createOperationCallable( + updateAzureNodePoolTransportSettings, + settings.updateAzureNodePoolOperationSettings(), + clientContext, + operationsStub); + this.getAzureNodePoolCallable = + callableFactory.createUnaryCallable( + getAzureNodePoolTransportSettings, settings.getAzureNodePoolSettings(), clientContext); + this.listAzureNodePoolsCallable = + callableFactory.createUnaryCallable( + listAzureNodePoolsTransportSettings, + settings.listAzureNodePoolsSettings(), + clientContext); + this.listAzureNodePoolsPagedCallable = + callableFactory.createPagedCallable( + listAzureNodePoolsTransportSettings, + settings.listAzureNodePoolsSettings(), + clientContext); + this.deleteAzureNodePoolCallable = + callableFactory.createUnaryCallable( + deleteAzureNodePoolTransportSettings, + settings.deleteAzureNodePoolSettings(), + clientContext); + this.deleteAzureNodePoolOperationCallable = + callableFactory.createOperationCallable( + deleteAzureNodePoolTransportSettings, + settings.deleteAzureNodePoolOperationSettings(), + clientContext, + operationsStub); + this.getAzureServerConfigCallable = + callableFactory.createUnaryCallable( + getAzureServerConfigTransportSettings, + settings.getAzureServerConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createAzureClientCallable() { + return createAzureClientCallable; + } + + @Override + public OperationCallable + createAzureClientOperationCallable() { + return createAzureClientOperationCallable; + } + + @Override + public UnaryCallable getAzureClientCallable() { + return getAzureClientCallable; + } + + @Override + public UnaryCallable + listAzureClientsCallable() { + return listAzureClientsCallable; + } + + @Override + public UnaryCallable + listAzureClientsPagedCallable() { + return listAzureClientsPagedCallable; + } + + @Override + public UnaryCallable deleteAzureClientCallable() { + return deleteAzureClientCallable; + } + + @Override + public OperationCallable + deleteAzureClientOperationCallable() { + return deleteAzureClientOperationCallable; + } + + @Override + public UnaryCallable createAzureClusterCallable() { + return createAzureClusterCallable; + } + + @Override + public OperationCallable + createAzureClusterOperationCallable() { + return createAzureClusterOperationCallable; + } + + @Override + public UnaryCallable updateAzureClusterCallable() { + return updateAzureClusterCallable; + } + + @Override + public OperationCallable + updateAzureClusterOperationCallable() { + return updateAzureClusterOperationCallable; + } + + @Override + public UnaryCallable getAzureClusterCallable() { + return getAzureClusterCallable; + } + + @Override + public UnaryCallable + listAzureClustersCallable() { + return listAzureClustersCallable; + } + + @Override + public UnaryCallable + listAzureClustersPagedCallable() { + return listAzureClustersPagedCallable; + } + + @Override + public UnaryCallable deleteAzureClusterCallable() { + return deleteAzureClusterCallable; + } + + @Override + public OperationCallable + deleteAzureClusterOperationCallable() { + return deleteAzureClusterOperationCallable; + } + + @Override + public UnaryCallable + generateAzureAccessTokenCallable() { + return generateAzureAccessTokenCallable; + } + + @Override + public UnaryCallable createAzureNodePoolCallable() { + return createAzureNodePoolCallable; + } + + @Override + public OperationCallable + createAzureNodePoolOperationCallable() { + return createAzureNodePoolOperationCallable; + } + + @Override + public UnaryCallable updateAzureNodePoolCallable() { + return updateAzureNodePoolCallable; + } + + @Override + public OperationCallable + updateAzureNodePoolOperationCallable() { + return updateAzureNodePoolOperationCallable; + } + + @Override + public UnaryCallable getAzureNodePoolCallable() { + return getAzureNodePoolCallable; + } + + @Override + public UnaryCallable + listAzureNodePoolsCallable() { + return listAzureNodePoolsCallable; + } + + @Override + public UnaryCallable + listAzureNodePoolsPagedCallable() { + return listAzureNodePoolsPagedCallable; + } + + @Override + public UnaryCallable deleteAzureNodePoolCallable() { + return deleteAzureNodePoolCallable; + } + + @Override + public OperationCallable + deleteAzureNodePoolOperationCallable() { + return deleteAzureNodePoolOperationCallable; + } + + @Override + public UnaryCallable + getAzureServerConfigCallable() { + return getAzureServerConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AwsClustersClientTest.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AwsClustersClientTest.java new file mode 100644 index 0000000..6b1279e --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AwsClustersClientTest.java @@ -0,0 +1,1172 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AwsClustersClient.ListAwsNodePoolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AwsClustersClientTest { + private static MockAwsClusters mockAwsClusters; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AwsClustersClient client; + + @BeforeClass + public static void startStaticServer() { + mockAwsClusters = new MockAwsClusters(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAwsClusters)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AwsClustersSettings settings = + AwsClustersSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AwsClustersClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createAwsClusterTest() throws Exception { + AwsCluster expectedResponse = + AwsCluster.newBuilder() + .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setNetworking(AwsClusterNetworking.newBuilder().build()) + .setAwsRegion("awsRegion-860644271") + .setControlPlane(AwsControlPlane.newBuilder().build()) + .setAuthorization(AwsAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAwsClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + String awsClusterId = "awsClusterId1988965944"; + + AwsCluster actualResponse = + client.createAwsClusterAsync(parent, awsCluster, awsClusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAwsClusterRequest actualRequest = ((CreateAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(awsCluster, actualRequest.getAwsCluster()); + Assert.assertEquals(awsClusterId, actualRequest.getAwsClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAwsClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + String awsClusterId = "awsClusterId1988965944"; + client.createAwsClusterAsync(parent, awsCluster, awsClusterId).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 createAwsClusterTest2() throws Exception { + AwsCluster expectedResponse = + AwsCluster.newBuilder() + .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setNetworking(AwsClusterNetworking.newBuilder().build()) + .setAwsRegion("awsRegion-860644271") + .setControlPlane(AwsControlPlane.newBuilder().build()) + .setAuthorization(AwsAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAwsClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + String parent = "parent-995424086"; + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + String awsClusterId = "awsClusterId1988965944"; + + AwsCluster actualResponse = + client.createAwsClusterAsync(parent, awsCluster, awsClusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAwsClusterRequest actualRequest = ((CreateAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(awsCluster, actualRequest.getAwsCluster()); + Assert.assertEquals(awsClusterId, actualRequest.getAwsClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAwsClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String parent = "parent-995424086"; + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + String awsClusterId = "awsClusterId1988965944"; + client.createAwsClusterAsync(parent, awsCluster, awsClusterId).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 updateAwsClusterTest() throws Exception { + AwsCluster expectedResponse = + AwsCluster.newBuilder() + .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setNetworking(AwsClusterNetworking.newBuilder().build()) + .setAwsRegion("awsRegion-860644271") + .setControlPlane(AwsControlPlane.newBuilder().build()) + .setAuthorization(AwsAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAwsClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AwsCluster actualResponse = client.updateAwsClusterAsync(awsCluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAwsClusterRequest actualRequest = ((UpdateAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(awsCluster, actualRequest.getAwsCluster()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAwsClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsCluster awsCluster = AwsCluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAwsClusterAsync(awsCluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAwsClusterTest() throws Exception { + AwsCluster expectedResponse = + AwsCluster.newBuilder() + .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setNetworking(AwsClusterNetworking.newBuilder().build()) + .setAwsRegion("awsRegion-860644271") + .setControlPlane(AwsControlPlane.newBuilder().build()) + .setAuthorization(AwsAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + + AwsCluster actualResponse = client.getAwsCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsClusterRequest actualRequest = ((GetAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + client.getAwsCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAwsClusterTest2() throws Exception { + AwsCluster expectedResponse = + AwsCluster.newBuilder() + .setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setNetworking(AwsClusterNetworking.newBuilder().build()) + .setAwsRegion("awsRegion-860644271") + .setControlPlane(AwsControlPlane.newBuilder().build()) + .setAuthorization(AwsAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AwsCluster actualResponse = client.getAwsCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsClusterRequest actualRequest = ((GetAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAwsCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAwsClustersTest() throws Exception { + AwsCluster responsesElement = AwsCluster.newBuilder().build(); + ListAwsClustersResponse expectedResponse = + ListAwsClustersResponse.newBuilder() + .setNextPageToken("") + .addAllAwsClusters(Arrays.asList(responsesElement)) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAwsClustersPagedResponse pagedListResponse = client.listAwsClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAwsClustersList().get(0), resources.get(0)); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAwsClustersRequest actualRequest = ((ListAwsClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAwsClustersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAwsClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAwsClustersTest2() throws Exception { + AwsCluster responsesElement = AwsCluster.newBuilder().build(); + ListAwsClustersResponse expectedResponse = + ListAwsClustersResponse.newBuilder() + .setNextPageToken("") + .addAllAwsClusters(Arrays.asList(responsesElement)) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAwsClustersPagedResponse pagedListResponse = client.listAwsClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAwsClustersList().get(0), resources.get(0)); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAwsClustersRequest actualRequest = ((ListAwsClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAwsClustersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAwsClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAwsClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAwsClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + + client.deleteAwsClusterAsync(name).get(); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAwsClusterRequest actualRequest = ((DeleteAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAwsClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + client.deleteAwsClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAwsClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAwsClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAwsClusterAsync(name).get(); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAwsClusterRequest actualRequest = ((DeleteAwsClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAwsClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String name = "name3373707"; + client.deleteAwsClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void generateAwsAccessTokenTest() throws Exception { + GenerateAwsAccessTokenResponse expectedResponse = + GenerateAwsAccessTokenResponse.newBuilder() + .setAccessToken("accessToken-1042689291") + .setExpirationTime(Timestamp.newBuilder().build()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + GenerateAwsAccessTokenRequest request = + GenerateAwsAccessTokenRequest.newBuilder() + .setAwsCluster(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .build(); + + GenerateAwsAccessTokenResponse actualResponse = client.generateAwsAccessToken(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateAwsAccessTokenRequest actualRequest = + ((GenerateAwsAccessTokenRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAwsCluster(), actualRequest.getAwsCluster()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateAwsAccessTokenExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + GenerateAwsAccessTokenRequest request = + GenerateAwsAccessTokenRequest.newBuilder() + .setAwsCluster( + AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString()) + .build(); + client.generateAwsAccessToken(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAwsNodePoolTest() throws Exception { + AwsNodePool expectedResponse = + AwsNodePool.newBuilder() + .setName( + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AwsNodeConfig.newBuilder().build()) + .setAutoscaling(AwsNodePoolAutoscaling.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAwsNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + String awsNodePoolId = "awsNodePoolId-1885267498"; + + AwsNodePool actualResponse = + client.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAwsNodePoolRequest actualRequest = ((CreateAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(awsNodePool, actualRequest.getAwsNodePool()); + Assert.assertEquals(awsNodePoolId, actualRequest.getAwsNodePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAwsNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + String awsNodePoolId = "awsNodePoolId-1885267498"; + client.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).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 createAwsNodePoolTest2() throws Exception { + AwsNodePool expectedResponse = + AwsNodePool.newBuilder() + .setName( + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AwsNodeConfig.newBuilder().build()) + .setAutoscaling(AwsNodePoolAutoscaling.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAwsNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + String parent = "parent-995424086"; + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + String awsNodePoolId = "awsNodePoolId-1885267498"; + + AwsNodePool actualResponse = + client.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAwsNodePoolRequest actualRequest = ((CreateAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(awsNodePool, actualRequest.getAwsNodePool()); + Assert.assertEquals(awsNodePoolId, actualRequest.getAwsNodePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAwsNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String parent = "parent-995424086"; + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + String awsNodePoolId = "awsNodePoolId-1885267498"; + client.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).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 updateAwsNodePoolTest() throws Exception { + AwsNodePool expectedResponse = + AwsNodePool.newBuilder() + .setName( + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AwsNodeConfig.newBuilder().build()) + .setAutoscaling(AwsNodePoolAutoscaling.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAwsNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AwsNodePool actualResponse = client.updateAwsNodePoolAsync(awsNodePool, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAwsNodePoolRequest actualRequest = ((UpdateAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(awsNodePool, actualRequest.getAwsNodePool()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAwsNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsNodePool awsNodePool = AwsNodePool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAwsNodePoolAsync(awsNodePool, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAwsNodePoolTest() throws Exception { + AwsNodePool expectedResponse = + AwsNodePool.newBuilder() + .setName( + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AwsNodeConfig.newBuilder().build()) + .setAutoscaling(AwsNodePoolAutoscaling.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + AwsNodePoolName name = + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]"); + + AwsNodePool actualResponse = client.getAwsNodePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsNodePoolRequest actualRequest = ((GetAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsNodePoolName name = + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]"); + client.getAwsNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAwsNodePoolTest2() throws Exception { + AwsNodePool expectedResponse = + AwsNodePool.newBuilder() + .setName( + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AwsNodeConfig.newBuilder().build()) + .setAutoscaling(AwsNodePoolAutoscaling.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AwsNodePool actualResponse = client.getAwsNodePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsNodePoolRequest actualRequest = ((GetAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAwsNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAwsNodePoolsTest() throws Exception { + AwsNodePool responsesElement = AwsNodePool.newBuilder().build(); + ListAwsNodePoolsResponse expectedResponse = + ListAwsNodePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllAwsNodePools(Arrays.asList(responsesElement)) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + + ListAwsNodePoolsPagedResponse pagedListResponse = client.listAwsNodePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAwsNodePoolsList().get(0), resources.get(0)); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAwsNodePoolsRequest actualRequest = ((ListAwsNodePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAwsNodePoolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]"); + client.listAwsNodePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAwsNodePoolsTest2() throws Exception { + AwsNodePool responsesElement = AwsNodePool.newBuilder().build(); + ListAwsNodePoolsResponse expectedResponse = + ListAwsNodePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllAwsNodePools(Arrays.asList(responsesElement)) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAwsNodePoolsPagedResponse pagedListResponse = client.listAwsNodePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAwsNodePoolsList().get(0), resources.get(0)); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAwsNodePoolsRequest actualRequest = ((ListAwsNodePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAwsNodePoolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAwsNodePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAwsNodePoolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAwsNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + AwsNodePoolName name = + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]"); + + client.deleteAwsNodePoolAsync(name).get(); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAwsNodePoolRequest actualRequest = ((DeleteAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAwsNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsNodePoolName name = + AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]"); + client.deleteAwsNodePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAwsNodePoolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAwsNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAwsClusters.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAwsNodePoolAsync(name).get(); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAwsNodePoolRequest actualRequest = ((DeleteAwsNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAwsNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String name = "name3373707"; + client.deleteAwsNodePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAwsServerConfigTest() throws Exception { + AwsServerConfig expectedResponse = + AwsServerConfig.newBuilder() + .setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllValidVersions(new ArrayList()) + .addAllSupportedAwsRegions(new ArrayList()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + AwsServerConfigName name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]"); + + AwsServerConfig actualResponse = client.getAwsServerConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsServerConfigRequest actualRequest = ((GetAwsServerConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsServerConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + AwsServerConfigName name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]"); + client.getAwsServerConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAwsServerConfigTest2() throws Exception { + AwsServerConfig expectedResponse = + AwsServerConfig.newBuilder() + .setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllValidVersions(new ArrayList()) + .addAllSupportedAwsRegions(new ArrayList()) + .build(); + mockAwsClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AwsServerConfig actualResponse = client.getAwsServerConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAwsClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAwsServerConfigRequest actualRequest = ((GetAwsServerConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAwsServerConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAwsClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAwsServerConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AzureClustersClientTest.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AzureClustersClientTest.java new file mode 100644 index 0000000..6f8e736 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/AzureClustersClientTest.java @@ -0,0 +1,1579 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClientsPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureClustersPagedResponse; +import static com.google.cloud.gkemulticloud.v1.AzureClustersClient.ListAzureNodePoolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AzureClustersClientTest { + private static MockAzureClusters mockAzureClusters; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AzureClustersClient client; + + @BeforeClass + public static void startStaticServer() { + mockAzureClusters = new MockAzureClusters(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAzureClusters)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AzureClustersSettings settings = + AzureClustersSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AzureClustersClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createAzureClientTest() throws Exception { + AzureClient expectedResponse = + AzureClient.newBuilder() + .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString()) + .setTenantId("tenantId-1306693787") + .setApplicationId("applicationId-1011352949") + .putAllAnnotations(new HashMap()) + .setPemCertificate("pemCertificate153491807") + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureClientTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AzureClient azureClient = AzureClient.newBuilder().build(); + String azureClientId = "azureClientId-1735934475"; + + AzureClient actualResponse = + client.createAzureClientAsync(parent, azureClient, azureClientId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureClientRequest actualRequest = ((CreateAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(azureClient, actualRequest.getAzureClient()); + Assert.assertEquals(azureClientId, actualRequest.getAzureClientId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureClientExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AzureClient azureClient = AzureClient.newBuilder().build(); + String azureClientId = "azureClientId-1735934475"; + client.createAzureClientAsync(parent, azureClient, azureClientId).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 createAzureClientTest2() throws Exception { + AzureClient expectedResponse = + AzureClient.newBuilder() + .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString()) + .setTenantId("tenantId-1306693787") + .setApplicationId("applicationId-1011352949") + .putAllAnnotations(new HashMap()) + .setPemCertificate("pemCertificate153491807") + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureClientTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String parent = "parent-995424086"; + AzureClient azureClient = AzureClient.newBuilder().build(); + String azureClientId = "azureClientId-1735934475"; + + AzureClient actualResponse = + client.createAzureClientAsync(parent, azureClient, azureClientId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureClientRequest actualRequest = ((CreateAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(azureClient, actualRequest.getAzureClient()); + Assert.assertEquals(azureClientId, actualRequest.getAzureClientId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureClientExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + AzureClient azureClient = AzureClient.newBuilder().build(); + String azureClientId = "azureClientId-1735934475"; + client.createAzureClientAsync(parent, azureClient, azureClientId).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 getAzureClientTest() throws Exception { + AzureClient expectedResponse = + AzureClient.newBuilder() + .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString()) + .setTenantId("tenantId-1306693787") + .setApplicationId("applicationId-1011352949") + .putAllAnnotations(new HashMap()) + .setPemCertificate("pemCertificate153491807") + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]"); + + AzureClient actualResponse = client.getAzureClient(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureClientRequest actualRequest = ((GetAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureClientExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]"); + client.getAzureClient(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAzureClientTest2() throws Exception { + AzureClient expectedResponse = + AzureClient.newBuilder() + .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString()) + .setTenantId("tenantId-1306693787") + .setApplicationId("applicationId-1011352949") + .putAllAnnotations(new HashMap()) + .setPemCertificate("pemCertificate153491807") + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AzureClient actualResponse = client.getAzureClient(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureClientRequest actualRequest = ((GetAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureClientExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAzureClient(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureClientsTest() throws Exception { + AzureClient responsesElement = AzureClient.newBuilder().build(); + ListAzureClientsResponse expectedResponse = + ListAzureClientsResponse.newBuilder() + .setNextPageToken("") + .addAllAzureClients(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAzureClientsPagedResponse pagedListResponse = client.listAzureClients(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureClientsList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureClientsRequest actualRequest = ((ListAzureClientsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureClientsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAzureClients(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureClientsTest2() throws Exception { + AzureClient responsesElement = AzureClient.newBuilder().build(); + ListAzureClientsResponse expectedResponse = + ListAzureClientsResponse.newBuilder() + .setNextPageToken("") + .addAllAzureClients(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAzureClientsPagedResponse pagedListResponse = client.listAzureClients(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureClientsList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureClientsRequest actualRequest = ((ListAzureClientsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureClientsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAzureClients(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAzureClientTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureClientTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]"); + + client.deleteAzureClientAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureClientRequest actualRequest = ((DeleteAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureClientExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]"); + client.deleteAzureClientAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAzureClientTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureClientTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAzureClientAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureClientRequest actualRequest = ((DeleteAzureClientRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureClientExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.deleteAzureClientAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAzureClusterTest() throws Exception { + AzureCluster expectedResponse = + AzureCluster.newBuilder() + .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setAzureRegion("azureRegion1270271587") + .setResourceGroupId("resourceGroupId928392204") + .setAzureClient("azureClient847354682") + .setNetworking(AzureClusterNetworking.newBuilder().build()) + .setControlPlane(AzureControlPlane.newBuilder().build()) + .setAuthorization(AzureAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setManagedResources(AzureClusterResources.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + String azureClusterId = "azureClusterId191689446"; + + AzureCluster actualResponse = + client.createAzureClusterAsync(parent, azureCluster, azureClusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureClusterRequest actualRequest = ((CreateAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(azureCluster, actualRequest.getAzureCluster()); + Assert.assertEquals(azureClusterId, actualRequest.getAzureClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + String azureClusterId = "azureClusterId191689446"; + client.createAzureClusterAsync(parent, azureCluster, azureClusterId).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 createAzureClusterTest2() throws Exception { + AzureCluster expectedResponse = + AzureCluster.newBuilder() + .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setAzureRegion("azureRegion1270271587") + .setResourceGroupId("resourceGroupId928392204") + .setAzureClient("azureClient847354682") + .setNetworking(AzureClusterNetworking.newBuilder().build()) + .setControlPlane(AzureControlPlane.newBuilder().build()) + .setAuthorization(AzureAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setManagedResources(AzureClusterResources.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String parent = "parent-995424086"; + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + String azureClusterId = "azureClusterId191689446"; + + AzureCluster actualResponse = + client.createAzureClusterAsync(parent, azureCluster, azureClusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureClusterRequest actualRequest = ((CreateAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(azureCluster, actualRequest.getAzureCluster()); + Assert.assertEquals(azureClusterId, actualRequest.getAzureClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + String azureClusterId = "azureClusterId191689446"; + client.createAzureClusterAsync(parent, azureCluster, azureClusterId).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 updateAzureClusterTest() throws Exception { + AzureCluster expectedResponse = + AzureCluster.newBuilder() + .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setAzureRegion("azureRegion1270271587") + .setResourceGroupId("resourceGroupId928392204") + .setAzureClient("azureClient847354682") + .setNetworking(AzureClusterNetworking.newBuilder().build()) + .setControlPlane(AzureControlPlane.newBuilder().build()) + .setAuthorization(AzureAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setManagedResources(AzureClusterResources.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAzureClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AzureCluster actualResponse = client.updateAzureClusterAsync(azureCluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAzureClusterRequest actualRequest = ((UpdateAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(azureCluster, actualRequest.getAzureCluster()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAzureClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureCluster azureCluster = AzureCluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAzureClusterAsync(azureCluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAzureClusterTest() throws Exception { + AzureCluster expectedResponse = + AzureCluster.newBuilder() + .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setAzureRegion("azureRegion1270271587") + .setResourceGroupId("resourceGroupId928392204") + .setAzureClient("azureClient847354682") + .setNetworking(AzureClusterNetworking.newBuilder().build()) + .setControlPlane(AzureControlPlane.newBuilder().build()) + .setAuthorization(AzureAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setManagedResources(AzureClusterResources.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + + AzureCluster actualResponse = client.getAzureCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureClusterRequest actualRequest = ((GetAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + client.getAzureCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAzureClusterTest2() throws Exception { + AzureCluster expectedResponse = + AzureCluster.newBuilder() + .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .setDescription("description-1724546052") + .setAzureRegion("azureRegion1270271587") + .setResourceGroupId("resourceGroupId928392204") + .setAzureClient("azureClient847354682") + .setNetworking(AzureClusterNetworking.newBuilder().build()) + .setControlPlane(AzureControlPlane.newBuilder().build()) + .setAuthorization(AzureAuthorization.newBuilder().build()) + .setEndpoint("endpoint1741102485") + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setWorkloadIdentityConfig(WorkloadIdentityConfig.newBuilder().build()) + .setClusterCaCertificate("clusterCaCertificate-683492737") + .setFleet(Fleet.newBuilder().build()) + .setManagedResources(AzureClusterResources.newBuilder().build()) + .setLoggingConfig(LoggingConfig.newBuilder().build()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AzureCluster actualResponse = client.getAzureCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureClusterRequest actualRequest = ((GetAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAzureCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureClustersTest() throws Exception { + AzureCluster responsesElement = AzureCluster.newBuilder().build(); + ListAzureClustersResponse expectedResponse = + ListAzureClustersResponse.newBuilder() + .setNextPageToken("") + .addAllAzureClusters(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAzureClustersPagedResponse pagedListResponse = client.listAzureClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureClustersList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureClustersRequest actualRequest = ((ListAzureClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureClustersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAzureClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureClustersTest2() throws Exception { + AzureCluster responsesElement = AzureCluster.newBuilder().build(); + ListAzureClustersResponse expectedResponse = + ListAzureClustersResponse.newBuilder() + .setNextPageToken("") + .addAllAzureClusters(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAzureClustersPagedResponse pagedListResponse = client.listAzureClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureClustersList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureClustersRequest actualRequest = ((ListAzureClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureClustersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAzureClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAzureClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + + client.deleteAzureClusterAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureClusterRequest actualRequest = ((DeleteAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + client.deleteAzureClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAzureClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAzureClusterAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureClusterRequest actualRequest = ((DeleteAzureClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.deleteAzureClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void generateAzureAccessTokenTest() throws Exception { + GenerateAzureAccessTokenResponse expectedResponse = + GenerateAzureAccessTokenResponse.newBuilder() + .setAccessToken("accessToken-1042689291") + .setExpirationTime(Timestamp.newBuilder().build()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + GenerateAzureAccessTokenRequest request = + GenerateAzureAccessTokenRequest.newBuilder() + .setAzureCluster( + AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .build(); + + GenerateAzureAccessTokenResponse actualResponse = client.generateAzureAccessToken(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateAzureAccessTokenRequest actualRequest = + ((GenerateAzureAccessTokenRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAzureCluster(), actualRequest.getAzureCluster()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateAzureAccessTokenExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + GenerateAzureAccessTokenRequest request = + GenerateAzureAccessTokenRequest.newBuilder() + .setAzureCluster( + AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString()) + .build(); + client.generateAzureAccessToken(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAzureNodePoolTest() throws Exception { + AzureNodePool expectedResponse = + AzureNodePool.newBuilder() + .setName( + AzureNodePoolName.of( + "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AzureNodeConfig.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setAutoscaling(AzureNodePoolAutoscaling.newBuilder().build()) + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setAzureAvailabilityZone("azureAvailabilityZone-304222122") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + String azureNodePoolId = "azureNodePoolId-1766264088"; + + AzureNodePool actualResponse = + client.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureNodePoolRequest actualRequest = ((CreateAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(azureNodePool, actualRequest.getAzureNodePool()); + Assert.assertEquals(azureNodePoolId, actualRequest.getAzureNodePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + String azureNodePoolId = "azureNodePoolId-1766264088"; + client.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId).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 createAzureNodePoolTest2() throws Exception { + AzureNodePool expectedResponse = + AzureNodePool.newBuilder() + .setName( + AzureNodePoolName.of( + "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AzureNodeConfig.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setAutoscaling(AzureNodePoolAutoscaling.newBuilder().build()) + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setAzureAvailabilityZone("azureAvailabilityZone-304222122") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAzureNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String parent = "parent-995424086"; + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + String azureNodePoolId = "azureNodePoolId-1766264088"; + + AzureNodePool actualResponse = + client.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAzureNodePoolRequest actualRequest = ((CreateAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(azureNodePool, actualRequest.getAzureNodePool()); + Assert.assertEquals(azureNodePoolId, actualRequest.getAzureNodePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAzureNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + String azureNodePoolId = "azureNodePoolId-1766264088"; + client.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId).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 updateAzureNodePoolTest() throws Exception { + AzureNodePool expectedResponse = + AzureNodePool.newBuilder() + .setName( + AzureNodePoolName.of( + "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AzureNodeConfig.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setAutoscaling(AzureNodePoolAutoscaling.newBuilder().build()) + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setAzureAvailabilityZone("azureAvailabilityZone-304222122") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAzureNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AzureNodePool actualResponse = client.updateAzureNodePoolAsync(azureNodePool, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAzureNodePoolRequest actualRequest = ((UpdateAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(azureNodePool, actualRequest.getAzureNodePool()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAzureNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureNodePool azureNodePool = AzureNodePool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAzureNodePoolAsync(azureNodePool, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAzureNodePoolTest() throws Exception { + AzureNodePool expectedResponse = + AzureNodePool.newBuilder() + .setName( + AzureNodePoolName.of( + "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AzureNodeConfig.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setAutoscaling(AzureNodePoolAutoscaling.newBuilder().build()) + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setAzureAvailabilityZone("azureAvailabilityZone-304222122") + .build(); + mockAzureClusters.addResponse(expectedResponse); + + AzureNodePoolName name = + AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]"); + + AzureNodePool actualResponse = client.getAzureNodePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureNodePoolRequest actualRequest = ((GetAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureNodePoolName name = + AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]"); + client.getAzureNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAzureNodePoolTest2() throws Exception { + AzureNodePool expectedResponse = + AzureNodePool.newBuilder() + .setName( + AzureNodePoolName.of( + "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]") + .toString()) + .setVersion("version351608024") + .setConfig(AzureNodeConfig.newBuilder().build()) + .setSubnetId("subnetId-2066159272") + .setAutoscaling(AzureNodePoolAutoscaling.newBuilder().build()) + .setUid("uid115792") + .setReconciling(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .putAllAnnotations(new HashMap()) + .setMaxPodsConstraint(MaxPodsConstraint.newBuilder().build()) + .setAzureAvailabilityZone("azureAvailabilityZone-304222122") + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AzureNodePool actualResponse = client.getAzureNodePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureNodePoolRequest actualRequest = ((GetAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAzureNodePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureNodePoolsTest() throws Exception { + AzureNodePool responsesElement = AzureNodePool.newBuilder().build(); + ListAzureNodePoolsResponse expectedResponse = + ListAzureNodePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllAzureNodePools(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + + ListAzureNodePoolsPagedResponse pagedListResponse = client.listAzureNodePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureNodePoolsList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureNodePoolsRequest actualRequest = ((ListAzureNodePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureNodePoolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]"); + client.listAzureNodePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAzureNodePoolsTest2() throws Exception { + AzureNodePool responsesElement = AzureNodePool.newBuilder().build(); + ListAzureNodePoolsResponse expectedResponse = + ListAzureNodePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllAzureNodePools(Arrays.asList(responsesElement)) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAzureNodePoolsPagedResponse pagedListResponse = client.listAzureNodePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAzureNodePoolsList().get(0), resources.get(0)); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAzureNodePoolsRequest actualRequest = ((ListAzureNodePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAzureNodePoolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAzureNodePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAzureNodePoolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + AzureNodePoolName name = + AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]"); + + client.deleteAzureNodePoolAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureNodePoolRequest actualRequest = ((DeleteAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureNodePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureNodePoolName name = + AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]"); + client.deleteAzureNodePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAzureNodePoolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAzureNodePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAzureClusters.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAzureNodePoolAsync(name).get(); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAzureNodePoolRequest actualRequest = ((DeleteAzureNodePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAzureNodePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.deleteAzureNodePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAzureServerConfigTest() throws Exception { + AzureServerConfig expectedResponse = + AzureServerConfig.newBuilder() + .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllValidVersions(new ArrayList()) + .addAllSupportedAzureRegions(new ArrayList()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + AzureServerConfigName name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]"); + + AzureServerConfig actualResponse = client.getAzureServerConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureServerConfigRequest actualRequest = + ((GetAzureServerConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureServerConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + AzureServerConfigName name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]"); + client.getAzureServerConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAzureServerConfigTest2() throws Exception { + AzureServerConfig expectedResponse = + AzureServerConfig.newBuilder() + .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllValidVersions(new ArrayList()) + .addAllSupportedAzureRegions(new ArrayList()) + .build(); + mockAzureClusters.addResponse(expectedResponse); + + String name = "name3373707"; + + AzureServerConfig actualResponse = client.getAzureServerConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAzureClusters.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAzureServerConfigRequest actualRequest = + ((GetAzureServerConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAzureServerConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAzureClusters.addException(exception); + + try { + String name = "name3373707"; + client.getAzureServerConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClusters.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClusters.java new file mode 100644 index 0000000..3f17aa9 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClusters.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 MockAwsClusters implements MockGrpcService { + private final MockAwsClustersImpl serviceImpl; + + public MockAwsClusters() { + serviceImpl = new MockAwsClustersImpl(); + } + + @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-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClustersImpl.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClustersImpl.java new file mode 100644 index 0000000..970ac95 --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAwsClustersImpl.java @@ -0,0 +1,314 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.gkemulticloud.v1.AwsClustersGrpc.AwsClustersImplBase; +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 MockAwsClustersImpl extends AwsClustersImplBase { + private List requests; + private Queue responses; + + public MockAwsClustersImpl() { + 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 createAwsCluster( + CreateAwsClusterRequest 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 CreateAwsCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAwsCluster( + UpdateAwsClusterRequest 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 UpdateAwsCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAwsCluster( + GetAwsClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AwsCluster) { + requests.add(request); + responseObserver.onNext(((AwsCluster) 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 GetAwsCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AwsCluster.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAwsClusters( + ListAwsClustersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAwsClustersResponse) { + requests.add(request); + responseObserver.onNext(((ListAwsClustersResponse) 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 ListAwsClusters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAwsClustersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAwsCluster( + DeleteAwsClusterRequest 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 DeleteAwsCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateAwsAccessToken( + GenerateAwsAccessTokenRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateAwsAccessTokenResponse) { + requests.add(request); + responseObserver.onNext(((GenerateAwsAccessTokenResponse) 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 GenerateAwsAccessToken, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateAwsAccessTokenResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAwsNodePool( + CreateAwsNodePoolRequest 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 CreateAwsNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAwsNodePool( + UpdateAwsNodePoolRequest 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 UpdateAwsNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAwsNodePool( + GetAwsNodePoolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AwsNodePool) { + requests.add(request); + responseObserver.onNext(((AwsNodePool) 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 GetAwsNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AwsNodePool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAwsNodePools( + ListAwsNodePoolsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAwsNodePoolsResponse) { + requests.add(request); + responseObserver.onNext(((ListAwsNodePoolsResponse) 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 ListAwsNodePools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAwsNodePoolsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAwsNodePool( + DeleteAwsNodePoolRequest 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 DeleteAwsNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAwsServerConfig( + GetAwsServerConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AwsServerConfig) { + requests.add(request); + responseObserver.onNext(((AwsServerConfig) 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 GetAwsServerConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AwsServerConfig.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClusters.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClusters.java new file mode 100644 index 0000000..85e8c2b --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClusters.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 MockAzureClusters implements MockGrpcService { + private final MockAzureClustersImpl serviceImpl; + + public MockAzureClusters() { + serviceImpl = new MockAzureClustersImpl(); + } + + @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-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClustersImpl.java b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClustersImpl.java new file mode 100644 index 0000000..d6885ef --- /dev/null +++ b/google-cloud-gke-multi-cloud/src/test/java/com/google/cloud/gkemulticloud/v1/MockAzureClustersImpl.java @@ -0,0 +1,400 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.gkemulticloud.v1.AzureClustersGrpc.AzureClustersImplBase; +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 MockAzureClustersImpl extends AzureClustersImplBase { + private List requests; + private Queue responses; + + public MockAzureClustersImpl() { + 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 createAzureClient( + CreateAzureClientRequest 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 CreateAzureClient, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAzureClient( + GetAzureClientRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AzureClient) { + requests.add(request); + responseObserver.onNext(((AzureClient) 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 GetAzureClient, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AzureClient.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAzureClients( + ListAzureClientsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAzureClientsResponse) { + requests.add(request); + responseObserver.onNext(((ListAzureClientsResponse) 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 ListAzureClients, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAzureClientsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAzureClient( + DeleteAzureClientRequest 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 DeleteAzureClient, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAzureCluster( + CreateAzureClusterRequest 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 CreateAzureCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAzureCluster( + UpdateAzureClusterRequest 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 UpdateAzureCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAzureCluster( + GetAzureClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AzureCluster) { + requests.add(request); + responseObserver.onNext(((AzureCluster) 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 GetAzureCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AzureCluster.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAzureClusters( + ListAzureClustersRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAzureClustersResponse) { + requests.add(request); + responseObserver.onNext(((ListAzureClustersResponse) 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 ListAzureClusters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAzureClustersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAzureCluster( + DeleteAzureClusterRequest 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 DeleteAzureCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateAzureAccessToken( + GenerateAzureAccessTokenRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateAzureAccessTokenResponse) { + requests.add(request); + responseObserver.onNext(((GenerateAzureAccessTokenResponse) 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 GenerateAzureAccessToken, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateAzureAccessTokenResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAzureNodePool( + CreateAzureNodePoolRequest 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 CreateAzureNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAzureNodePool( + UpdateAzureNodePoolRequest 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 UpdateAzureNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAzureNodePool( + GetAzureNodePoolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AzureNodePool) { + requests.add(request); + responseObserver.onNext(((AzureNodePool) 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 GetAzureNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AzureNodePool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAzureNodePools( + ListAzureNodePoolsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAzureNodePoolsResponse) { + requests.add(request); + responseObserver.onNext(((ListAzureNodePoolsResponse) 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 ListAzureNodePools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAzureNodePoolsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAzureNodePool( + DeleteAzureNodePoolRequest 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 DeleteAzureNodePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAzureServerConfig( + GetAzureServerConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AzureServerConfig) { + requests.add(request); + responseObserver.onNext(((AzureServerConfig) 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 GetAzureServerConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AzureServerConfig.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-gke-multi-cloud-v1/pom.xml b/grpc-google-cloud-gke-multi-cloud-v1/pom.xml new file mode 100644 index 0000000..1e5e427 --- /dev/null +++ b/grpc-google-cloud-gke-multi-cloud-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-gke-multi-cloud-v1 + GRPC library for google-cloud-gke-multi-cloud + + com.google.cloud + google-cloud-gke-multi-cloud-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-gke-multi-cloud-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-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersGrpc.java b/grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersGrpc.java new file mode 100644 index 0000000..3c3b5ea --- /dev/null +++ b/grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersGrpc.java @@ -0,0 +1,1736 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.gkemulticloud.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The AwsClusters API provides a single centrally managed service
+ * to create and manage Anthos clusters that run on AWS infrastructure.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/gkemulticloud/v1/aws_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AwsClustersGrpc { + + private AwsClustersGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.gkemulticloud.v1.AwsClusters"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, + com.google.longrunning.Operation> + getCreateAwsClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAwsCluster", + requestType = com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, + com.google.longrunning.Operation> + getCreateAwsClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, + com.google.longrunning.Operation> + getCreateAwsClusterMethod; + if ((getCreateAwsClusterMethod = AwsClustersGrpc.getCreateAwsClusterMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getCreateAwsClusterMethod = AwsClustersGrpc.getCreateAwsClusterMethod) == null) { + AwsClustersGrpc.getCreateAwsClusterMethod = + getCreateAwsClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAwsCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("CreateAwsCluster")) + .build(); + } + } + } + return getCreateAwsClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, + com.google.longrunning.Operation> + getUpdateAwsClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAwsCluster", + requestType = com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, + com.google.longrunning.Operation> + getUpdateAwsClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, + com.google.longrunning.Operation> + getUpdateAwsClusterMethod; + if ((getUpdateAwsClusterMethod = AwsClustersGrpc.getUpdateAwsClusterMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getUpdateAwsClusterMethod = AwsClustersGrpc.getUpdateAwsClusterMethod) == null) { + AwsClustersGrpc.getUpdateAwsClusterMethod = + getUpdateAwsClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAwsCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("UpdateAwsCluster")) + .build(); + } + } + } + return getUpdateAwsClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, + com.google.cloud.gkemulticloud.v1.AwsCluster> + getGetAwsClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAwsCluster", + requestType = com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AwsCluster.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, + com.google.cloud.gkemulticloud.v1.AwsCluster> + getGetAwsClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, + com.google.cloud.gkemulticloud.v1.AwsCluster> + getGetAwsClusterMethod; + if ((getGetAwsClusterMethod = AwsClustersGrpc.getGetAwsClusterMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getGetAwsClusterMethod = AwsClustersGrpc.getGetAwsClusterMethod) == null) { + AwsClustersGrpc.getGetAwsClusterMethod = + getGetAwsClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAwsCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance())) + .setSchemaDescriptor(new AwsClustersMethodDescriptorSupplier("GetAwsCluster")) + .build(); + } + } + } + return getGetAwsClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse> + getListAwsClustersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAwsClusters", + requestType = com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse> + getListAwsClustersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse> + getListAwsClustersMethod; + if ((getListAwsClustersMethod = AwsClustersGrpc.getListAwsClustersMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getListAwsClustersMethod = AwsClustersGrpc.getListAwsClustersMethod) == null) { + AwsClustersGrpc.getListAwsClustersMethod = + getListAwsClustersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAwsClusters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("ListAwsClusters")) + .build(); + } + } + } + return getListAwsClustersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, + com.google.longrunning.Operation> + getDeleteAwsClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAwsCluster", + requestType = com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, + com.google.longrunning.Operation> + getDeleteAwsClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, + com.google.longrunning.Operation> + getDeleteAwsClusterMethod; + if ((getDeleteAwsClusterMethod = AwsClustersGrpc.getDeleteAwsClusterMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getDeleteAwsClusterMethod = AwsClustersGrpc.getDeleteAwsClusterMethod) == null) { + AwsClustersGrpc.getDeleteAwsClusterMethod = + getDeleteAwsClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAwsCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("DeleteAwsCluster")) + .build(); + } + } + } + return getDeleteAwsClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + getGenerateAwsAccessTokenMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateAwsAccessToken", + requestType = com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + getGenerateAwsAccessTokenMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + getGenerateAwsAccessTokenMethod; + if ((getGenerateAwsAccessTokenMethod = AwsClustersGrpc.getGenerateAwsAccessTokenMethod) + == null) { + synchronized (AwsClustersGrpc.class) { + if ((getGenerateAwsAccessTokenMethod = AwsClustersGrpc.getGenerateAwsAccessTokenMethod) + == null) { + AwsClustersGrpc.getGenerateAwsAccessTokenMethod = + getGenerateAwsAccessTokenMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateAwsAccessToken")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("GenerateAwsAccessToken")) + .build(); + } + } + } + return getGenerateAwsAccessTokenMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, + com.google.longrunning.Operation> + getCreateAwsNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAwsNodePool", + requestType = com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, + com.google.longrunning.Operation> + getCreateAwsNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, + com.google.longrunning.Operation> + getCreateAwsNodePoolMethod; + if ((getCreateAwsNodePoolMethod = AwsClustersGrpc.getCreateAwsNodePoolMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getCreateAwsNodePoolMethod = AwsClustersGrpc.getCreateAwsNodePoolMethod) == null) { + AwsClustersGrpc.getCreateAwsNodePoolMethod = + getCreateAwsNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAwsNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("CreateAwsNodePool")) + .build(); + } + } + } + return getCreateAwsNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAwsNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAwsNodePool", + requestType = com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAwsNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAwsNodePoolMethod; + if ((getUpdateAwsNodePoolMethod = AwsClustersGrpc.getUpdateAwsNodePoolMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getUpdateAwsNodePoolMethod = AwsClustersGrpc.getUpdateAwsNodePoolMethod) == null) { + AwsClustersGrpc.getUpdateAwsNodePoolMethod = + getUpdateAwsNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAwsNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("UpdateAwsNodePool")) + .build(); + } + } + } + return getUpdateAwsNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AwsNodePool> + getGetAwsNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAwsNodePool", + requestType = com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AwsNodePool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AwsNodePool> + getGetAwsNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AwsNodePool> + getGetAwsNodePoolMethod; + if ((getGetAwsNodePoolMethod = AwsClustersGrpc.getGetAwsNodePoolMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getGetAwsNodePoolMethod = AwsClustersGrpc.getGetAwsNodePoolMethod) == null) { + AwsClustersGrpc.getGetAwsNodePoolMethod = + getGetAwsNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAwsNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("GetAwsNodePool")) + .build(); + } + } + } + return getGetAwsNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse> + getListAwsNodePoolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAwsNodePools", + requestType = com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse> + getListAwsNodePoolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse> + getListAwsNodePoolsMethod; + if ((getListAwsNodePoolsMethod = AwsClustersGrpc.getListAwsNodePoolsMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getListAwsNodePoolsMethod = AwsClustersGrpc.getListAwsNodePoolsMethod) == null) { + AwsClustersGrpc.getListAwsNodePoolsMethod = + getListAwsNodePoolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAwsNodePools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("ListAwsNodePools")) + .build(); + } + } + } + return getListAwsNodePoolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAwsNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAwsNodePool", + requestType = com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAwsNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAwsNodePoolMethod; + if ((getDeleteAwsNodePoolMethod = AwsClustersGrpc.getDeleteAwsNodePoolMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getDeleteAwsNodePoolMethod = AwsClustersGrpc.getDeleteAwsNodePoolMethod) == null) { + AwsClustersGrpc.getDeleteAwsNodePoolMethod = + getDeleteAwsNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAwsNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("DeleteAwsNodePool")) + .build(); + } + } + } + return getDeleteAwsNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AwsServerConfig> + getGetAwsServerConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAwsServerConfig", + requestType = com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AwsServerConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AwsServerConfig> + getGetAwsServerConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AwsServerConfig> + getGetAwsServerConfigMethod; + if ((getGetAwsServerConfigMethod = AwsClustersGrpc.getGetAwsServerConfigMethod) == null) { + synchronized (AwsClustersGrpc.class) { + if ((getGetAwsServerConfigMethod = AwsClustersGrpc.getGetAwsServerConfigMethod) == null) { + AwsClustersGrpc.getGetAwsServerConfigMethod = + getGetAwsServerConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAwsServerConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AwsServerConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new AwsClustersMethodDescriptorSupplier("GetAwsServerConfig")) + .build(); + } + } + } + return getGetAwsServerConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AwsClustersStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AwsClustersStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersStub(channel, callOptions); + } + }; + return AwsClustersStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AwsClustersBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AwsClustersBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersBlockingStub(channel, callOptions); + } + }; + return AwsClustersBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AwsClustersFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AwsClustersFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersFutureStub(channel, callOptions); + } + }; + return AwsClustersFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The AwsClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on AWS infrastructure.
+   * 
+ */ + public abstract static class AwsClustersImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAwsCluster( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAwsClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public void updateAwsCluster( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAwsClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public void getAwsCluster( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAwsClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAwsClusters( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAwsClustersMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAwsCluster( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAwsClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public void generateAwsAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateAwsAccessTokenMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAwsNodePool( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAwsNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * 
+ */ + public void updateAwsNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAwsNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * 
+ */ + public void getAwsNodePool( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAwsNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public void listAwsNodePools( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAwsNodePoolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAwsNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAwsNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns information, such as supported AWS regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public void getAwsServerConfig( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAwsServerConfigMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateAwsClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_AWS_CLUSTER))) + .addMethod( + getUpdateAwsClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_AWS_CLUSTER))) + .addMethod( + getGetAwsClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, + com.google.cloud.gkemulticloud.v1.AwsCluster>( + this, METHODID_GET_AWS_CLUSTER))) + .addMethod( + getListAwsClustersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse>( + this, METHODID_LIST_AWS_CLUSTERS))) + .addMethod( + getDeleteAwsClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_AWS_CLUSTER))) + .addMethod( + getGenerateAwsAccessTokenMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse>( + this, METHODID_GENERATE_AWS_ACCESS_TOKEN))) + .addMethod( + getCreateAwsNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_AWS_NODE_POOL))) + .addMethod( + getUpdateAwsNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_AWS_NODE_POOL))) + .addMethod( + getGetAwsNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AwsNodePool>( + this, METHODID_GET_AWS_NODE_POOL))) + .addMethod( + getListAwsNodePoolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse>( + this, METHODID_LIST_AWS_NODE_POOLS))) + .addMethod( + getDeleteAwsNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_AWS_NODE_POOL))) + .addMethod( + getGetAwsServerConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AwsServerConfig>( + this, METHODID_GET_AWS_SERVER_CONFIG))) + .build(); + } + } + + /** + * + * + *
+   * The AwsClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on AWS infrastructure.
+   * 
+ */ + public static final class AwsClustersStub + extends io.grpc.stub.AbstractAsyncStub { + private AwsClustersStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AwsClustersStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAwsCluster( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAwsClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public void updateAwsCluster( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAwsClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public void getAwsCluster( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAwsClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAwsClusters( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAwsClustersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAwsCluster( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAwsClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public void generateAwsAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateAwsAccessTokenMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAwsNodePool( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAwsNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * 
+ */ + public void updateAwsNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAwsNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * 
+ */ + public void getAwsNodePool( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAwsNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public void listAwsNodePools( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAwsNodePoolsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAwsNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAwsNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns information, such as supported AWS regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public void getAwsServerConfig( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAwsServerConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * The AwsClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on AWS infrastructure.
+   * 
+ */ + public static final class AwsClustersBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AwsClustersBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AwsClustersBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation createAwsCluster( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAwsClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public com.google.longrunning.Operation updateAwsCluster( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAwsClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAwsClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse listAwsClusters( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAwsClustersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation deleteAwsCluster( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAwsClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse generateAwsAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateAwsAccessTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation createAwsNodePool( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAwsNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * 
+ */ + public com.google.longrunning.Operation updateAwsNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAwsNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAwsNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse listAwsNodePools( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAwsNodePoolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation deleteAwsNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAwsNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns information, such as supported AWS regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AwsServerConfig getAwsServerConfig( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAwsServerConfigMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * The AwsClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on AWS infrastructure.
+   * 
+ */ + public static final class AwsClustersFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AwsClustersFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AwsClustersFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AwsClustersFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAwsCluster(com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAwsClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAwsCluster(com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAwsClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AwsCluster> + getAwsCluster(com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAwsClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse> + listAwsClusters(com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAwsClustersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAwsCluster(com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAwsClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse> + generateAwsAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateAwsAccessTokenMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAwsNodePool(com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAwsNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAwsNodePool(com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAwsNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AwsNodePool> + getAwsNodePool(com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAwsNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse> + listAwsNodePools(com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAwsNodePoolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAwsNodePool(com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAwsNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns information, such as supported AWS regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AwsServerConfig> + getAwsServerConfig(com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAwsServerConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_AWS_CLUSTER = 0; + private static final int METHODID_UPDATE_AWS_CLUSTER = 1; + private static final int METHODID_GET_AWS_CLUSTER = 2; + private static final int METHODID_LIST_AWS_CLUSTERS = 3; + private static final int METHODID_DELETE_AWS_CLUSTER = 4; + private static final int METHODID_GENERATE_AWS_ACCESS_TOKEN = 5; + private static final int METHODID_CREATE_AWS_NODE_POOL = 6; + private static final int METHODID_UPDATE_AWS_NODE_POOL = 7; + private static final int METHODID_GET_AWS_NODE_POOL = 8; + private static final int METHODID_LIST_AWS_NODE_POOLS = 9; + private static final int METHODID_DELETE_AWS_NODE_POOL = 10; + private static final int METHODID_GET_AWS_SERVER_CONFIG = 11; + + 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 AwsClustersImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AwsClustersImplBase 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_CREATE_AWS_CLUSTER: + serviceImpl.createAwsCluster( + (com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AWS_CLUSTER: + serviceImpl.updateAwsCluster( + (com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AWS_CLUSTER: + serviceImpl.getAwsCluster( + (com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AWS_CLUSTERS: + serviceImpl.listAwsClusters( + (com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse>) + responseObserver); + break; + case METHODID_DELETE_AWS_CLUSTER: + serviceImpl.deleteAwsCluster( + (com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_AWS_ACCESS_TOKEN: + serviceImpl.generateAwsAccessToken( + (com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse>) + responseObserver); + break; + case METHODID_CREATE_AWS_NODE_POOL: + serviceImpl.createAwsNodePool( + (com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AWS_NODE_POOL: + serviceImpl.updateAwsNodePool( + (com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AWS_NODE_POOL: + serviceImpl.getAwsNodePool( + (com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AWS_NODE_POOLS: + serviceImpl.listAwsNodePools( + (com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse>) + responseObserver); + break; + case METHODID_DELETE_AWS_NODE_POOL: + serviceImpl.deleteAwsNodePool( + (com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AWS_SERVER_CONFIG: + serviceImpl.getAwsServerConfig( + (com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) 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 AwsClustersBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AwsClustersBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AwsClusters"); + } + } + + private static final class AwsClustersFileDescriptorSupplier + extends AwsClustersBaseDescriptorSupplier { + AwsClustersFileDescriptorSupplier() {} + } + + private static final class AwsClustersMethodDescriptorSupplier + extends AwsClustersBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AwsClustersMethodDescriptorSupplier(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 (AwsClustersGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AwsClustersFileDescriptorSupplier()) + .addMethod(getCreateAwsClusterMethod()) + .addMethod(getUpdateAwsClusterMethod()) + .addMethod(getGetAwsClusterMethod()) + .addMethod(getListAwsClustersMethod()) + .addMethod(getDeleteAwsClusterMethod()) + .addMethod(getGenerateAwsAccessTokenMethod()) + .addMethod(getCreateAwsNodePoolMethod()) + .addMethod(getUpdateAwsNodePoolMethod()) + .addMethod(getGetAwsNodePoolMethod()) + .addMethod(getListAwsNodePoolsMethod()) + .addMethod(getDeleteAwsNodePoolMethod()) + .addMethod(getGetAwsServerConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersGrpc.java b/grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersGrpc.java new file mode 100644 index 0000000..d340927 --- /dev/null +++ b/grpc-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersGrpc.java @@ -0,0 +1,2273 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.gkemulticloud.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The AzureClusters API provides a single centrally managed service
+ * to create and manage Anthos clusters that run on Azure infrastructure.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/gkemulticloud/v1/azure_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AzureClustersGrpc { + + private AzureClustersGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.gkemulticloud.v1.AzureClusters"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest, + com.google.longrunning.Operation> + getCreateAzureClientMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAzureClient", + requestType = com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest, + com.google.longrunning.Operation> + getCreateAzureClientMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest, + com.google.longrunning.Operation> + getCreateAzureClientMethod; + if ((getCreateAzureClientMethod = AzureClustersGrpc.getCreateAzureClientMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getCreateAzureClientMethod = AzureClustersGrpc.getCreateAzureClientMethod) == null) { + AzureClustersGrpc.getCreateAzureClientMethod = + getCreateAzureClientMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAzureClient")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("CreateAzureClient")) + .build(); + } + } + } + return getCreateAzureClientMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest, + com.google.cloud.gkemulticloud.v1.AzureClient> + getGetAzureClientMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAzureClient", + requestType = com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AzureClient.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest, + com.google.cloud.gkemulticloud.v1.AzureClient> + getGetAzureClientMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest, + com.google.cloud.gkemulticloud.v1.AzureClient> + getGetAzureClientMethod; + if ((getGetAzureClientMethod = AzureClustersGrpc.getGetAzureClientMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getGetAzureClientMethod = AzureClustersGrpc.getGetAzureClientMethod) == null) { + AzureClustersGrpc.getGetAzureClientMethod = + getGetAzureClientMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAzureClient")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("GetAzureClient")) + .build(); + } + } + } + return getGetAzureClientMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse> + getListAzureClientsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAzureClients", + requestType = com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse> + getListAzureClientsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse> + getListAzureClientsMethod; + if ((getListAzureClientsMethod = AzureClustersGrpc.getListAzureClientsMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getListAzureClientsMethod = AzureClustersGrpc.getListAzureClientsMethod) == null) { + AzureClustersGrpc.getListAzureClientsMethod = + getListAzureClientsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAzureClients")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("ListAzureClients")) + .build(); + } + } + } + return getListAzureClientsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest, + com.google.longrunning.Operation> + getDeleteAzureClientMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAzureClient", + requestType = com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest, + com.google.longrunning.Operation> + getDeleteAzureClientMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest, + com.google.longrunning.Operation> + getDeleteAzureClientMethod; + if ((getDeleteAzureClientMethod = AzureClustersGrpc.getDeleteAzureClientMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getDeleteAzureClientMethod = AzureClustersGrpc.getDeleteAzureClientMethod) == null) { + AzureClustersGrpc.getDeleteAzureClientMethod = + getDeleteAzureClientMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAzureClient")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("DeleteAzureClient")) + .build(); + } + } + } + return getDeleteAzureClientMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest, + com.google.longrunning.Operation> + getCreateAzureClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAzureCluster", + requestType = com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest, + com.google.longrunning.Operation> + getCreateAzureClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest, + com.google.longrunning.Operation> + getCreateAzureClusterMethod; + if ((getCreateAzureClusterMethod = AzureClustersGrpc.getCreateAzureClusterMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getCreateAzureClusterMethod = AzureClustersGrpc.getCreateAzureClusterMethod) == null) { + AzureClustersGrpc.getCreateAzureClusterMethod = + getCreateAzureClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAzureCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("CreateAzureCluster")) + .build(); + } + } + } + return getCreateAzureClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest, + com.google.longrunning.Operation> + getUpdateAzureClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAzureCluster", + requestType = com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest, + com.google.longrunning.Operation> + getUpdateAzureClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest, + com.google.longrunning.Operation> + getUpdateAzureClusterMethod; + if ((getUpdateAzureClusterMethod = AzureClustersGrpc.getUpdateAzureClusterMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getUpdateAzureClusterMethod = AzureClustersGrpc.getUpdateAzureClusterMethod) == null) { + AzureClustersGrpc.getUpdateAzureClusterMethod = + getUpdateAzureClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAzureCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("UpdateAzureCluster")) + .build(); + } + } + } + return getUpdateAzureClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest, + com.google.cloud.gkemulticloud.v1.AzureCluster> + getGetAzureClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAzureCluster", + requestType = com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AzureCluster.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest, + com.google.cloud.gkemulticloud.v1.AzureCluster> + getGetAzureClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest, + com.google.cloud.gkemulticloud.v1.AzureCluster> + getGetAzureClusterMethod; + if ((getGetAzureClusterMethod = AzureClustersGrpc.getGetAzureClusterMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getGetAzureClusterMethod = AzureClustersGrpc.getGetAzureClusterMethod) == null) { + AzureClustersGrpc.getGetAzureClusterMethod = + getGetAzureClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAzureCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("GetAzureCluster")) + .build(); + } + } + } + return getGetAzureClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse> + getListAzureClustersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAzureClusters", + requestType = com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse> + getListAzureClustersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse> + getListAzureClustersMethod; + if ((getListAzureClustersMethod = AzureClustersGrpc.getListAzureClustersMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getListAzureClustersMethod = AzureClustersGrpc.getListAzureClustersMethod) == null) { + AzureClustersGrpc.getListAzureClustersMethod = + getListAzureClustersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAzureClusters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("ListAzureClusters")) + .build(); + } + } + } + return getListAzureClustersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest, + com.google.longrunning.Operation> + getDeleteAzureClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAzureCluster", + requestType = com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest, + com.google.longrunning.Operation> + getDeleteAzureClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest, + com.google.longrunning.Operation> + getDeleteAzureClusterMethod; + if ((getDeleteAzureClusterMethod = AzureClustersGrpc.getDeleteAzureClusterMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getDeleteAzureClusterMethod = AzureClustersGrpc.getDeleteAzureClusterMethod) == null) { + AzureClustersGrpc.getDeleteAzureClusterMethod = + getDeleteAzureClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAzureCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("DeleteAzureCluster")) + .build(); + } + } + } + return getDeleteAzureClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + getGenerateAzureAccessTokenMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateAzureAccessToken", + requestType = com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + getGenerateAzureAccessTokenMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + getGenerateAzureAccessTokenMethod; + if ((getGenerateAzureAccessTokenMethod = AzureClustersGrpc.getGenerateAzureAccessTokenMethod) + == null) { + synchronized (AzureClustersGrpc.class) { + if ((getGenerateAzureAccessTokenMethod = + AzureClustersGrpc.getGenerateAzureAccessTokenMethod) + == null) { + AzureClustersGrpc.getGenerateAzureAccessTokenMethod = + getGenerateAzureAccessTokenMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateAzureAccessToken")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("GenerateAzureAccessToken")) + .build(); + } + } + } + return getGenerateAzureAccessTokenMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest, + com.google.longrunning.Operation> + getCreateAzureNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAzureNodePool", + requestType = com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest, + com.google.longrunning.Operation> + getCreateAzureNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest, + com.google.longrunning.Operation> + getCreateAzureNodePoolMethod; + if ((getCreateAzureNodePoolMethod = AzureClustersGrpc.getCreateAzureNodePoolMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getCreateAzureNodePoolMethod = AzureClustersGrpc.getCreateAzureNodePoolMethod) + == null) { + AzureClustersGrpc.getCreateAzureNodePoolMethod = + getCreateAzureNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAzureNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("CreateAzureNodePool")) + .build(); + } + } + } + return getCreateAzureNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAzureNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAzureNodePool", + requestType = com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAzureNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest, + com.google.longrunning.Operation> + getUpdateAzureNodePoolMethod; + if ((getUpdateAzureNodePoolMethod = AzureClustersGrpc.getUpdateAzureNodePoolMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getUpdateAzureNodePoolMethod = AzureClustersGrpc.getUpdateAzureNodePoolMethod) + == null) { + AzureClustersGrpc.getUpdateAzureNodePoolMethod = + getUpdateAzureNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAzureNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("UpdateAzureNodePool")) + .build(); + } + } + } + return getUpdateAzureNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AzureNodePool> + getGetAzureNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAzureNodePool", + requestType = com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AzureNodePool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AzureNodePool> + getGetAzureNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AzureNodePool> + getGetAzureNodePoolMethod; + if ((getGetAzureNodePoolMethod = AzureClustersGrpc.getGetAzureNodePoolMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getGetAzureNodePoolMethod = AzureClustersGrpc.getGetAzureNodePoolMethod) == null) { + AzureClustersGrpc.getGetAzureNodePoolMethod = + getGetAzureNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAzureNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("GetAzureNodePool")) + .build(); + } + } + } + return getGetAzureNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse> + getListAzureNodePoolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAzureNodePools", + requestType = com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse> + getListAzureNodePoolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse> + getListAzureNodePoolsMethod; + if ((getListAzureNodePoolsMethod = AzureClustersGrpc.getListAzureNodePoolsMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getListAzureNodePoolsMethod = AzureClustersGrpc.getListAzureNodePoolsMethod) == null) { + AzureClustersGrpc.getListAzureNodePoolsMethod = + getListAzureNodePoolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAzureNodePools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("ListAzureNodePools")) + .build(); + } + } + } + return getListAzureNodePoolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAzureNodePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAzureNodePool", + requestType = com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAzureNodePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest, + com.google.longrunning.Operation> + getDeleteAzureNodePoolMethod; + if ((getDeleteAzureNodePoolMethod = AzureClustersGrpc.getDeleteAzureNodePoolMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getDeleteAzureNodePoolMethod = AzureClustersGrpc.getDeleteAzureNodePoolMethod) + == null) { + AzureClustersGrpc.getDeleteAzureNodePoolMethod = + getDeleteAzureNodePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteAzureNodePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("DeleteAzureNodePool")) + .build(); + } + } + } + return getDeleteAzureNodePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AzureServerConfig> + getGetAzureServerConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAzureServerConfig", + requestType = com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.class, + responseType = com.google.cloud.gkemulticloud.v1.AzureServerConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AzureServerConfig> + getGetAzureServerConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AzureServerConfig> + getGetAzureServerConfigMethod; + if ((getGetAzureServerConfigMethod = AzureClustersGrpc.getGetAzureServerConfigMethod) == null) { + synchronized (AzureClustersGrpc.class) { + if ((getGetAzureServerConfigMethod = AzureClustersGrpc.getGetAzureServerConfigMethod) + == null) { + AzureClustersGrpc.getGetAzureServerConfigMethod = + getGetAzureServerConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAzureServerConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gkemulticloud.v1.AzureServerConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new AzureClustersMethodDescriptorSupplier("GetAzureServerConfig")) + .build(); + } + } + } + return getGetAzureServerConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AzureClustersStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AzureClustersStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersStub(channel, callOptions); + } + }; + return AzureClustersStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AzureClustersBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AzureClustersBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersBlockingStub(channel, callOptions); + } + }; + return AzureClustersBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AzureClustersFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AzureClustersFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersFutureStub(channel, callOptions); + } + }; + return AzureClustersFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The AzureClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on Azure infrastructure.
+   * 
+ */ + public abstract static class AzureClustersImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project
+     * and region.
+     * `AzureClient` resources hold client authentication
+     * information needed by the Anthos Multicloud API to manage Azure resources
+     * on your Azure subscription on your behalf.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureClient( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAzureClientMethod(), responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * 
+ */ + public void getAzureClient( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAzureClientMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAzureClients( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAzureClientsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * If the client is used by one or more clusters, deletion will
+     * fail and a `FAILED_PRECONDITION` error will be returned.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureClient( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAzureClientMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureCluster( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAzureClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public void updateAzureCluster( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAzureClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public void getAzureCluster( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAzureClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAzureClusters( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAzureClustersMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureCluster( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAzureClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public void generateAzureAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateAzureAccessTokenMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureNodePool( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAzureNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * 
+ */ + public void updateAzureNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAzureNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * 
+ */ + public void getAzureNodePool( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAzureNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public void listAzureNodePools( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAzureNodePoolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAzureNodePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns information, such as supported Azure regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public void getAzureServerConfig( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAzureServerConfigMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateAzureClientMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_AZURE_CLIENT))) + .addMethod( + getGetAzureClientMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest, + com.google.cloud.gkemulticloud.v1.AzureClient>( + this, METHODID_GET_AZURE_CLIENT))) + .addMethod( + getListAzureClientsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>( + this, METHODID_LIST_AZURE_CLIENTS))) + .addMethod( + getDeleteAzureClientMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_AZURE_CLIENT))) + .addMethod( + getCreateAzureClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_AZURE_CLUSTER))) + .addMethod( + getUpdateAzureClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_AZURE_CLUSTER))) + .addMethod( + getGetAzureClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest, + com.google.cloud.gkemulticloud.v1.AzureCluster>( + this, METHODID_GET_AZURE_CLUSTER))) + .addMethod( + getListAzureClustersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse>( + this, METHODID_LIST_AZURE_CLUSTERS))) + .addMethod( + getDeleteAzureClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_AZURE_CLUSTER))) + .addMethod( + getGenerateAzureAccessTokenMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>( + this, METHODID_GENERATE_AZURE_ACCESS_TOKEN))) + .addMethod( + getCreateAzureNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_AZURE_NODE_POOL))) + .addMethod( + getUpdateAzureNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_AZURE_NODE_POOL))) + .addMethod( + getGetAzureNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest, + com.google.cloud.gkemulticloud.v1.AzureNodePool>( + this, METHODID_GET_AZURE_NODE_POOL))) + .addMethod( + getListAzureNodePoolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse>( + this, METHODID_LIST_AZURE_NODE_POOLS))) + .addMethod( + getDeleteAzureNodePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_AZURE_NODE_POOL))) + .addMethod( + getGetAzureServerConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest, + com.google.cloud.gkemulticloud.v1.AzureServerConfig>( + this, METHODID_GET_AZURE_SERVER_CONFIG))) + .build(); + } + } + + /** + * + * + *
+   * The AzureClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on Azure infrastructure.
+   * 
+ */ + public static final class AzureClustersStub + extends io.grpc.stub.AbstractAsyncStub { + private AzureClustersStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AzureClustersStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project
+     * and region.
+     * `AzureClient` resources hold client authentication
+     * information needed by the Anthos Multicloud API to manage Azure resources
+     * on your Azure subscription on your behalf.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureClient( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAzureClientMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * 
+ */ + public void getAzureClient( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAzureClientMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAzureClients( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAzureClientsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * If the client is used by one or more clusters, deletion will
+     * fail and a `FAILED_PRECONDITION` error will be returned.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureClient( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAzureClientMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureCluster( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAzureClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public void updateAzureCluster( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAzureClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public void getAzureCluster( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAzureClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public void listAzureClusters( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAzureClustersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureCluster( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAzureClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public void generateAzureAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateAzureAccessTokenMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void createAzureNodePool( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAzureNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * 
+ */ + public void updateAzureNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAzureNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * 
+ */ + public void getAzureNodePool( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAzureNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public void listAzureNodePools( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAzureNodePoolsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public void deleteAzureNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAzureNodePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns information, such as supported Azure regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public void getAzureServerConfig( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAzureServerConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * The AzureClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on Azure infrastructure.
+   * 
+ */ + public static final class AzureClustersBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AzureClustersBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AzureClustersBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project
+     * and region.
+     * `AzureClient` resources hold client authentication
+     * information needed by the Anthos Multicloud API to manage Azure resources
+     * on your Azure subscription on your behalf.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation createAzureClient( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAzureClientMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AzureClient getAzureClient( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAzureClientMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse listAzureClients( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAzureClientsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * If the client is used by one or more clusters, deletion will
+     * fail and a `FAILED_PRECONDITION` error will be returned.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation deleteAzureClient( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAzureClientMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation createAzureCluster( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAzureClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public com.google.longrunning.Operation updateAzureCluster( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAzureClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAzureClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse listAzureClusters( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAzureClustersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation deleteAzureCluster( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAzureClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + generateAzureAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateAzureAccessTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation createAzureNodePool( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAzureNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * 
+ */ + public com.google.longrunning.Operation updateAzureNodePool( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAzureNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAzureNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse listAzureNodePools( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAzureNodePoolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.longrunning.Operation deleteAzureNodePool( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAzureNodePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns information, such as supported Azure regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public com.google.cloud.gkemulticloud.v1.AzureServerConfig getAzureServerConfig( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAzureServerConfigMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * The AzureClusters API provides a single centrally managed service
+   * to create and manage Anthos clusters that run on Azure infrastructure.
+   * 
+ */ + public static final class AzureClustersFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AzureClustersFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AzureClustersFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AzureClustersFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project
+     * and region.
+     * `AzureClient` resources hold client authentication
+     * information needed by the Anthos Multicloud API to manage Azure resources
+     * on your Azure subscription on your behalf.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAzureClient(com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAzureClientMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AzureClient> + getAzureClient(com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAzureClientMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse> + listAzureClients(com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAzureClientsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
+     * If the client is used by one or more clusters, deletion will
+     * fail and a `FAILED_PRECONDITION` error will be returned.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAzureClient(com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAzureClientMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAzureCluster(com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAzureClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAzureCluster(com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAzureClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AzureCluster> + getAzureCluster(com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAzureClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and
+     * region.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse> + listAzureClusters(com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAzureClustersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resources.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAzureCluster(com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAzureClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates a short-lived access token to authenticate to a given
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse> + generateAzureAccessToken( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateAzureAccessTokenMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAzureNodePool(com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAzureNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAzureNodePool(com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAzureNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AzureNodePool> + getAzureNodePool(com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAzureNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse> + listAzureNodePools(com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAzureNodePoolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
+     * If successful, the response contains a newly created
+     * [Operation][google.longrunning.Operation] resource that can be
+     * described to track the status of the operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAzureNodePool(com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAzureNodePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns information, such as supported Azure regions and Kubernetes
+     * versions, on a given Google Cloud location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gkemulticloud.v1.AzureServerConfig> + getAzureServerConfig( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAzureServerConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_AZURE_CLIENT = 0; + private static final int METHODID_GET_AZURE_CLIENT = 1; + private static final int METHODID_LIST_AZURE_CLIENTS = 2; + private static final int METHODID_DELETE_AZURE_CLIENT = 3; + private static final int METHODID_CREATE_AZURE_CLUSTER = 4; + private static final int METHODID_UPDATE_AZURE_CLUSTER = 5; + private static final int METHODID_GET_AZURE_CLUSTER = 6; + private static final int METHODID_LIST_AZURE_CLUSTERS = 7; + private static final int METHODID_DELETE_AZURE_CLUSTER = 8; + private static final int METHODID_GENERATE_AZURE_ACCESS_TOKEN = 9; + private static final int METHODID_CREATE_AZURE_NODE_POOL = 10; + private static final int METHODID_UPDATE_AZURE_NODE_POOL = 11; + private static final int METHODID_GET_AZURE_NODE_POOL = 12; + private static final int METHODID_LIST_AZURE_NODE_POOLS = 13; + private static final int METHODID_DELETE_AZURE_NODE_POOL = 14; + private static final int METHODID_GET_AZURE_SERVER_CONFIG = 15; + + 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 AzureClustersImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AzureClustersImplBase 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_CREATE_AZURE_CLIENT: + serviceImpl.createAzureClient( + (com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AZURE_CLIENT: + serviceImpl.getAzureClient( + (com.google.cloud.gkemulticloud.v1.GetAzureClientRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AZURE_CLIENTS: + serviceImpl.listAzureClients( + (com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>) + responseObserver); + break; + case METHODID_DELETE_AZURE_CLIENT: + serviceImpl.deleteAzureClient( + (com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_AZURE_CLUSTER: + serviceImpl.createAzureCluster( + (com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AZURE_CLUSTER: + serviceImpl.updateAzureCluster( + (com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AZURE_CLUSTER: + serviceImpl.getAzureCluster( + (com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AZURE_CLUSTERS: + serviceImpl.listAzureClusters( + (com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse>) + responseObserver); + break; + case METHODID_DELETE_AZURE_CLUSTER: + serviceImpl.deleteAzureCluster( + (com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_AZURE_ACCESS_TOKEN: + serviceImpl.generateAzureAccessToken( + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>) + responseObserver); + break; + case METHODID_CREATE_AZURE_NODE_POOL: + serviceImpl.createAzureNodePool( + (com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AZURE_NODE_POOL: + serviceImpl.updateAzureNodePool( + (com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AZURE_NODE_POOL: + serviceImpl.getAzureNodePool( + (com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AZURE_NODE_POOLS: + serviceImpl.listAzureNodePools( + (com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse>) + responseObserver); + break; + case METHODID_DELETE_AZURE_NODE_POOL: + serviceImpl.deleteAzureNodePool( + (com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AZURE_SERVER_CONFIG: + serviceImpl.getAzureServerConfig( + (com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) 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 AzureClustersBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AzureClustersBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AzureClusters"); + } + } + + private static final class AzureClustersFileDescriptorSupplier + extends AzureClustersBaseDescriptorSupplier { + AzureClustersFileDescriptorSupplier() {} + } + + private static final class AzureClustersMethodDescriptorSupplier + extends AzureClustersBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AzureClustersMethodDescriptorSupplier(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 (AzureClustersGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AzureClustersFileDescriptorSupplier()) + .addMethod(getCreateAzureClientMethod()) + .addMethod(getGetAzureClientMethod()) + .addMethod(getListAzureClientsMethod()) + .addMethod(getDeleteAzureClientMethod()) + .addMethod(getCreateAzureClusterMethod()) + .addMethod(getUpdateAzureClusterMethod()) + .addMethod(getGetAzureClusterMethod()) + .addMethod(getListAzureClustersMethod()) + .addMethod(getDeleteAzureClusterMethod()) + .addMethod(getGenerateAzureAccessTokenMethod()) + .addMethod(getCreateAzureNodePoolMethod()) + .addMethod(getUpdateAzureNodePoolMethod()) + .addMethod(getGetAzureNodePoolMethod()) + .addMethod(getListAzureNodePoolsMethod()) + .addMethod(getDeleteAzureNodePoolMethod()) + .addMethod(getGetAzureServerConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 0000000..d0970ba --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT 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 0000000..6597fce --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 0000000..7724346 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..888fe86 --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gke-multi-cloud-parent + pom + 0.0.1-SNAPSHOT + Google Anthos Multicloud Parent + https://github.com/googleapis/java-gke-multi-cloud + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 1.2.7 + + + + + chingor + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google LLC + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-gke-multi-cloud.git + scm:git:git@github.com:googleapis/java-gke-multi-cloud.git + https://github.com/googleapis/java-gke-multi-cloud + HEAD + + + https://github.com/googleapis/java-gke-multi-cloud/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-gke-multi-cloud-parent + + + + + + com.google.cloud + google-cloud-gke-multi-cloud + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 2.8.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-gke-multi-cloud + grpc-google-cloud-gke-multi-cloud-v1 + proto-google-cloud-gke-multi-cloud-v1 + google-cloud-gke-multi-cloud-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-gke-multi-cloud-v1/clirr-ignored-differences.xml b/proto-google-cloud-gke-multi-cloud-v1/clirr-ignored-differences.xml new file mode 100644 index 0000000..6f047d4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/gkemulticloud/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/gkemulticloud/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/gkemulticloud/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-gke-multi-cloud-v1/pom.xml b/proto-google-cloud-gke-multi-cloud-v1/pom.xml new file mode 100644 index 0000000..4844913 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-gke-multi-cloud-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-gke-multi-cloud-v1 + Proto library for google-cloud-gke-multi-cloud + + com.google.cloud + google-cloud-gke-multi-cloud-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-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorization.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorization.java new file mode 100644 index 0000000..1b1c7f5 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorization.java @@ -0,0 +1,1099 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to the cluster RBAC settings.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsAuthorization} + */ +public final class AwsAuthorization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsAuthorization) + AwsAuthorizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsAuthorization.newBuilder() to construct. + private AwsAuthorization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsAuthorization() { + adminUsers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsAuthorization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsAuthorization( + 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)) { + adminUsers_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + adminUsers_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsClusterUser.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + adminUsers_ = java.util.Collections.unmodifiableList(adminUsers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsAuthorization.class, + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder.class); + } + + public static final int ADMIN_USERS_FIELD_NUMBER = 1; + private java.util.List adminUsers_; + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getAdminUsersList() { + return adminUsers_; + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAdminUsersOrBuilderList() { + return adminUsers_; + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAdminUsersCount() { + return adminUsers_.size(); + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUser getAdminUsers(int index) { + return adminUsers_.get(index); + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder getAdminUsersOrBuilder( + int index) { + return adminUsers_.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 < adminUsers_.size(); i++) { + output.writeMessage(1, adminUsers_.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 < adminUsers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, adminUsers_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsAuthorization)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsAuthorization other = + (com.google.cloud.gkemulticloud.v1.AwsAuthorization) obj; + + if (!getAdminUsersList().equals(other.getAdminUsersList())) 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 (getAdminUsersCount() > 0) { + hash = (37 * hash) + ADMIN_USERS_FIELD_NUMBER; + hash = (53 * hash) + getAdminUsersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsAuthorization 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; + } + /** + * + * + *
+   * Configuration related to the cluster RBAC settings.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsAuthorization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsAuthorization) + com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsAuthorization.class, + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsAuthorization.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAdminUsersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (adminUsersBuilder_ == null) { + adminUsers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + adminUsersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorization getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsAuthorization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorization build() { + com.google.cloud.gkemulticloud.v1.AwsAuthorization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorization buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsAuthorization result = + new com.google.cloud.gkemulticloud.v1.AwsAuthorization(this); + int from_bitField0_ = bitField0_; + if (adminUsersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + adminUsers_ = java.util.Collections.unmodifiableList(adminUsers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.adminUsers_ = adminUsers_; + } else { + result.adminUsers_ = adminUsersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsAuthorization) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsAuthorization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsAuthorization other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsAuthorization.getDefaultInstance()) + return this; + if (adminUsersBuilder_ == null) { + if (!other.adminUsers_.isEmpty()) { + if (adminUsers_.isEmpty()) { + adminUsers_ = other.adminUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdminUsersIsMutable(); + adminUsers_.addAll(other.adminUsers_); + } + onChanged(); + } + } else { + if (!other.adminUsers_.isEmpty()) { + if (adminUsersBuilder_.isEmpty()) { + adminUsersBuilder_.dispose(); + adminUsersBuilder_ = null; + adminUsers_ = other.adminUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + adminUsersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdminUsersFieldBuilder() + : null; + } else { + adminUsersBuilder_.addAllMessages(other.adminUsers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsAuthorization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsAuthorization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List adminUsers_ = + java.util.Collections.emptyList(); + + private void ensureAdminUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + adminUsers_ = + new java.util.ArrayList(adminUsers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterUser, + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder> + adminUsersBuilder_; + + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAdminUsersList() { + if (adminUsersBuilder_ == null) { + return java.util.Collections.unmodifiableList(adminUsers_); + } else { + return adminUsersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAdminUsersCount() { + if (adminUsersBuilder_ == null) { + return adminUsers_.size(); + } else { + return adminUsersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterUser getAdminUsers(int index) { + if (adminUsersBuilder_ == null) { + return adminUsers_.get(index); + } else { + return adminUsersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AwsClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.set(index, value); + onChanged(); + } else { + adminUsersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.set(index, builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers(com.google.cloud.gkemulticloud.v1.AwsClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.add(value); + onChanged(); + } else { + adminUsersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AwsClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.add(index, value); + onChanged(); + } else { + adminUsersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.add(builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.add(index, builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAdminUsers( + java.lang.Iterable values) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, adminUsers_); + onChanged(); + } else { + adminUsersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAdminUsers() { + if (adminUsersBuilder_ == null) { + adminUsers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + adminUsersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAdminUsers(int index) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.remove(index); + onChanged(); + } else { + adminUsersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder getAdminUsersBuilder( + int index) { + return getAdminUsersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder getAdminUsersOrBuilder( + int index) { + if (adminUsersBuilder_ == null) { + return adminUsers_.get(index); + } else { + return adminUsersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAdminUsersOrBuilderList() { + if (adminUsersBuilder_ != null) { + return adminUsersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(adminUsers_); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder addAdminUsersBuilder() { + return getAdminUsersFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AwsClusterUser.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder addAdminUsersBuilder( + int index) { + return getAdminUsersFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AwsClusterUser.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAdminUsersBuilderList() { + return getAdminUsersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterUser, + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder> + getAdminUsersFieldBuilder() { + if (adminUsersBuilder_ == null) { + adminUsersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterUser, + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder>( + adminUsers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + adminUsers_ = null; + } + return adminUsersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsAuthorization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsAuthorization) + private static final com.google.cloud.gkemulticloud.v1.AwsAuthorization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsAuthorization(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsAuthorization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsAuthorization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsAuthorization(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorizationOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorizationOrBuilder.java new file mode 100644 index 0000000..e5b98f9 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsAuthorizationOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsAuthorizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsAuthorization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getAdminUsersList(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsClusterUser getAdminUsers(int index); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAdminUsersCount(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAdminUsersOrBuilderList(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder getAdminUsersOrBuilder(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsCluster.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsCluster.java new file mode 100644 index 0000000..f17b3ac --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsCluster.java @@ -0,0 +1,5134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * An Anthos cluster running on AWS.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsCluster} + */ +public final class AwsCluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsCluster) + AwsClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsCluster.newBuilder() to construct. + private AwsCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsCluster() { + name_ = ""; + description_ = ""; + awsRegion_ = ""; + state_ = 0; + endpoint_ = ""; + uid_ = ""; + etag_ = ""; + clusterCaCertificate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsCluster(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsCluster( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder subBuilder = null; + if (networking_ != null) { + subBuilder = networking_.toBuilder(); + } + networking_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networking_); + networking_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + awsRegion_ = s; + break; + } + case 42: + { + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder subBuilder = null; + if (controlPlane_ != null) { + subBuilder = controlPlane_.toBuilder(); + } + controlPlane_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsControlPlane.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(controlPlane_); + controlPlane_ = subBuilder.buildPartial(); + } + + break; + } + case 56: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + endpoint_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 80: + { + reconciling_ = input.readBool(); + break; + } + case 90: + { + 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 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 114: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 122: + { + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder subBuilder = null; + if (authorization_ != null) { + subBuilder = authorization_.toBuilder(); + } + authorization_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsAuthorization.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(authorization_); + authorization_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder subBuilder = null; + if (workloadIdentityConfig_ != null) { + subBuilder = workloadIdentityConfig_.toBuilder(); + } + workloadIdentityConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(workloadIdentityConfig_); + workloadIdentityConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterCaCertificate_ = s; + break; + } + case 146: + { + com.google.cloud.gkemulticloud.v1.Fleet.Builder subBuilder = null; + if (fleet_ != null) { + subBuilder = fleet_.toBuilder(); + } + fleet_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.Fleet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fleet_); + fleet_ = subBuilder.buildPartial(); + } + + break; + } + case 154: + { + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder subBuilder = null; + if (loggingConfig_ != null) { + subBuilder = loggingConfig_.toBuilder(); + } + loggingConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.LoggingConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(loggingConfig_); + loggingConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsCluster.class, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder.class); + } + + /** + * + * + *
+   * The lifecycle state of the cluster.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AwsCluster.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The RECONCILING state indicates that some work is actively being done on
+     * the cluster, such as upgrading the control plane replicas.
+     * 
+ * + * RECONCILING = 3; + */ + RECONCILING(3), + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The ERROR state indicates the cluster is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * The DEGRADED state indicates the cluster requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + DEGRADED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The RECONCILING state indicates that some work is actively being done on
+     * the cluster, such as upgrading the control plane replicas.
+     * 
+ * + * RECONCILING = 3; + */ + public static final int RECONCILING_VALUE = 3; + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The ERROR state indicates the cluster is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The DEGRADED state indicates the cluster requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + public static final int DEGRADED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return RUNNING; + case 3: + return RECONCILING; + case 4: + return STOPPING; + case 5: + return ERROR; + case 6: + return DEGRADED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsCluster.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AwsCluster.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORKING_FIELD_NUMBER = 3; + private com.google.cloud.gkemulticloud.v1.AwsClusterNetworking networking_; + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + @java.lang.Override + public boolean hasNetworking() { + return networking_ != null; + } + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getNetworking() { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.getDefaultInstance() + : networking_; + } + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder getNetworkingOrBuilder() { + return getNetworking(); + } + + public static final int AWS_REGION_FIELD_NUMBER = 4; + private volatile java.lang.Object awsRegion_; + /** + * + * + *
+   * Required. The AWS region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby AWS regions.
+   * You can call
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+   * to list all supported AWS regions within a given Google Cloud region.
+   * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRegion. + */ + @java.lang.Override + public java.lang.String getAwsRegion() { + java.lang.Object ref = awsRegion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsRegion_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The AWS region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby AWS regions.
+   * You can call
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+   * to list all supported AWS regions within a given Google Cloud region.
+   * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRegion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAwsRegionBytes() { + java.lang.Object ref = awsRegion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTROL_PLANE_FIELD_NUMBER = 5; + private com.google.cloud.gkemulticloud.v1.AwsControlPlane controlPlane_; + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + @java.lang.Override + public boolean hasControlPlane() { + return controlPlane_ != null; + } + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlane getControlPlane() { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AwsControlPlane.getDefaultInstance() + : controlPlane_; + } + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder getControlPlaneOrBuilder() { + return getControlPlane(); + } + + public static final int AUTHORIZATION_FIELD_NUMBER = 15; + private com.google.cloud.gkemulticloud.v1.AwsAuthorization authorization_; + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + @java.lang.Override + public boolean hasAuthorization() { + return authorization_ != null; + } + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorization getAuthorization() { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AwsAuthorization.getDefaultInstance() + : authorization_; + } + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder getAuthorizationOrBuilder() { + return getAuthorization(); + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_; + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsCluster.State result = + com.google.cloud.gkemulticloud.v1.AwsCluster.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.State.UNRECOGNIZED + : result; + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 9; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONCILING_FIELD_NUMBER = 10; + private boolean reconciling_; + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the cluster.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 13; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 14; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int WORKLOAD_IDENTITY_CONFIG_FIELD_NUMBER = 16; + private com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workloadIdentityConfig_; + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + @java.lang.Override + public boolean hasWorkloadIdentityConfig() { + return workloadIdentityConfig_ != null; + } + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig() { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder() { + return getWorkloadIdentityConfig(); + } + + public static final int CLUSTER_CA_CERTIFICATE_FIELD_NUMBER = 17; + private volatile java.lang.Object clusterCaCertificate_; + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + @java.lang.Override + public java.lang.String getClusterCaCertificate() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterCaCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterCaCertificateBytes() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLEET_FIELD_NUMBER = 18; + private com.google.cloud.gkemulticloud.v1.Fleet fleet_; + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + @java.lang.Override + public boolean hasFleet() { + return fleet_ != null; + } + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet getFleet() { + return fleet_ == null ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() : fleet_; + } + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder() { + return getFleet(); + } + + public static final int LOGGING_CONFIG_FIELD_NUMBER = 19; + private com.google.cloud.gkemulticloud.v1.LoggingConfig loggingConfig_; + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + @java.lang.Override + public boolean hasLoggingConfig() { + return loggingConfig_ != null; + } + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig() { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + return getLoggingConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (networking_ != null) { + output.writeMessage(3, getNetworking()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRegion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, awsRegion_); + } + if (controlPlane_ != null) { + output.writeMessage(5, getControlPlane()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AwsCluster.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpoint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, uid_); + } + if (reconciling_ != false) { + output.writeBool(10, reconciling_); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 14); + if (authorization_ != null) { + output.writeMessage(15, getAuthorization()); + } + if (workloadIdentityConfig_ != null) { + output.writeMessage(16, getWorkloadIdentityConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, clusterCaCertificate_); + } + if (fleet_ != null) { + output.writeMessage(18, getFleet()); + } + if (loggingConfig_ != null) { + output.writeMessage(19, getLoggingConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (networking_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNetworking()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRegion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, awsRegion_); + } + if (controlPlane_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getControlPlane()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AwsCluster.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpoint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, uid_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, reconciling_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, etag_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, annotations__); + } + if (authorization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getAuthorization()); + } + if (workloadIdentityConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, getWorkloadIdentityConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, clusterCaCertificate_); + } + if (fleet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getFleet()); + } + if (loggingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getLoggingConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsCluster)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsCluster other = + (com.google.cloud.gkemulticloud.v1.AwsCluster) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasNetworking() != other.hasNetworking()) return false; + if (hasNetworking()) { + if (!getNetworking().equals(other.getNetworking())) return false; + } + if (!getAwsRegion().equals(other.getAwsRegion())) return false; + if (hasControlPlane() != other.hasControlPlane()) return false; + if (hasControlPlane()) { + if (!getControlPlane().equals(other.getControlPlane())) return false; + } + if (hasAuthorization() != other.hasAuthorization()) return false; + if (hasAuthorization()) { + if (!getAuthorization().equals(other.getAuthorization())) return false; + } + if (state_ != other.state_) return false; + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getUid().equals(other.getUid())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasWorkloadIdentityConfig() != other.hasWorkloadIdentityConfig()) return false; + if (hasWorkloadIdentityConfig()) { + if (!getWorkloadIdentityConfig().equals(other.getWorkloadIdentityConfig())) return false; + } + if (!getClusterCaCertificate().equals(other.getClusterCaCertificate())) return false; + if (hasFleet() != other.hasFleet()) return false; + if (hasFleet()) { + if (!getFleet().equals(other.getFleet())) return false; + } + if (hasLoggingConfig() != other.hasLoggingConfig()) return false; + if (hasLoggingConfig()) { + if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasNetworking()) { + hash = (37 * hash) + NETWORKING_FIELD_NUMBER; + hash = (53 * hash) + getNetworking().hashCode(); + } + hash = (37 * hash) + AWS_REGION_FIELD_NUMBER; + hash = (53 * hash) + getAwsRegion().hashCode(); + if (hasControlPlane()) { + hash = (37 * hash) + CONTROL_PLANE_FIELD_NUMBER; + hash = (53 * hash) + getControlPlane().hashCode(); + } + if (hasAuthorization()) { + hash = (37 * hash) + AUTHORIZATION_FIELD_NUMBER; + hash = (53 * hash) + getAuthorization().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasWorkloadIdentityConfig()) { + hash = (37 * hash) + WORKLOAD_IDENTITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWorkloadIdentityConfig().hashCode(); + } + hash = (37 * hash) + CLUSTER_CA_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getClusterCaCertificate().hashCode(); + if (hasFleet()) { + hash = (37 * hash) + FLEET_FIELD_NUMBER; + hash = (53 * hash) + getFleet().hashCode(); + } + if (hasLoggingConfig()) { + hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLoggingConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsCluster 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 Anthos cluster running on AWS.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsCluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsCluster) + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 14: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsCluster.class, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsCluster.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (networkingBuilder_ == null) { + networking_ = null; + } else { + networking_ = null; + networkingBuilder_ = null; + } + awsRegion_ = ""; + + if (controlPlaneBuilder_ == null) { + controlPlane_ = null; + } else { + controlPlane_ = null; + controlPlaneBuilder_ = null; + } + if (authorizationBuilder_ == null) { + authorization_ = null; + } else { + authorization_ = null; + authorizationBuilder_ = null; + } + state_ = 0; + + endpoint_ = ""; + + uid_ = ""; + + reconciling_ = false; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableAnnotations().clear(); + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = null; + } else { + workloadIdentityConfig_ = null; + workloadIdentityConfigBuilder_ = null; + } + clusterCaCertificate_ = ""; + + if (fleetBuilder_ == null) { + fleet_ = null; + } else { + fleet_ = null; + fleetBuilder_ = null; + } + if (loggingConfigBuilder_ == null) { + loggingConfig_ = null; + } else { + loggingConfig_ = null; + loggingConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster build() { + com.google.cloud.gkemulticloud.v1.AwsCluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsCluster result = + new com.google.cloud.gkemulticloud.v1.AwsCluster(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (networkingBuilder_ == null) { + result.networking_ = networking_; + } else { + result.networking_ = networkingBuilder_.build(); + } + result.awsRegion_ = awsRegion_; + if (controlPlaneBuilder_ == null) { + result.controlPlane_ = controlPlane_; + } else { + result.controlPlane_ = controlPlaneBuilder_.build(); + } + if (authorizationBuilder_ == null) { + result.authorization_ = authorization_; + } else { + result.authorization_ = authorizationBuilder_.build(); + } + result.state_ = state_; + result.endpoint_ = endpoint_; + result.uid_ = uid_; + result.reconciling_ = reconciling_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + if (workloadIdentityConfigBuilder_ == null) { + result.workloadIdentityConfig_ = workloadIdentityConfig_; + } else { + result.workloadIdentityConfig_ = workloadIdentityConfigBuilder_.build(); + } + result.clusterCaCertificate_ = clusterCaCertificate_; + if (fleetBuilder_ == null) { + result.fleet_ = fleet_; + } else { + result.fleet_ = fleetBuilder_.build(); + } + if (loggingConfigBuilder_ == null) { + result.loggingConfig_ = loggingConfig_; + } else { + result.loggingConfig_ = loggingConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsCluster) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsCluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsCluster other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasNetworking()) { + mergeNetworking(other.getNetworking()); + } + if (!other.getAwsRegion().isEmpty()) { + awsRegion_ = other.awsRegion_; + onChanged(); + } + if (other.hasControlPlane()) { + mergeControlPlane(other.getControlPlane()); + } + if (other.hasAuthorization()) { + mergeAuthorization(other.getAuthorization()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + if (other.hasWorkloadIdentityConfig()) { + mergeWorkloadIdentityConfig(other.getWorkloadIdentityConfig()); + } + if (!other.getClusterCaCertificate().isEmpty()) { + clusterCaCertificate_ = other.clusterCaCertificate_; + onChanged(); + } + if (other.hasFleet()) { + mergeFleet(other.getFleet()); + } + if (other.hasLoggingConfig()) { + mergeLoggingConfig(other.getLoggingConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsCluster parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsCluster) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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 description_ = ""; + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsClusterNetworking networking_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder> + networkingBuilder_; + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + public boolean hasNetworking() { + return networkingBuilder_ != null || networking_ != null; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getNetworking() { + if (networkingBuilder_ == null) { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.getDefaultInstance() + : networking_; + } else { + return networkingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetworking(com.google.cloud.gkemulticloud.v1.AwsClusterNetworking value) { + if (networkingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networking_ = value; + onChanged(); + } else { + networkingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetworking( + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder builderForValue) { + if (networkingBuilder_ == null) { + networking_ = builderForValue.build(); + onChanged(); + } else { + networkingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNetworking(com.google.cloud.gkemulticloud.v1.AwsClusterNetworking value) { + if (networkingBuilder_ == null) { + if (networking_ != null) { + networking_ = + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.newBuilder(networking_) + .mergeFrom(value) + .buildPartial(); + } else { + networking_ = value; + } + onChanged(); + } else { + networkingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNetworking() { + if (networkingBuilder_ == null) { + networking_ = null; + onChanged(); + } else { + networking_ = null; + networkingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder getNetworkingBuilder() { + + onChanged(); + return getNetworkingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder + getNetworkingOrBuilder() { + if (networkingBuilder_ != null) { + return networkingBuilder_.getMessageOrBuilder(); + } else { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.getDefaultInstance() + : networking_; + } + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder> + getNetworkingFieldBuilder() { + if (networkingBuilder_ == null) { + networkingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder>( + getNetworking(), getParentForChildren(), isClean()); + networking_ = null; + } + return networkingBuilder_; + } + + private java.lang.Object awsRegion_ = ""; + /** + * + * + *
+     * Required. The AWS region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby AWS regions.
+     * You can call
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+     * to list all supported AWS regions within a given Google Cloud region.
+     * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRegion. + */ + public java.lang.String getAwsRegion() { + java.lang.Object ref = awsRegion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsRegion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The AWS region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby AWS regions.
+     * You can call
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+     * to list all supported AWS regions within a given Google Cloud region.
+     * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRegion. + */ + public com.google.protobuf.ByteString getAwsRegionBytes() { + java.lang.Object ref = awsRegion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The AWS region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby AWS regions.
+     * You can call
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+     * to list all supported AWS regions within a given Google Cloud region.
+     * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The awsRegion to set. + * @return This builder for chaining. + */ + public Builder setAwsRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + awsRegion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The AWS region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby AWS regions.
+     * You can call
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+     * to list all supported AWS regions within a given Google Cloud region.
+     * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAwsRegion() { + + awsRegion_ = getDefaultInstance().getAwsRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The AWS region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby AWS regions.
+     * You can call
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+     * to list all supported AWS regions within a given Google Cloud region.
+     * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for awsRegion to set. + * @return This builder for chaining. + */ + public Builder setAwsRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + awsRegion_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsControlPlane controlPlane_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsControlPlane, + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder> + controlPlaneBuilder_; + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + public boolean hasControlPlane() { + return controlPlaneBuilder_ != null || controlPlane_ != null; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + public com.google.cloud.gkemulticloud.v1.AwsControlPlane getControlPlane() { + if (controlPlaneBuilder_ == null) { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AwsControlPlane.getDefaultInstance() + : controlPlane_; + } else { + return controlPlaneBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setControlPlane(com.google.cloud.gkemulticloud.v1.AwsControlPlane value) { + if (controlPlaneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controlPlane_ = value; + onChanged(); + } else { + controlPlaneBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setControlPlane( + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder builderForValue) { + if (controlPlaneBuilder_ == null) { + controlPlane_ = builderForValue.build(); + onChanged(); + } else { + controlPlaneBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeControlPlane(com.google.cloud.gkemulticloud.v1.AwsControlPlane value) { + if (controlPlaneBuilder_ == null) { + if (controlPlane_ != null) { + controlPlane_ = + com.google.cloud.gkemulticloud.v1.AwsControlPlane.newBuilder(controlPlane_) + .mergeFrom(value) + .buildPartial(); + } else { + controlPlane_ = value; + } + onChanged(); + } else { + controlPlaneBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearControlPlane() { + if (controlPlaneBuilder_ == null) { + controlPlane_ = null; + onChanged(); + } else { + controlPlane_ = null; + controlPlaneBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder getControlPlaneBuilder() { + + onChanged(); + return getControlPlaneFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder getControlPlaneOrBuilder() { + if (controlPlaneBuilder_ != null) { + return controlPlaneBuilder_.getMessageOrBuilder(); + } else { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AwsControlPlane.getDefaultInstance() + : controlPlane_; + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsControlPlane, + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder> + getControlPlaneFieldBuilder() { + if (controlPlaneBuilder_ == null) { + controlPlaneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsControlPlane, + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder>( + getControlPlane(), getParentForChildren(), isClean()); + controlPlane_ = null; + } + return controlPlaneBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsAuthorization authorization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsAuthorization, + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder> + authorizationBuilder_; + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + public boolean hasAuthorization() { + return authorizationBuilder_ != null || authorization_ != null; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + public com.google.cloud.gkemulticloud.v1.AwsAuthorization getAuthorization() { + if (authorizationBuilder_ == null) { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AwsAuthorization.getDefaultInstance() + : authorization_; + } else { + return authorizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorization(com.google.cloud.gkemulticloud.v1.AwsAuthorization value) { + if (authorizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorization_ = value; + onChanged(); + } else { + authorizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorization( + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder builderForValue) { + if (authorizationBuilder_ == null) { + authorization_ = builderForValue.build(); + onChanged(); + } else { + authorizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthorization(com.google.cloud.gkemulticloud.v1.AwsAuthorization value) { + if (authorizationBuilder_ == null) { + if (authorization_ != null) { + authorization_ = + com.google.cloud.gkemulticloud.v1.AwsAuthorization.newBuilder(authorization_) + .mergeFrom(value) + .buildPartial(); + } else { + authorization_ = value; + } + onChanged(); + } else { + authorizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthorization() { + if (authorizationBuilder_ == null) { + authorization_ = null; + onChanged(); + } else { + authorization_ = null; + authorizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder getAuthorizationBuilder() { + + onChanged(); + return getAuthorizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder getAuthorizationOrBuilder() { + if (authorizationBuilder_ != null) { + return authorizationBuilder_.getMessageOrBuilder(); + } else { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AwsAuthorization.getDefaultInstance() + : authorization_; + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsAuthorization, + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder> + getAuthorizationFieldBuilder() { + if (authorizationBuilder_ == null) { + authorizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsAuthorization, + com.google.cloud.gkemulticloud.v1.AwsAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder>( + getAuthorization(), getParentForChildren(), isClean()); + authorization_ = null; + } + return authorizationBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsCluster.State result = + com.google.cloud.gkemulticloud.v1.AwsCluster.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gkemulticloud.v1.AwsCluster.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private boolean reconciling_; + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + + reconciling_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workloadIdentityConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder> + workloadIdentityConfigBuilder_; + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + public boolean hasWorkloadIdentityConfig() { + return workloadIdentityConfigBuilder_ != null || workloadIdentityConfig_ != null; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig() { + if (workloadIdentityConfigBuilder_ == null) { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } else { + return workloadIdentityConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig value) { + if (workloadIdentityConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workloadIdentityConfig_ = value; + onChanged(); + } else { + workloadIdentityConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder builderForValue) { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = builderForValue.build(); + onChanged(); + } else { + workloadIdentityConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig value) { + if (workloadIdentityConfigBuilder_ == null) { + if (workloadIdentityConfig_ != null) { + workloadIdentityConfig_ = + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.newBuilder( + workloadIdentityConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + workloadIdentityConfig_ = value; + } + onChanged(); + } else { + workloadIdentityConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWorkloadIdentityConfig() { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = null; + onChanged(); + } else { + workloadIdentityConfig_ = null; + workloadIdentityConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder + getWorkloadIdentityConfigBuilder() { + + onChanged(); + return getWorkloadIdentityConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder() { + if (workloadIdentityConfigBuilder_ != null) { + return workloadIdentityConfigBuilder_.getMessageOrBuilder(); + } else { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder> + getWorkloadIdentityConfigFieldBuilder() { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder>( + getWorkloadIdentityConfig(), getParentForChildren(), isClean()); + workloadIdentityConfig_ = null; + } + return workloadIdentityConfigBuilder_; + } + + private java.lang.Object clusterCaCertificate_ = ""; + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + public java.lang.String getClusterCaCertificate() { + java.lang.Object ref = clusterCaCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterCaCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + public com.google.protobuf.ByteString getClusterCaCertificateBytes() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The clusterCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setClusterCaCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterCaCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClusterCaCertificate() { + + clusterCaCertificate_ = getDefaultInstance().getClusterCaCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for clusterCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setClusterCaCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterCaCertificate_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.Fleet fleet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder> + fleetBuilder_; + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + public boolean hasFleet() { + return fleetBuilder_ != null || fleet_ != null; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + public com.google.cloud.gkemulticloud.v1.Fleet getFleet() { + if (fleetBuilder_ == null) { + return fleet_ == null + ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() + : fleet_; + } else { + return fleetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFleet(com.google.cloud.gkemulticloud.v1.Fleet value) { + if (fleetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fleet_ = value; + onChanged(); + } else { + fleetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFleet(com.google.cloud.gkemulticloud.v1.Fleet.Builder builderForValue) { + if (fleetBuilder_ == null) { + fleet_ = builderForValue.build(); + onChanged(); + } else { + fleetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFleet(com.google.cloud.gkemulticloud.v1.Fleet value) { + if (fleetBuilder_ == null) { + if (fleet_ != null) { + fleet_ = + com.google.cloud.gkemulticloud.v1.Fleet.newBuilder(fleet_) + .mergeFrom(value) + .buildPartial(); + } else { + fleet_ = value; + } + onChanged(); + } else { + fleetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFleet() { + if (fleetBuilder_ == null) { + fleet_ = null; + onChanged(); + } else { + fleet_ = null; + fleetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.Fleet.Builder getFleetBuilder() { + + onChanged(); + return getFleetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder() { + if (fleetBuilder_ != null) { + return fleetBuilder_.getMessageOrBuilder(); + } else { + return fleet_ == null + ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() + : fleet_; + } + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder> + getFleetFieldBuilder() { + if (fleetBuilder_ == null) { + fleetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder>( + getFleet(), getParentForChildren(), isClean()); + fleet_ = null; + } + return fleetBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.LoggingConfig loggingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder> + loggingConfigBuilder_; + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + public boolean hasLoggingConfig() { + return loggingConfigBuilder_ != null || loggingConfig_ != null; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig() { + if (loggingConfigBuilder_ == null) { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } else { + return loggingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLoggingConfig(com.google.cloud.gkemulticloud.v1.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loggingConfig_ = value; + onChanged(); + } else { + loggingConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLoggingConfig( + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder builderForValue) { + if (loggingConfigBuilder_ == null) { + loggingConfig_ = builderForValue.build(); + onChanged(); + } else { + loggingConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLoggingConfig(com.google.cloud.gkemulticloud.v1.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (loggingConfig_ != null) { + loggingConfig_ = + com.google.cloud.gkemulticloud.v1.LoggingConfig.newBuilder(loggingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + loggingConfig_ = value; + } + onChanged(); + } else { + loggingConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLoggingConfig() { + if (loggingConfigBuilder_ == null) { + loggingConfig_ = null; + onChanged(); + } else { + loggingConfig_ = null; + loggingConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder getLoggingConfigBuilder() { + + onChanged(); + return getLoggingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + if (loggingConfigBuilder_ != null) { + return loggingConfigBuilder_.getMessageOrBuilder(); + } else { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder> + getLoggingConfigFieldBuilder() { + if (loggingConfigBuilder_ == null) { + loggingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder>( + getLoggingConfig(), getParentForChildren(), isClean()); + loggingConfig_ = null; + } + return loggingConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsCluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsCluster) + private static final com.google.cloud.gkemulticloud.v1.AwsCluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsCluster(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsCluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsCluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsCluster(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterName.java new file mode 100644 index 0000000..e271fa6 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AwsClusterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AWS_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/awsClusters/{aws_cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String awsCluster; + + @Deprecated + protected AwsClusterName() { + project = null; + location = null; + awsCluster = null; + } + + private AwsClusterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + awsCluster = Preconditions.checkNotNull(builder.getAwsCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAwsCluster() { + return awsCluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AwsClusterName of(String project, String location, String awsCluster) { + return newBuilder().setProject(project).setLocation(location).setAwsCluster(awsCluster).build(); + } + + public static String format(String project, String location, String awsCluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAwsCluster(awsCluster) + .build() + .toString(); + } + + public static AwsClusterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AWS_CLUSTER.validatedMatch( + formattedString, "AwsClusterName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("aws_cluster")); + } + + 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 (AwsClusterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AWS_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (awsCluster != null) { + fieldMapBuilder.put("aws_cluster", awsCluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AWS_CLUSTER.instantiate( + "project", project, "location", location, "aws_cluster", awsCluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AwsClusterName that = ((AwsClusterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.awsCluster, that.awsCluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(awsCluster); + return h; + } + + /** Builder for projects/{project}/locations/{location}/awsClusters/{aws_cluster}. */ + public static class Builder { + private String project; + private String location; + private String awsCluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAwsCluster() { + return awsCluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAwsCluster(String awsCluster) { + this.awsCluster = awsCluster; + return this; + } + + private Builder(AwsClusterName awsClusterName) { + this.project = awsClusterName.project; + this.location = awsClusterName.location; + this.awsCluster = awsClusterName.awsCluster; + } + + public AwsClusterName build() { + return new AwsClusterName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworking.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworking.java new file mode 100644 index 0000000..8b9873f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworking.java @@ -0,0 +1,1308 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * ClusterNetworking defines cluster-wide networking configuration.
+ * Anthos clusters on AWS run on a single VPC. This includes control
+ * plane replicas and node pool nodes.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsClusterNetworking} + */ +public final class AwsClusterNetworking extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsClusterNetworking) + AwsClusterNetworkingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsClusterNetworking.newBuilder() to construct. + private AwsClusterNetworking(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsClusterNetworking() { + vpcId_ = ""; + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsClusterNetworking(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsClusterNetworking( + 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(); + + vpcId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + podAddressCidrBlocks_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + serviceAddressCidrBlocks_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = podAddressCidrBlocks_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.class, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder.class); + } + + public static final int VPC_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object vpcId_; + /** + * + * + *
+   * Required. The VPC associated with the cluster. All component clusters
+   * (i.e. control plane and node pools) run on a single VPC.
+   * This field cannot be changed after creation.
+   * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vpcId. + */ + @java.lang.Override + public java.lang.String getVpcId() { + java.lang.Object ref = vpcId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The VPC associated with the cluster. All component clusters
+   * (i.e. control plane and node pools) run on a single VPC.
+   * This field cannot be changed after creation.
+   * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vpcId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcIdBytes() { + java.lang.Object ref = vpcId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList podAddressCidrBlocks_; + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getPodAddressCidrBlocksList() { + return podAddressCidrBlocks_; + } + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + public int getPodAddressCidrBlocksCount() { + return podAddressCidrBlocks_.size(); + } + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + public java.lang.String getPodAddressCidrBlocks(int index) { + return podAddressCidrBlocks_.get(index); + } + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index) { + return podAddressCidrBlocks_.getByteString(index); + } + + public static final int SERVICE_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList serviceAddressCidrBlocks_; + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getServiceAddressCidrBlocksList() { + return serviceAddressCidrBlocks_; + } + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + public int getServiceAddressCidrBlocksCount() { + return serviceAddressCidrBlocks_.size(); + } + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + public java.lang.String getServiceAddressCidrBlocks(int index) { + return serviceAddressCidrBlocks_.get(index); + } + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index) { + return serviceAddressCidrBlocks_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpcId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcId_); + } + for (int i = 0; i < podAddressCidrBlocks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, podAddressCidrBlocks_.getRaw(i)); + } + for (int i = 0; i < serviceAddressCidrBlocks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, serviceAddressCidrBlocks_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpcId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcId_); + } + { + int dataSize = 0; + for (int i = 0; i < podAddressCidrBlocks_.size(); i++) { + dataSize += computeStringSizeNoTag(podAddressCidrBlocks_.getRaw(i)); + } + size += dataSize; + size += 1 * getPodAddressCidrBlocksList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < serviceAddressCidrBlocks_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceAddressCidrBlocks_.getRaw(i)); + } + size += dataSize; + size += 1 * getServiceAddressCidrBlocksList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsClusterNetworking)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking other = + (com.google.cloud.gkemulticloud.v1.AwsClusterNetworking) obj; + + if (!getVpcId().equals(other.getVpcId())) return false; + if (!getPodAddressCidrBlocksList().equals(other.getPodAddressCidrBlocksList())) return false; + if (!getServiceAddressCidrBlocksList().equals(other.getServiceAddressCidrBlocksList())) + 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) + VPC_ID_FIELD_NUMBER; + hash = (53 * hash) + getVpcId().hashCode(); + if (getPodAddressCidrBlocksCount() > 0) { + hash = (37 * hash) + POD_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getPodAddressCidrBlocksList().hashCode(); + } + if (getServiceAddressCidrBlocksCount() > 0) { + hash = (37 * hash) + SERVICE_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getServiceAddressCidrBlocksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking 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; + } + /** + * + * + *
+   * ClusterNetworking defines cluster-wide networking configuration.
+   * Anthos clusters on AWS run on a single VPC. This includes control
+   * plane replicas and node pool nodes.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsClusterNetworking} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsClusterNetworking) + com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.class, + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.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(); + vpcId_ = ""; + + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking build() { + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking result = + new com.google.cloud.gkemulticloud.v1.AwsClusterNetworking(this); + int from_bitField0_ = bitField0_; + result.vpcId_ = vpcId_; + if (((bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = podAddressCidrBlocks_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.podAddressCidrBlocks_ = podAddressCidrBlocks_; + if (((bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsClusterNetworking) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsClusterNetworking) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsClusterNetworking other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsClusterNetworking.getDefaultInstance()) + return this; + if (!other.getVpcId().isEmpty()) { + vpcId_ = other.vpcId_; + onChanged(); + } + if (!other.podAddressCidrBlocks_.isEmpty()) { + if (podAddressCidrBlocks_.isEmpty()) { + podAddressCidrBlocks_ = other.podAddressCidrBlocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.addAll(other.podAddressCidrBlocks_); + } + onChanged(); + } + if (!other.serviceAddressCidrBlocks_.isEmpty()) { + if (serviceAddressCidrBlocks_.isEmpty()) { + serviceAddressCidrBlocks_ = other.serviceAddressCidrBlocks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.addAll(other.serviceAddressCidrBlocks_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsClusterNetworking) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object vpcId_ = ""; + /** + * + * + *
+     * Required. The VPC associated with the cluster. All component clusters
+     * (i.e. control plane and node pools) run on a single VPC.
+     * This field cannot be changed after creation.
+     * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vpcId. + */ + public java.lang.String getVpcId() { + java.lang.Object ref = vpcId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The VPC associated with the cluster. All component clusters
+     * (i.e. control plane and node pools) run on a single VPC.
+     * This field cannot be changed after creation.
+     * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vpcId. + */ + public com.google.protobuf.ByteString getVpcIdBytes() { + java.lang.Object ref = vpcId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The VPC associated with the cluster. All component clusters
+     * (i.e. control plane and node pools) run on a single VPC.
+     * This field cannot be changed after creation.
+     * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vpcId to set. + * @return This builder for chaining. + */ + public Builder setVpcId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vpcId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VPC associated with the cluster. All component clusters
+     * (i.e. control plane and node pools) run on a single VPC.
+     * This field cannot be changed after creation.
+     * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVpcId() { + + vpcId_ = getDefaultInstance().getVpcId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VPC associated with the cluster. All component clusters
+     * (i.e. control plane and node pools) run on a single VPC.
+     * This field cannot be changed after creation.
+     * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vpcId to set. + * @return This builder for chaining. + */ + public Builder setVpcIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vpcId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList podAddressCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePodAddressCidrBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(podAddressCidrBlocks_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getPodAddressCidrBlocksList() { + return podAddressCidrBlocks_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + public int getPodAddressCidrBlocksCount() { + return podAddressCidrBlocks_.size(); + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + public java.lang.String getPodAddressCidrBlocks(int index) { + return podAddressCidrBlocks_.get(index); + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index) { + return podAddressCidrBlocks_.getByteString(index); + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The podAddressCidrBlocks to set. + * @return This builder for chaining. + */ + public Builder setPodAddressCidrBlocks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addPodAddressCidrBlocks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllPodAddressCidrBlocks(java.lang.Iterable values) { + ensurePodAddressCidrBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, podAddressCidrBlocks_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPodAddressCidrBlocks() { + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addPodAddressCidrBlocksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList serviceAddressCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServiceAddressCidrBlocksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = + new com.google.protobuf.LazyStringArrayList(serviceAddressCidrBlocks_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getServiceAddressCidrBlocksList() { + return serviceAddressCidrBlocks_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + public int getServiceAddressCidrBlocksCount() { + return serviceAddressCidrBlocks_.size(); + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + public java.lang.String getServiceAddressCidrBlocks(int index) { + return serviceAddressCidrBlocks_.get(index); + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index) { + return serviceAddressCidrBlocks_.getByteString(index); + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The serviceAddressCidrBlocks to set. + * @return This builder for chaining. + */ + public Builder setServiceAddressCidrBlocks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addServiceAddressCidrBlocks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllServiceAddressCidrBlocks(java.lang.Iterable values) { + ensureServiceAddressCidrBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAddressCidrBlocks_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAddressCidrBlocks() { + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+     * Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addServiceAddressCidrBlocksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsClusterNetworking) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsClusterNetworking) + private static final com.google.cloud.gkemulticloud.v1.AwsClusterNetworking DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsClusterNetworking(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsClusterNetworking parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsClusterNetworking(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworkingOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworkingOrBuilder.java new file mode 100644 index 0000000..42e4e2e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterNetworkingOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsClusterNetworkingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsClusterNetworking) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The VPC associated with the cluster. All component clusters
+   * (i.e. control plane and node pools) run on a single VPC.
+   * This field cannot be changed after creation.
+   * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vpcId. + */ + java.lang.String getVpcId(); + /** + * + * + *
+   * Required. The VPC associated with the cluster. All component clusters
+   * (i.e. control plane and node pools) run on a single VPC.
+   * This field cannot be changed after creation.
+   * 
+ * + * string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vpcId. + */ + com.google.protobuf.ByteString getVpcIdBytes(); + + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + java.util.List getPodAddressCidrBlocksList(); + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + int getPodAddressCidrBlocksCount(); + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + java.lang.String getPodAddressCidrBlocks(int index); + /** + * + * + *
+   * Required. All pods in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index); + + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + java.util.List getServiceAddressCidrBlocksList(); + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + int getServiceAddressCidrBlocksCount(); + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + java.lang.String getServiceAddressCidrBlocks(int index); + /** + * + * + *
+   * Required. All services in the cluster are assigned an IPv4 address from these ranges.
+   * Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterOrBuilder.java new file mode 100644 index 0000000..e1b42c4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterOrBuilder.java @@ -0,0 +1,688 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsCluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + boolean hasNetworking(); + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + com.google.cloud.gkemulticloud.v1.AwsClusterNetworking getNetworking(); + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsClusterNetworkingOrBuilder getNetworkingOrBuilder(); + + /** + * + * + *
+   * Required. The AWS region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby AWS regions.
+   * You can call
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+   * to list all supported AWS regions within a given Google Cloud region.
+   * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsRegion. + */ + java.lang.String getAwsRegion(); + /** + * + * + *
+   * Required. The AWS region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby AWS regions.
+   * You can call
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]
+   * to list all supported AWS regions within a given Google Cloud region.
+   * 
+ * + * string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsRegion. + */ + com.google.protobuf.ByteString getAwsRegionBytes(); + + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + boolean hasControlPlane(); + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + com.google.cloud.gkemulticloud.v1.AwsControlPlane getControlPlane(); + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder getControlPlaneOrBuilder(); + + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + boolean hasAuthorization(); + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + com.google.cloud.gkemulticloud.v1.AwsAuthorization getAuthorization(); + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsAuthorizationOrBuilder getAuthorizationOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gkemulticloud.v1.AwsCluster.State getState(); + + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the cluster.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + boolean hasWorkloadIdentityConfig(); + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig(); + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder(); + + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + java.lang.String getClusterCaCertificate(); + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + com.google.protobuf.ByteString getClusterCaCertificateBytes(); + + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + boolean hasFleet(); + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + com.google.cloud.gkemulticloud.v1.Fleet getFleet(); + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder(); + + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + boolean hasLoggingConfig(); + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig(); + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUser.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUser.java new file mode 100644 index 0000000..48ce8d0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUser.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Identities of a user-type subject for AWS clusters.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsClusterUser} + */ +public final class AwsClusterUser extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsClusterUser) + AwsClusterUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsClusterUser.newBuilder() to construct. + private AwsClusterUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsClusterUser() { + username_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsClusterUser(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsClusterUser( + 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(); + + username_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsClusterUser.class, + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder.class); + } + + public static final int USERNAME_FIELD_NUMBER = 1; + private volatile java.lang.Object username_; + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsClusterUser)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsClusterUser other = + (com.google.cloud.gkemulticloud.v1.AwsClusterUser) obj; + + if (!getUsername().equals(other.getUsername())) 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) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsClusterUser 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; + } + /** + * + * + *
+   * Identities of a user-type subject for AWS clusters.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsClusterUser} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsClusterUser) + com.google.cloud.gkemulticloud.v1.AwsClusterUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsClusterUser.class, + com.google.cloud.gkemulticloud.v1.AwsClusterUser.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsClusterUser.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(); + username_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUser getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsClusterUser.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUser build() { + com.google.cloud.gkemulticloud.v1.AwsClusterUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUser buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsClusterUser result = + new com.google.cloud.gkemulticloud.v1.AwsClusterUser(this); + result.username_ = username_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsClusterUser) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsClusterUser) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsClusterUser other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsClusterUser.getDefaultInstance()) + return this; + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsClusterUser parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsClusterUser) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object username_ = ""; + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsClusterUser) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsClusterUser) + private static final com.google.cloud.gkemulticloud.v1.AwsClusterUser DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsClusterUser(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsClusterUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsClusterUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsClusterUser(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUserOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUserOrBuilder.java new file mode 100644 index 0000000..3393288 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClusterUserOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsClusterUserOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsClusterUser) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + java.lang.String getUsername(); + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryption.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryption.java new file mode 100644 index 0000000..bfa3c77 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryption.java @@ -0,0 +1,639 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Config encryption for user data.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsConfigEncryption} + */ +public final class AwsConfigEncryption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsConfigEncryption) + AwsConfigEncryptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsConfigEncryption.newBuilder() to construct. + private AwsConfigEncryption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsConfigEncryption() { + kmsKeyArn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsConfigEncryption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsConfigEncryption( + 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(); + + kmsKeyArn_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.class, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder.class); + } + + public static final int KMS_KEY_ARN_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKeyArn_; + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt user data.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + @java.lang.Override + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt user data.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyArn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyArn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsConfigEncryption)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption other = + (com.google.cloud.gkemulticloud.v1.AwsConfigEncryption) obj; + + if (!getKmsKeyArn().equals(other.getKmsKeyArn())) 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) + KMS_KEY_ARN_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyArn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption 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; + } + /** + * + * + *
+   * Config encryption for user data.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsConfigEncryption} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsConfigEncryption) + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.class, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.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(); + kmsKeyArn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption build() { + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption result = + new com.google.cloud.gkemulticloud.v1.AwsConfigEncryption(this); + result.kmsKeyArn_ = kmsKeyArn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsConfigEncryption) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsConfigEncryption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsConfigEncryption other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance()) + return this; + if (!other.getKmsKeyArn().isEmpty()) { + kmsKeyArn_ = other.kmsKeyArn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsConfigEncryption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKeyArn_ = ""; + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt user data.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt user data.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt user data.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt user data.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyArn() { + + kmsKeyArn_ = getDefaultInstance().getKmsKeyArn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt user data.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyArn_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsConfigEncryption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsConfigEncryption) + private static final com.google.cloud.gkemulticloud.v1.AwsConfigEncryption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsConfigEncryption(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsConfigEncryption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsConfigEncryption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryptionOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryptionOrBuilder.java new file mode 100644 index 0000000..1302181 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsConfigEncryptionOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsConfigEncryptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsConfigEncryption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt user data.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + java.lang.String getKmsKeyArn(); + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt user data.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + com.google.protobuf.ByteString getKmsKeyArnBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlane.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlane.java new file mode 100644 index 0000000..addd87b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlane.java @@ -0,0 +1,4613 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * ControlPlane defines common parameters between control plane nodes.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsControlPlane} + */ +public final class AwsControlPlane extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsControlPlane) + AwsControlPlaneOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsControlPlane.newBuilder() to construct. + private AwsControlPlane(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsControlPlane() { + version_ = ""; + instanceType_ = ""; + subnetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + iamInstanceProfile_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsControlPlane(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsControlPlane( + 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(); + + version_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceType_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + subnetIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + subnetIds_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + securityGroupIds_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + iamInstanceProfile_ = s; + break; + } + case 66: + { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder subBuilder = null; + if (rootVolume_ != null) { + subBuilder = rootVolume_.toBuilder(); + } + rootVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rootVolume_); + rootVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder subBuilder = null; + if (mainVolume_ != null) { + subBuilder = mainVolume_.toBuilder(); + } + mainVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mainVolume_); + mainVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder subBuilder = null; + if (databaseEncryption_ != null) { + subBuilder = databaseEncryption_.toBuilder(); + } + databaseEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(databaseEncryption_); + databaseEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + tags_ = + com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tags_.getMutableMap().put(tags__.getKey(), tags__.getValue()); + break; + } + case 98: + { + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder subBuilder = null; + if (awsServicesAuthentication_ != null) { + subBuilder = awsServicesAuthentication_.toBuilder(); + } + awsServicesAuthentication_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsServicesAuthentication_); + awsServicesAuthentication_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder subBuilder = null; + if (sshConfig_ != null) { + subBuilder = sshConfig_.toBuilder(); + } + sshConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sshConfig_); + sshConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder subBuilder = null; + if (proxyConfig_ != null) { + subBuilder = proxyConfig_.toBuilder(); + } + proxyConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proxyConfig_); + proxyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 138: + { + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder subBuilder = null; + if (configEncryption_ != null) { + subBuilder = configEncryption_.toBuilder(); + } + configEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configEncryption_); + configEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 146: + { + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder subBuilder = null; + if (instancePlacement_ != null) { + subBuilder = instancePlacement_.toBuilder(); + } + instancePlacement_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instancePlacement_); + instancePlacement_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + subnetIds_ = subnetIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + securityGroupIds_ = securityGroupIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsControlPlane.class, + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int INSTANCE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceType_; + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the cluster's version.
+   * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + @java.lang.Override + public java.lang.String getInstanceType() { + java.lang.Object ref = instanceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the cluster's version.
+   * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTypeBytes() { + java.lang.Object ref = instanceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSH_CONFIG_FIELD_NUMBER = 14; + private com.google.cloud.gkemulticloud.v1.AwsSshConfig sshConfig_; + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + @java.lang.Override + public boolean hasSshConfig() { + return sshConfig_ != null; + } + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig() { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder() { + return getSshConfig(); + } + + public static final int SUBNET_IDS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList subnetIds_; + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the subnetIds. + */ + public com.google.protobuf.ProtocolStringList getSubnetIdsList() { + return subnetIds_; + } + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of subnetIds. + */ + public int getSubnetIdsCount() { + return subnetIds_.size(); + } + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The subnetIds at the given index. + */ + public java.lang.String getSubnetIds(int index) { + return subnetIds_.get(index); + } + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the subnetIds at the given index. + */ + public com.google.protobuf.ByteString getSubnetIdsBytes(int index) { + return subnetIds_.getByteString(index); + } + + public static final int SECURITY_GROUP_IDS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList securityGroupIds_; + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the securityGroupIds. + */ + public com.google.protobuf.ProtocolStringList getSecurityGroupIdsList() { + return securityGroupIds_; + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of securityGroupIds. + */ + public int getSecurityGroupIdsCount() { + return securityGroupIds_.size(); + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + public java.lang.String getSecurityGroupIds(int index) { + return securityGroupIds_.get(index); + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + public com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index) { + return securityGroupIds_.getByteString(index); + } + + public static final int IAM_INSTANCE_PROFILE_FIELD_NUMBER = 7; + private volatile java.lang.Object iamInstanceProfile_; + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+   * plane replica.
+   * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + @java.lang.Override + public java.lang.String getIamInstanceProfile() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamInstanceProfile_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+   * plane replica.
+   * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIamInstanceProfileBytes() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamInstanceProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_VOLUME_FIELD_NUMBER = 8; + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate rootVolume_; + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + @java.lang.Override + public boolean hasRootVolume() { + return rootVolume_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume() { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder() { + return getRootVolume(); + } + + public static final int MAIN_VOLUME_FIELD_NUMBER = 9; + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate mainVolume_; + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + @java.lang.Override + public boolean hasMainVolume() { + return mainVolume_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getMainVolume() { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : mainVolume_; + } + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getMainVolumeOrBuilder() { + return getMainVolume(); + } + + public static final int DATABASE_ENCRYPTION_FIELD_NUMBER = 10; + private com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption databaseEncryption_; + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the databaseEncryption field is set. + */ + @java.lang.Override + public boolean hasDatabaseEncryption() { + return databaseEncryption_ != null; + } + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The databaseEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDatabaseEncryption() { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder + getDatabaseEncryptionOrBuilder() { + return getDatabaseEncryption(); + } + + public static final int TAGS_FIELD_NUMBER = 11; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int AWS_SERVICES_AUTHENTICATION_FIELD_NUMBER = 12; + private com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication awsServicesAuthentication_; + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsServicesAuthentication field is set. + */ + @java.lang.Override + public boolean hasAwsServicesAuthentication() { + return awsServicesAuthentication_ != null; + } + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsServicesAuthentication. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication + getAwsServicesAuthentication() { + return awsServicesAuthentication_ == null + ? com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.getDefaultInstance() + : awsServicesAuthentication_; + } + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder + getAwsServicesAuthenticationOrBuilder() { + return getAwsServicesAuthentication(); + } + + public static final int PROXY_CONFIG_FIELD_NUMBER = 16; + private com.google.cloud.gkemulticloud.v1.AwsProxyConfig proxyConfig_; + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + @java.lang.Override + public boolean hasProxyConfig() { + return proxyConfig_ != null; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig() { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder() { + return getProxyConfig(); + } + + public static final int CONFIG_ENCRYPTION_FIELD_NUMBER = 17; + private com.google.cloud.gkemulticloud.v1.AwsConfigEncryption configEncryption_; + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + @java.lang.Override + public boolean hasConfigEncryption() { + return configEncryption_ != null; + } + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption() { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + return getConfigEncryption(); + } + + public static final int INSTANCE_PLACEMENT_FIELD_NUMBER = 18; + private com.google.cloud.gkemulticloud.v1.AwsInstancePlacement instancePlacement_; + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + @java.lang.Override + public boolean hasInstancePlacement() { + return instancePlacement_ != null; + } + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement() { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder + getInstancePlacementOrBuilder() { + return getInstancePlacement(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceType_); + } + for (int i = 0; i < subnetIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subnetIds_.getRaw(i)); + } + for (int i = 0; i < securityGroupIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, securityGroupIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iamInstanceProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, iamInstanceProfile_); + } + if (rootVolume_ != null) { + output.writeMessage(8, getRootVolume()); + } + if (mainVolume_ != null) { + output.writeMessage(9, getMainVolume()); + } + if (databaseEncryption_ != null) { + output.writeMessage(10, getDatabaseEncryption()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 11); + if (awsServicesAuthentication_ != null) { + output.writeMessage(12, getAwsServicesAuthentication()); + } + if (sshConfig_ != null) { + output.writeMessage(14, getSshConfig()); + } + if (proxyConfig_ != null) { + output.writeMessage(16, getProxyConfig()); + } + if (configEncryption_ != null) { + output.writeMessage(17, getConfigEncryption()); + } + if (instancePlacement_ != null) { + output.writeMessage(18, getInstancePlacement()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceType_); + } + { + int dataSize = 0; + for (int i = 0; i < subnetIds_.size(); i++) { + dataSize += computeStringSizeNoTag(subnetIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSubnetIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < securityGroupIds_.size(); i++) { + dataSize += computeStringSizeNoTag(securityGroupIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSecurityGroupIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iamInstanceProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, iamInstanceProfile_); + } + if (rootVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getRootVolume()); + } + if (mainVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMainVolume()); + } + if (databaseEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDatabaseEncryption()); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, tags__); + } + if (awsServicesAuthentication_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getAwsServicesAuthentication()); + } + if (sshConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSshConfig()); + } + if (proxyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProxyConfig()); + } + if (configEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getConfigEncryption()); + } + if (instancePlacement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getInstancePlacement()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsControlPlane)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsControlPlane other = + (com.google.cloud.gkemulticloud.v1.AwsControlPlane) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (!getInstanceType().equals(other.getInstanceType())) return false; + if (hasSshConfig() != other.hasSshConfig()) return false; + if (hasSshConfig()) { + if (!getSshConfig().equals(other.getSshConfig())) return false; + } + if (!getSubnetIdsList().equals(other.getSubnetIdsList())) return false; + if (!getSecurityGroupIdsList().equals(other.getSecurityGroupIdsList())) return false; + if (!getIamInstanceProfile().equals(other.getIamInstanceProfile())) return false; + if (hasRootVolume() != other.hasRootVolume()) return false; + if (hasRootVolume()) { + if (!getRootVolume().equals(other.getRootVolume())) return false; + } + if (hasMainVolume() != other.hasMainVolume()) return false; + if (hasMainVolume()) { + if (!getMainVolume().equals(other.getMainVolume())) return false; + } + if (hasDatabaseEncryption() != other.hasDatabaseEncryption()) return false; + if (hasDatabaseEncryption()) { + if (!getDatabaseEncryption().equals(other.getDatabaseEncryption())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (hasAwsServicesAuthentication() != other.hasAwsServicesAuthentication()) return false; + if (hasAwsServicesAuthentication()) { + if (!getAwsServicesAuthentication().equals(other.getAwsServicesAuthentication())) + return false; + } + if (hasProxyConfig() != other.hasProxyConfig()) return false; + if (hasProxyConfig()) { + if (!getProxyConfig().equals(other.getProxyConfig())) return false; + } + if (hasConfigEncryption() != other.hasConfigEncryption()) return false; + if (hasConfigEncryption()) { + if (!getConfigEncryption().equals(other.getConfigEncryption())) return false; + } + if (hasInstancePlacement() != other.hasInstancePlacement()) return false; + if (hasInstancePlacement()) { + if (!getInstancePlacement().equals(other.getInstancePlacement())) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + INSTANCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceType().hashCode(); + if (hasSshConfig()) { + hash = (37 * hash) + SSH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSshConfig().hashCode(); + } + if (getSubnetIdsCount() > 0) { + hash = (37 * hash) + SUBNET_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSubnetIdsList().hashCode(); + } + if (getSecurityGroupIdsCount() > 0) { + hash = (37 * hash) + SECURITY_GROUP_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityGroupIdsList().hashCode(); + } + hash = (37 * hash) + IAM_INSTANCE_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getIamInstanceProfile().hashCode(); + if (hasRootVolume()) { + hash = (37 * hash) + ROOT_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getRootVolume().hashCode(); + } + if (hasMainVolume()) { + hash = (37 * hash) + MAIN_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getMainVolume().hashCode(); + } + if (hasDatabaseEncryption()) { + hash = (37 * hash) + DATABASE_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseEncryption().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + if (hasAwsServicesAuthentication()) { + hash = (37 * hash) + AWS_SERVICES_AUTHENTICATION_FIELD_NUMBER; + hash = (53 * hash) + getAwsServicesAuthentication().hashCode(); + } + if (hasProxyConfig()) { + hash = (37 * hash) + PROXY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProxyConfig().hashCode(); + } + if (hasConfigEncryption()) { + hash = (37 * hash) + CONFIG_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getConfigEncryption().hashCode(); + } + if (hasInstancePlacement()) { + hash = (37 * hash) + INSTANCE_PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getInstancePlacement().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsControlPlane 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; + } + /** + * + * + *
+   * ControlPlane defines common parameters between control plane nodes.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsControlPlane} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsControlPlane) + com.google.cloud.gkemulticloud.v1.AwsControlPlaneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsControlPlane.class, + com.google.cloud.gkemulticloud.v1.AwsControlPlane.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsControlPlane.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(); + version_ = ""; + + instanceType_ = ""; + + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + subnetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + iamInstanceProfile_ = ""; + + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + if (mainVolumeBuilder_ == null) { + mainVolume_ = null; + } else { + mainVolume_ = null; + mainVolumeBuilder_ = null; + } + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = null; + } else { + databaseEncryption_ = null; + databaseEncryptionBuilder_ = null; + } + internalGetMutableTags().clear(); + if (awsServicesAuthenticationBuilder_ == null) { + awsServicesAuthentication_ = null; + } else { + awsServicesAuthentication_ = null; + awsServicesAuthenticationBuilder_ = null; + } + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + if (instancePlacementBuilder_ == null) { + instancePlacement_ = null; + } else { + instancePlacement_ = null; + instancePlacementBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlane getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsControlPlane.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlane build() { + com.google.cloud.gkemulticloud.v1.AwsControlPlane result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlane buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsControlPlane result = + new com.google.cloud.gkemulticloud.v1.AwsControlPlane(this); + int from_bitField0_ = bitField0_; + result.version_ = version_; + result.instanceType_ = instanceType_; + if (sshConfigBuilder_ == null) { + result.sshConfig_ = sshConfig_; + } else { + result.sshConfig_ = sshConfigBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + subnetIds_ = subnetIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subnetIds_ = subnetIds_; + if (((bitField0_ & 0x00000002) != 0)) { + securityGroupIds_ = securityGroupIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.securityGroupIds_ = securityGroupIds_; + result.iamInstanceProfile_ = iamInstanceProfile_; + if (rootVolumeBuilder_ == null) { + result.rootVolume_ = rootVolume_; + } else { + result.rootVolume_ = rootVolumeBuilder_.build(); + } + if (mainVolumeBuilder_ == null) { + result.mainVolume_ = mainVolume_; + } else { + result.mainVolume_ = mainVolumeBuilder_.build(); + } + if (databaseEncryptionBuilder_ == null) { + result.databaseEncryption_ = databaseEncryption_; + } else { + result.databaseEncryption_ = databaseEncryptionBuilder_.build(); + } + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + if (awsServicesAuthenticationBuilder_ == null) { + result.awsServicesAuthentication_ = awsServicesAuthentication_; + } else { + result.awsServicesAuthentication_ = awsServicesAuthenticationBuilder_.build(); + } + if (proxyConfigBuilder_ == null) { + result.proxyConfig_ = proxyConfig_; + } else { + result.proxyConfig_ = proxyConfigBuilder_.build(); + } + if (configEncryptionBuilder_ == null) { + result.configEncryption_ = configEncryption_; + } else { + result.configEncryption_ = configEncryptionBuilder_.build(); + } + if (instancePlacementBuilder_ == null) { + result.instancePlacement_ = instancePlacement_; + } else { + result.instancePlacement_ = instancePlacementBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsControlPlane) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsControlPlane) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsControlPlane other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsControlPlane.getDefaultInstance()) + return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getInstanceType().isEmpty()) { + instanceType_ = other.instanceType_; + onChanged(); + } + if (other.hasSshConfig()) { + mergeSshConfig(other.getSshConfig()); + } + if (!other.subnetIds_.isEmpty()) { + if (subnetIds_.isEmpty()) { + subnetIds_ = other.subnetIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubnetIdsIsMutable(); + subnetIds_.addAll(other.subnetIds_); + } + onChanged(); + } + if (!other.securityGroupIds_.isEmpty()) { + if (securityGroupIds_.isEmpty()) { + securityGroupIds_ = other.securityGroupIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.addAll(other.securityGroupIds_); + } + onChanged(); + } + if (!other.getIamInstanceProfile().isEmpty()) { + iamInstanceProfile_ = other.iamInstanceProfile_; + onChanged(); + } + if (other.hasRootVolume()) { + mergeRootVolume(other.getRootVolume()); + } + if (other.hasMainVolume()) { + mergeMainVolume(other.getMainVolume()); + } + if (other.hasDatabaseEncryption()) { + mergeDatabaseEncryption(other.getDatabaseEncryption()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + if (other.hasAwsServicesAuthentication()) { + mergeAwsServicesAuthentication(other.getAwsServicesAuthentication()); + } + if (other.hasProxyConfig()) { + mergeProxyConfig(other.getProxyConfig()); + } + if (other.hasConfigEncryption()) { + mergeConfigEncryption(other.getConfigEncryption()); + } + if (other.hasInstancePlacement()) { + mergeInstancePlacement(other.getInstancePlacement()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsControlPlane parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsControlPlane) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private java.lang.Object instanceType_ = ""; + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the cluster's version.
+     * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + public java.lang.String getInstanceType() { + java.lang.Object ref = instanceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the cluster's version.
+     * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + public com.google.protobuf.ByteString getInstanceTypeBytes() { + java.lang.Object ref = instanceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the cluster's version.
+     * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the cluster's version.
+     * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceType() { + + instanceType_ = getDefaultInstance().getInstanceType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the cluster's version.
+     * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsSshConfig sshConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder> + sshConfigBuilder_; + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + public boolean hasSshConfig() { + return sshConfigBuilder_ != null || sshConfig_ != null; + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig() { + if (sshConfigBuilder_ == null) { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } else { + return sshConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSshConfig(com.google.cloud.gkemulticloud.v1.AwsSshConfig value) { + if (sshConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sshConfig_ = value; + onChanged(); + } else { + sshConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSshConfig( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder builderForValue) { + if (sshConfigBuilder_ == null) { + sshConfig_ = builderForValue.build(); + onChanged(); + } else { + sshConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSshConfig(com.google.cloud.gkemulticloud.v1.AwsSshConfig value) { + if (sshConfigBuilder_ == null) { + if (sshConfig_ != null) { + sshConfig_ = + com.google.cloud.gkemulticloud.v1.AwsSshConfig.newBuilder(sshConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sshConfig_ = value; + } + onChanged(); + } else { + sshConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSshConfig() { + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + onChanged(); + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder getSshConfigBuilder() { + + onChanged(); + return getSshConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder() { + if (sshConfigBuilder_ != null) { + return sshConfigBuilder_.getMessageOrBuilder(); + } else { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } + } + /** + * + * + *
+     * Optional. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder> + getSshConfigFieldBuilder() { + if (sshConfigBuilder_ == null) { + sshConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder>( + getSshConfig(), getParentForChildren(), isClean()); + sshConfig_ = null; + } + return sshConfigBuilder_; + } + + private com.google.protobuf.LazyStringList subnetIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSubnetIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subnetIds_ = new com.google.protobuf.LazyStringArrayList(subnetIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the subnetIds. + */ + public com.google.protobuf.ProtocolStringList getSubnetIdsList() { + return subnetIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of subnetIds. + */ + public int getSubnetIdsCount() { + return subnetIds_.size(); + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The subnetIds at the given index. + */ + public java.lang.String getSubnetIds(int index) { + return subnetIds_.get(index); + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the subnetIds at the given index. + */ + public com.google.protobuf.ByteString getSubnetIdsBytes(int index) { + return subnetIds_.getByteString(index); + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The subnetIds to set. + * @return This builder for chaining. + */ + public Builder setSubnetIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetIdsIsMutable(); + subnetIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The subnetIds to add. + * @return This builder for chaining. + */ + public Builder addSubnetIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetIdsIsMutable(); + subnetIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The subnetIds to add. + * @return This builder for chaining. + */ + public Builder addAllSubnetIds(java.lang.Iterable values) { + ensureSubnetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subnetIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetIds() { + subnetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of subnets where control plane replicas will run.
+     * A replica will be provisioned on each subnet and up to three values
+     * can be provided.
+     * Each subnet must be in a different AWS Availability Zone (AZ).
+     * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the subnetIds to add. + * @return This builder for chaining. + */ + public Builder addSubnetIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSubnetIdsIsMutable(); + subnetIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList securityGroupIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSecurityGroupIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(securityGroupIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the securityGroupIds. + */ + public com.google.protobuf.ProtocolStringList getSecurityGroupIdsList() { + return securityGroupIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of securityGroupIds. + */ + public int getSecurityGroupIdsCount() { + return securityGroupIds_.size(); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + public java.lang.String getSecurityGroupIds(int index) { + return securityGroupIds_.get(index); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + public com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index) { + return securityGroupIds_.getByteString(index); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The securityGroupIds to set. + * @return This builder for chaining. + */ + public Builder setSecurityGroupIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addSecurityGroupIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addAllSecurityGroupIds(java.lang.Iterable values) { + ensureSecurityGroupIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, securityGroupIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSecurityGroupIds() { + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to control plane
+     * replicas. The Anthos Multi-Cloud API will automatically create and manage
+     * security groups with the minimum rules needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addSecurityGroupIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object iamInstanceProfile_ = ""; + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+     * plane replica.
+     * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + public java.lang.String getIamInstanceProfile() { + java.lang.Object ref = iamInstanceProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamInstanceProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+     * plane replica.
+     * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + public com.google.protobuf.ByteString getIamInstanceProfileBytes() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamInstanceProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+     * plane replica.
+     * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The iamInstanceProfile to set. + * @return This builder for chaining. + */ + public Builder setIamInstanceProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + iamInstanceProfile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+     * plane replica.
+     * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIamInstanceProfile() { + + iamInstanceProfile_ = getDefaultInstance().getIamInstanceProfile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+     * plane replica.
+     * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for iamInstanceProfile to set. + * @return This builder for chaining. + */ + public Builder setIamInstanceProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + iamInstanceProfile_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate rootVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + rootVolumeBuilder_; + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + public boolean hasRootVolume() { + return rootVolumeBuilder_ != null || rootVolume_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume() { + if (rootVolumeBuilder_ == null) { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } else { + return rootVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (rootVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rootVolume_ = value; + onChanged(); + } else { + rootVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder builderForValue) { + if (rootVolumeBuilder_ == null) { + rootVolume_ = builderForValue.build(); + onChanged(); + } else { + rootVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRootVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (rootVolumeBuilder_ == null) { + if (rootVolume_ != null) { + rootVolume_ = + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.newBuilder(rootVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + rootVolume_ = value; + } + onChanged(); + } else { + rootVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRootVolume() { + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + onChanged(); + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder getRootVolumeBuilder() { + + onChanged(); + return getRootVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder() { + if (rootVolumeBuilder_ != null) { + return rootVolumeBuilder_.getMessageOrBuilder(); + } else { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + getRootVolumeFieldBuilder() { + if (rootVolumeBuilder_ == null) { + rootVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder>( + getRootVolume(), getParentForChildren(), isClean()); + rootVolume_ = null; + } + return rootVolumeBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate mainVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + mainVolumeBuilder_; + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + public boolean hasMainVolume() { + return mainVolumeBuilder_ != null || mainVolume_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getMainVolume() { + if (mainVolumeBuilder_ == null) { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : mainVolume_; + } else { + return mainVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMainVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (mainVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mainVolume_ = value; + onChanged(); + } else { + mainVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMainVolume( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder builderForValue) { + if (mainVolumeBuilder_ == null) { + mainVolume_ = builderForValue.build(); + onChanged(); + } else { + mainVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMainVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (mainVolumeBuilder_ == null) { + if (mainVolume_ != null) { + mainVolume_ = + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.newBuilder(mainVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + mainVolume_ = value; + } + onChanged(); + } else { + mainVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMainVolume() { + if (mainVolumeBuilder_ == null) { + mainVolume_ = null; + onChanged(); + } else { + mainVolume_ = null; + mainVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder getMainVolumeBuilder() { + + onChanged(); + return getMainVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getMainVolumeOrBuilder() { + if (mainVolumeBuilder_ != null) { + return mainVolumeBuilder_.getMessageOrBuilder(); + } else { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : mainVolume_; + } + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * Volumes will be provisioned in the availability zone associated
+     * with the corresponding subnet.
+     * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + getMainVolumeFieldBuilder() { + if (mainVolumeBuilder_ == null) { + mainVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder>( + getMainVolume(), getParentForChildren(), isClean()); + mainVolume_ = null; + } + return mainVolumeBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption databaseEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder> + databaseEncryptionBuilder_; + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the databaseEncryption field is set. + */ + public boolean hasDatabaseEncryption() { + return databaseEncryptionBuilder_ != null || databaseEncryption_ != null; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The databaseEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDatabaseEncryption() { + if (databaseEncryptionBuilder_ == null) { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } else { + return databaseEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption value) { + if (databaseEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + databaseEncryption_ = value; + onChanged(); + } else { + databaseEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder builderForValue) { + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = builderForValue.build(); + onChanged(); + } else { + databaseEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption value) { + if (databaseEncryptionBuilder_ == null) { + if (databaseEncryption_ != null) { + databaseEncryption_ = + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.newBuilder( + databaseEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + databaseEncryption_ = value; + } + onChanged(); + } else { + databaseEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDatabaseEncryption() { + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = null; + onChanged(); + } else { + databaseEncryption_ = null; + databaseEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder + getDatabaseEncryptionBuilder() { + + onChanged(); + return getDatabaseEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder + getDatabaseEncryptionOrBuilder() { + if (databaseEncryptionBuilder_ != null) { + return databaseEncryptionBuilder_.getMessageOrBuilder(); + } else { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder> + getDatabaseEncryptionFieldBuilder() { + if (databaseEncryptionBuilder_ == null) { + databaseEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder>( + getDatabaseEncryption(), getParentForChildren(), isClean()); + databaseEncryption_ = null; + } + return databaseEncryptionBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + onChanged(); + ; + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + internalGetMutableTags().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + return internalGetMutableTags().getMutableMap(); + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableTags().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+     * resources.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication awsServicesAuthentication_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder> + awsServicesAuthenticationBuilder_; + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsServicesAuthentication field is set. + */ + public boolean hasAwsServicesAuthentication() { + return awsServicesAuthenticationBuilder_ != null || awsServicesAuthentication_ != null; + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsServicesAuthentication. + */ + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication + getAwsServicesAuthentication() { + if (awsServicesAuthenticationBuilder_ == null) { + return awsServicesAuthentication_ == null + ? com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.getDefaultInstance() + : awsServicesAuthentication_; + } else { + return awsServicesAuthenticationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsServicesAuthentication( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication value) { + if (awsServicesAuthenticationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsServicesAuthentication_ = value; + onChanged(); + } else { + awsServicesAuthenticationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsServicesAuthentication( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder builderForValue) { + if (awsServicesAuthenticationBuilder_ == null) { + awsServicesAuthentication_ = builderForValue.build(); + onChanged(); + } else { + awsServicesAuthenticationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAwsServicesAuthentication( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication value) { + if (awsServicesAuthenticationBuilder_ == null) { + if (awsServicesAuthentication_ != null) { + awsServicesAuthentication_ = + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.newBuilder( + awsServicesAuthentication_) + .mergeFrom(value) + .buildPartial(); + } else { + awsServicesAuthentication_ = value; + } + onChanged(); + } else { + awsServicesAuthenticationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAwsServicesAuthentication() { + if (awsServicesAuthenticationBuilder_ == null) { + awsServicesAuthentication_ = null; + onChanged(); + } else { + awsServicesAuthentication_ = null; + awsServicesAuthenticationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder + getAwsServicesAuthenticationBuilder() { + + onChanged(); + return getAwsServicesAuthenticationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder + getAwsServicesAuthenticationOrBuilder() { + if (awsServicesAuthenticationBuilder_ != null) { + return awsServicesAuthenticationBuilder_.getMessageOrBuilder(); + } else { + return awsServicesAuthentication_ == null + ? com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.getDefaultInstance() + : awsServicesAuthentication_; + } + } + /** + * + * + *
+     * Required. Authentication configuration for management of AWS resources.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder> + getAwsServicesAuthenticationFieldBuilder() { + if (awsServicesAuthenticationBuilder_ == null) { + awsServicesAuthenticationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder>( + getAwsServicesAuthentication(), getParentForChildren(), isClean()); + awsServicesAuthentication_ = null; + } + return awsServicesAuthenticationBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsProxyConfig proxyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder> + proxyConfigBuilder_; + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + public boolean hasProxyConfig() { + return proxyConfigBuilder_ != null || proxyConfig_ != null; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig() { + if (proxyConfigBuilder_ == null) { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } else { + return proxyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig(com.google.cloud.gkemulticloud.v1.AwsProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proxyConfig_ = value; + onChanged(); + } else { + proxyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder builderForValue) { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = builderForValue.build(); + onChanged(); + } else { + proxyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProxyConfig(com.google.cloud.gkemulticloud.v1.AwsProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (proxyConfig_ != null) { + proxyConfig_ = + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.newBuilder(proxyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + proxyConfig_ = value; + } + onChanged(); + } else { + proxyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProxyConfig() { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + onChanged(); + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder getProxyConfigBuilder() { + + onChanged(); + return getProxyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder() { + if (proxyConfigBuilder_ != null) { + return proxyConfigBuilder_.getMessageOrBuilder(); + } else { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder> + getProxyConfigFieldBuilder() { + if (proxyConfigBuilder_ == null) { + proxyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder>( + getProxyConfig(), getParentForChildren(), isClean()); + proxyConfig_ = null; + } + return proxyConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsConfigEncryption configEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder> + configEncryptionBuilder_; + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + public boolean hasConfigEncryption() { + return configEncryptionBuilder_ != null || configEncryption_ != null; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption() { + if (configEncryptionBuilder_ == null) { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } else { + return configEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configEncryption_ = value; + onChanged(); + } else { + configEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder builderForValue) { + if (configEncryptionBuilder_ == null) { + configEncryption_ = builderForValue.build(); + onChanged(); + } else { + configEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (configEncryption_ != null) { + configEncryption_ = + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.newBuilder(configEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + configEncryption_ = value; + } + onChanged(); + } else { + configEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfigEncryption() { + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + onChanged(); + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder + getConfigEncryptionBuilder() { + + onChanged(); + return getConfigEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + if (configEncryptionBuilder_ != null) { + return configEncryptionBuilder_.getMessageOrBuilder(); + } else { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder> + getConfigEncryptionFieldBuilder() { + if (configEncryptionBuilder_ == null) { + configEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder>( + getConfigEncryption(), getParentForChildren(), isClean()); + configEncryption_ = null; + } + return configEncryptionBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsInstancePlacement instancePlacement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder> + instancePlacementBuilder_; + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + public boolean hasInstancePlacement() { + return instancePlacementBuilder_ != null || instancePlacement_ != null; + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement() { + if (instancePlacementBuilder_ == null) { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } else { + return instancePlacementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement value) { + if (instancePlacementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePlacement_ = value; + onChanged(); + } else { + instancePlacementBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder builderForValue) { + if (instancePlacementBuilder_ == null) { + instancePlacement_ = builderForValue.build(); + onChanged(); + } else { + instancePlacementBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement value) { + if (instancePlacementBuilder_ == null) { + if (instancePlacement_ != null) { + instancePlacement_ = + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.newBuilder(instancePlacement_) + .mergeFrom(value) + .buildPartial(); + } else { + instancePlacement_ = value; + } + onChanged(); + } else { + instancePlacementBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstancePlacement() { + if (instancePlacementBuilder_ == null) { + instancePlacement_ = null; + onChanged(); + } else { + instancePlacement_ = null; + instancePlacementBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder + getInstancePlacementBuilder() { + + onChanged(); + return getInstancePlacementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder + getInstancePlacementOrBuilder() { + if (instancePlacementBuilder_ != null) { + return instancePlacementBuilder_.getMessageOrBuilder(); + } else { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } + } + /** + * + * + *
+     * Optional. The placement to use on control plane instances.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder> + getInstancePlacementFieldBuilder() { + if (instancePlacementBuilder_ == null) { + instancePlacementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder>( + getInstancePlacement(), getParentForChildren(), isClean()); + instancePlacement_ = null; + } + return instancePlacementBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsControlPlane) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsControlPlane) + private static final com.google.cloud.gkemulticloud.v1.AwsControlPlane DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsControlPlane(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsControlPlane getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsControlPlane parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsControlPlane(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsControlPlane getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlaneOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlaneOrBuilder.java new file mode 100644 index 0000000..491a896 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsControlPlaneOrBuilder.java @@ -0,0 +1,675 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsControlPlaneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsControlPlane) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the cluster's version.
+   * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + java.lang.String getInstanceType(); + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the cluster's version.
+   * 
+ * + * string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + com.google.protobuf.ByteString getInstanceTypeBytes(); + + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + boolean hasSshConfig(); + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig(); + /** + * + * + *
+   * Optional. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder(); + + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the subnetIds. + */ + java.util.List getSubnetIdsList(); + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of subnetIds. + */ + int getSubnetIdsCount(); + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The subnetIds at the given index. + */ + java.lang.String getSubnetIds(int index); + /** + * + * + *
+   * Required. The list of subnets where control plane replicas will run.
+   * A replica will be provisioned on each subnet and up to three values
+   * can be provided.
+   * Each subnet must be in a different AWS Availability Zone (AZ).
+   * 
+ * + * repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the subnetIds at the given index. + */ + com.google.protobuf.ByteString getSubnetIdsBytes(int index); + + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the securityGroupIds. + */ + java.util.List getSecurityGroupIdsList(); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of securityGroupIds. + */ + int getSecurityGroupIdsCount(); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + java.lang.String getSecurityGroupIds(int index); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to control plane
+   * replicas. The Anthos Multi-Cloud API will automatically create and manage
+   * security groups with the minimum rules needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index); + + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+   * plane replica.
+   * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + java.lang.String getIamInstanceProfile(); + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM instance profile to assign to each control
+   * plane replica.
+   * 
+ * + * string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + com.google.protobuf.ByteString getIamInstanceProfileBytes(); + + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + boolean hasRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + boolean hasMainVolume(); + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getMainVolume(); + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * Volumes will be provisioned in the availability zone associated
+   * with the corresponding subnet.
+   * When unspecified, it defaults to 8 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getMainVolumeOrBuilder(); + + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the databaseEncryption field is set. + */ + boolean hasDatabaseEncryption(); + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The databaseEncryption. + */ + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDatabaseEncryption(); + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder getDatabaseEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsTags(java.lang.String key); + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getTagsMap(); + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. A set of AWS resource tags to propagate to all underlying managed AWS
+   * resources.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getTagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsServicesAuthentication field is set. + */ + boolean hasAwsServicesAuthentication(); + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsServicesAuthentication. + */ + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication getAwsServicesAuthentication(); + /** + * + * + *
+   * Required. Authentication configuration for management of AWS resources.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder + getAwsServicesAuthenticationOrBuilder(); + + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + boolean hasProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder(); + + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + boolean hasConfigEncryption(); + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption(); + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder getConfigEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + boolean hasInstancePlacement(); + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement(); + /** + * + * + *
+   * Optional. The placement to use on control plane instances.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder getInstancePlacementOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryption.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryption.java new file mode 100644 index 0000000..9a7020a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryption.java @@ -0,0 +1,639 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to application-layer secrets encryption.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} + */ +public final class AwsDatabaseEncryption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + AwsDatabaseEncryptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsDatabaseEncryption.newBuilder() to construct. + private AwsDatabaseEncryption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsDatabaseEncryption() { + kmsKeyArn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsDatabaseEncryption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsDatabaseEncryption( + 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(); + + kmsKeyArn_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.class, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder.class); + } + + public static final int KMS_KEY_ARN_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKeyArn_; + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + @java.lang.Override + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyArn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyArn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption other = + (com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) obj; + + if (!getKmsKeyArn().equals(other.getKmsKeyArn())) 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) + KMS_KEY_ARN_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyArn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption 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; + } + /** + * + * + *
+   * Configuration related to application-layer secrets encryption.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.class, + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.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(); + kmsKeyArn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption build() { + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption result = + new com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(this); + result.kmsKeyArn_ = kmsKeyArn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.getDefaultInstance()) + return this; + if (!other.getKmsKeyArn().isEmpty()) { + kmsKeyArn_ = other.kmsKeyArn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKeyArn_ = ""; + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyArn() { + + kmsKeyArn_ = getDefaultInstance().getKmsKeyArn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+     * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyArn_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + private static final com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsDatabaseEncryption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsDatabaseEncryption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryptionOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryptionOrBuilder.java new file mode 100644 index 0000000..aa3ef04 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsDatabaseEncryptionOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsDatabaseEncryptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyArn. + */ + java.lang.String getKmsKeyArn(); + /** + * + * + *
+   * Required. The ARN of the AWS KMS key used to encrypt cluster secrets.
+   * 
+ * + * string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyArn. + */ + com.google.protobuf.ByteString getKmsKeyArnBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacement.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacement.java new file mode 100644 index 0000000..d11d694 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacement.java @@ -0,0 +1,820 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Details of placement information for an instance.
+ * Limitations for using the `host` tenancy:
+ *  * T3 instances that use the unlimited CPU credit option don't support host
+ *  tenancy.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsInstancePlacement} + */ +public final class AwsInstancePlacement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsInstancePlacement) + AwsInstancePlacementOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsInstancePlacement.newBuilder() to construct. + private AwsInstancePlacement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsInstancePlacement() { + tenancy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsInstancePlacement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsInstancePlacement( + 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(); + + tenancy_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.class, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder.class); + } + + /** + * + * + *
+   * Tenancy defines how EC2 instances are distributed across physical hardware.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy} + */ + public enum Tenancy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * TENANCY_UNSPECIFIED = 0; + */ + TENANCY_UNSPECIFIED(0), + /** + * + * + *
+     * Use default VPC tenancy.
+     * 
+ * + * DEFAULT = 1; + */ + DEFAULT(1), + /** + * + * + *
+     * Run a dedicated instance.
+     * 
+ * + * DEDICATED = 2; + */ + DEDICATED(2), + /** + * + * + *
+     * Launch this instance to a dedicated host.
+     * 
+ * + * HOST = 3; + */ + HOST(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * TENANCY_UNSPECIFIED = 0; + */ + public static final int TENANCY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use default VPC tenancy.
+     * 
+ * + * DEFAULT = 1; + */ + public static final int DEFAULT_VALUE = 1; + /** + * + * + *
+     * Run a dedicated instance.
+     * 
+ * + * DEDICATED = 2; + */ + public static final int DEDICATED_VALUE = 2; + /** + * + * + *
+     * Launch this instance to a dedicated host.
+     * 
+ * + * HOST = 3; + */ + public static final int HOST_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 Tenancy 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 Tenancy forNumber(int value) { + switch (value) { + case 0: + return TENANCY_UNSPECIFIED; + case 1: + return DEFAULT; + case 2: + return DEDICATED; + case 3: + return HOST; + 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 Tenancy findValueByNumber(int number) { + return Tenancy.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Tenancy[] VALUES = values(); + + public static Tenancy 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 Tenancy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy) + } + + public static final int TENANCY_FIELD_NUMBER = 1; + private int tenancy_; + /** + * + * + *
+   * Required. The tenancy for instance.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tenancy. + */ + @java.lang.Override + public int getTenancyValue() { + return tenancy_; + } + /** + * + * + *
+   * Required. The tenancy for instance.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenancy. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy getTenancy() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy result = + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.valueOf(tenancy_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.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 (tenancy_ + != com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.TENANCY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, tenancy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tenancy_ + != com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.TENANCY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, tenancy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsInstancePlacement)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement other = + (com.google.cloud.gkemulticloud.v1.AwsInstancePlacement) obj; + + if (tenancy_ != other.tenancy_) 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) + TENANCY_FIELD_NUMBER; + hash = (53 * hash) + tenancy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of placement information for an instance.
+   * Limitations for using the `host` tenancy:
+   *  * T3 instances that use the unlimited CPU credit option don't support host
+   *  tenancy.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsInstancePlacement} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsInstancePlacement) + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.class, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.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(); + tenancy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement build() { + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement result = + new com.google.cloud.gkemulticloud.v1.AwsInstancePlacement(this); + result.tenancy_ = tenancy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsInstancePlacement) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsInstancePlacement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsInstancePlacement other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance()) + return this; + if (other.tenancy_ != 0) { + setTenancyValue(other.getTenancyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsInstancePlacement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int tenancy_ = 0; + /** + * + * + *
+     * Required. The tenancy for instance.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tenancy. + */ + @java.lang.Override + public int getTenancyValue() { + return tenancy_; + } + /** + * + * + *
+     * Required. The tenancy for instance.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for tenancy to set. + * @return This builder for chaining. + */ + public Builder setTenancyValue(int value) { + + tenancy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The tenancy for instance.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenancy. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy getTenancy() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy result = + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.valueOf(tenancy_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The tenancy for instance.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The tenancy to set. + * @return This builder for chaining. + */ + public Builder setTenancy( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy value) { + if (value == null) { + throw new NullPointerException(); + } + + tenancy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The tenancy for instance.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearTenancy() { + + tenancy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsInstancePlacement) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsInstancePlacement) + private static final com.google.cloud.gkemulticloud.v1.AwsInstancePlacement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsInstancePlacement(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsInstancePlacement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsInstancePlacement(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacementOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacementOrBuilder.java new file mode 100644 index 0000000..5dec536 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsInstancePlacementOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsInstancePlacementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsInstancePlacement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The tenancy for instance.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tenancy. + */ + int getTenancyValue(); + /** + * + * + *
+   * Required. The tenancy for instance.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenancy. + */ + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy getTenancy(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfo.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfo.java new file mode 100644 index 0000000..cf286e4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfo.java @@ -0,0 +1,638 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Kubernetes version information of GKE cluster on AWS.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} + */ +public final class AwsK8sVersionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + AwsK8sVersionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsK8sVersionInfo.newBuilder() to construct. + private AwsK8sVersionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsK8sVersionInfo() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsK8sVersionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsK8sVersionInfo( + 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(); + + version_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.class, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Kubernetes version name.
+   * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+   * Kubernetes version name.
+   * 
+ * + * string version = 1; + * + * @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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.cloud.gkemulticloud.v1.AwsK8sVersionInfo)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo other = + (com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) obj; + + 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo 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; + } + /** + * + * + *
+   * Kubernetes version information of GKE cluster on AWS.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.class, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.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(); + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo build() { + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo result = + new com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(this); + 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.cloud.gkemulticloud.v1.AwsK8sVersionInfo) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.getDefaultInstance()) + return this; + 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.cloud.gkemulticloud.v1.AwsK8sVersionInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Kubernetes version name.
+     * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+     * Kubernetes version name.
+     * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+     * Kubernetes version name.
+     * 
+ * + * string version = 1; + * + * @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; + } + /** + * + * + *
+     * Kubernetes version name.
+     * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Kubernetes version name.
+     * 
+ * + * string version = 1; + * + * @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.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + private static final com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsK8sVersionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsK8sVersionInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfoOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfoOrBuilder.java new file mode 100644 index 0000000..96d0583 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsK8sVersionInfoOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsK8sVersionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Kubernetes version name.
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Kubernetes version name.
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java new file mode 100644 index 0000000..2538b4c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java @@ -0,0 +1,4114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Parameters that describe the nodes in a cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodeConfig} + */ +public final class AwsNodeConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsNodeConfig) + AwsNodeConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsNodeConfig.newBuilder() to construct. + private AwsNodeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsNodeConfig() { + instanceType_ = ""; + taints_ = java.util.Collections.emptyList(); + iamInstanceProfile_ = ""; + imageType_ = ""; + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsNodeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsNodeConfig( + 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(); + + instanceType_ = s; + break; + } + case 18: + { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder subBuilder = null; + if (rootVolume_ != null) { + subBuilder = rootVolume_.toBuilder(); + } + rootVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rootVolume_); + rootVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taints_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.NodeTaint.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + tags_ = + com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tags_.getMutableMap().put(tags__.getKey(), tags__.getValue()); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + iamInstanceProfile_ = s; + break; + } + case 74: + { + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder subBuilder = null; + if (sshConfig_ != null) { + subBuilder = sshConfig_.toBuilder(); + } + sshConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sshConfig_); + sshConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + securityGroupIds_.add(s); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageType_ = s; + break; + } + case 98: + { + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder subBuilder = null; + if (proxyConfig_ != null) { + subBuilder = proxyConfig_.toBuilder(); + } + proxyConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proxyConfig_); + proxyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder subBuilder = null; + if (configEncryption_ != null) { + subBuilder = configEncryption_.toBuilder(); + } + configEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configEncryption_); + configEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder subBuilder = null; + if (instancePlacement_ != null) { + subBuilder = instancePlacement_.toBuilder(); + } + instancePlacement_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instancePlacement_); + instancePlacement_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taints_ = java.util.Collections.unmodifiableList(taints_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + securityGroupIds_ = securityGroupIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.class, + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder.class); + } + + public static final int INSTANCE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object instanceType_; + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the node pool's version.
+   * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + @java.lang.Override + public java.lang.String getInstanceType() { + java.lang.Object ref = instanceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the node pool's version.
+   * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTypeBytes() { + java.lang.Object ref = instanceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_VOLUME_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate rootVolume_; + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + @java.lang.Override + public boolean hasRootVolume() { + return rootVolume_ != null; + } + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume() { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder() { + return getRootVolume(); + } + + public static final int TAINTS_FIELD_NUMBER = 3; + private java.util.List taints_; + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getTaintsList() { + return taints_; + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getTaintsOrBuilderList() { + return taints_; + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getTaintsCount() { + return taints_.size(); + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index) { + return taints_.get(index); + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index) { + return taints_.get(index); + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAGS_FIELD_NUMBER = 5; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IAM_INSTANCE_PROFILE_FIELD_NUMBER = 6; + private volatile java.lang.Object iamInstanceProfile_; + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+   * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + @java.lang.Override + public java.lang.String getIamInstanceProfile() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamInstanceProfile_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+   * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIamInstanceProfileBytes() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamInstanceProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_TYPE_FIELD_NUMBER = 11; + private volatile java.lang.Object imageType_; + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + @java.lang.Override + public java.lang.String getImageType() { + java.lang.Object ref = imageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageTypeBytes() { + java.lang.Object ref = imageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSH_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.gkemulticloud.v1.AwsSshConfig sshConfig_; + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + @java.lang.Override + public boolean hasSshConfig() { + return sshConfig_ != null; + } + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig() { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder() { + return getSshConfig(); + } + + public static final int SECURITY_GROUP_IDS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList securityGroupIds_; + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the securityGroupIds. + */ + public com.google.protobuf.ProtocolStringList getSecurityGroupIdsList() { + return securityGroupIds_; + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of securityGroupIds. + */ + public int getSecurityGroupIdsCount() { + return securityGroupIds_.size(); + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + public java.lang.String getSecurityGroupIds(int index) { + return securityGroupIds_.get(index); + } + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + public com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index) { + return securityGroupIds_.getByteString(index); + } + + public static final int PROXY_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.gkemulticloud.v1.AwsProxyConfig proxyConfig_; + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + @java.lang.Override + public boolean hasProxyConfig() { + return proxyConfig_ != null; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig() { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder() { + return getProxyConfig(); + } + + public static final int CONFIG_ENCRYPTION_FIELD_NUMBER = 13; + private com.google.cloud.gkemulticloud.v1.AwsConfigEncryption configEncryption_; + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + @java.lang.Override + public boolean hasConfigEncryption() { + return configEncryption_ != null; + } + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption() { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + return getConfigEncryption(); + } + + public static final int INSTANCE_PLACEMENT_FIELD_NUMBER = 14; + private com.google.cloud.gkemulticloud.v1.AwsInstancePlacement instancePlacement_; + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + @java.lang.Override + public boolean hasInstancePlacement() { + return instancePlacement_ != null; + } + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement() { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder + getInstancePlacementOrBuilder() { + return getInstancePlacement(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceType_); + } + if (rootVolume_ != null) { + output.writeMessage(2, getRootVolume()); + } + for (int i = 0; i < taints_.size(); i++) { + output.writeMessage(3, taints_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iamInstanceProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, iamInstanceProfile_); + } + if (sshConfig_ != null) { + output.writeMessage(9, getSshConfig()); + } + for (int i = 0; i < securityGroupIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, securityGroupIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, imageType_); + } + if (proxyConfig_ != null) { + output.writeMessage(12, getProxyConfig()); + } + if (configEncryption_ != null) { + output.writeMessage(13, getConfigEncryption()); + } + if (instancePlacement_ != null) { + output.writeMessage(14, getInstancePlacement()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceType_); + } + if (rootVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRootVolume()); + } + for (int i = 0; i < taints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, taints_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, tags__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iamInstanceProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, iamInstanceProfile_); + } + if (sshConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSshConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < securityGroupIds_.size(); i++) { + dataSize += computeStringSizeNoTag(securityGroupIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSecurityGroupIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, imageType_); + } + if (proxyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getProxyConfig()); + } + if (configEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getConfigEncryption()); + } + if (instancePlacement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getInstancePlacement()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsNodeConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsNodeConfig other = + (com.google.cloud.gkemulticloud.v1.AwsNodeConfig) obj; + + if (!getInstanceType().equals(other.getInstanceType())) return false; + if (hasRootVolume() != other.hasRootVolume()) return false; + if (hasRootVolume()) { + if (!getRootVolume().equals(other.getRootVolume())) return false; + } + if (!getTaintsList().equals(other.getTaintsList())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (!getIamInstanceProfile().equals(other.getIamInstanceProfile())) return false; + if (!getImageType().equals(other.getImageType())) return false; + if (hasSshConfig() != other.hasSshConfig()) return false; + if (hasSshConfig()) { + if (!getSshConfig().equals(other.getSshConfig())) return false; + } + if (!getSecurityGroupIdsList().equals(other.getSecurityGroupIdsList())) return false; + if (hasProxyConfig() != other.hasProxyConfig()) return false; + if (hasProxyConfig()) { + if (!getProxyConfig().equals(other.getProxyConfig())) return false; + } + if (hasConfigEncryption() != other.hasConfigEncryption()) return false; + if (hasConfigEncryption()) { + if (!getConfigEncryption().equals(other.getConfigEncryption())) return false; + } + if (hasInstancePlacement() != other.hasInstancePlacement()) return false; + if (hasInstancePlacement()) { + if (!getInstancePlacement().equals(other.getInstancePlacement())) 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) + INSTANCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceType().hashCode(); + if (hasRootVolume()) { + hash = (37 * hash) + ROOT_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getRootVolume().hashCode(); + } + if (getTaintsCount() > 0) { + hash = (37 * hash) + TAINTS_FIELD_NUMBER; + hash = (53 * hash) + getTaintsList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + hash = (37 * hash) + IAM_INSTANCE_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getIamInstanceProfile().hashCode(); + hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getImageType().hashCode(); + if (hasSshConfig()) { + hash = (37 * hash) + SSH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSshConfig().hashCode(); + } + if (getSecurityGroupIdsCount() > 0) { + hash = (37 * hash) + SECURITY_GROUP_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityGroupIdsList().hashCode(); + } + if (hasProxyConfig()) { + hash = (37 * hash) + PROXY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProxyConfig().hashCode(); + } + if (hasConfigEncryption()) { + hash = (37 * hash) + CONFIG_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getConfigEncryption().hashCode(); + } + if (hasInstancePlacement()) { + hash = (37 * hash) + INSTANCE_PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getInstancePlacement().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsNodeConfig 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; + } + /** + * + * + *
+   * Parameters that describe the nodes in a cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodeConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsNodeConfig) + com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 5: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.class, + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsNodeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaintsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instanceType_ = ""; + + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + if (taintsBuilder_ == null) { + taints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + taintsBuilder_.clear(); + } + internalGetMutableLabels().clear(); + internalGetMutableTags().clear(); + iamInstanceProfile_ = ""; + + imageType_ = ""; + + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + if (instancePlacementBuilder_ == null) { + instancePlacement_ = null; + } else { + instancePlacement_ = null; + instancePlacementBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsNodeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig build() { + com.google.cloud.gkemulticloud.v1.AwsNodeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsNodeConfig result = + new com.google.cloud.gkemulticloud.v1.AwsNodeConfig(this); + int from_bitField0_ = bitField0_; + result.instanceType_ = instanceType_; + if (rootVolumeBuilder_ == null) { + result.rootVolume_ = rootVolume_; + } else { + result.rootVolume_ = rootVolumeBuilder_.build(); + } + if (taintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + taints_ = java.util.Collections.unmodifiableList(taints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taints_ = taints_; + } else { + result.taints_ = taintsBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + result.iamInstanceProfile_ = iamInstanceProfile_; + result.imageType_ = imageType_; + if (sshConfigBuilder_ == null) { + result.sshConfig_ = sshConfig_; + } else { + result.sshConfig_ = sshConfigBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { + securityGroupIds_ = securityGroupIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.securityGroupIds_ = securityGroupIds_; + if (proxyConfigBuilder_ == null) { + result.proxyConfig_ = proxyConfig_; + } else { + result.proxyConfig_ = proxyConfigBuilder_.build(); + } + if (configEncryptionBuilder_ == null) { + result.configEncryption_ = configEncryption_; + } else { + result.configEncryption_ = configEncryptionBuilder_.build(); + } + if (instancePlacementBuilder_ == null) { + result.instancePlacement_ = instancePlacement_; + } else { + result.instancePlacement_ = instancePlacementBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsNodeConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsNodeConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsNodeConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsNodeConfig.getDefaultInstance()) + return this; + if (!other.getInstanceType().isEmpty()) { + instanceType_ = other.instanceType_; + onChanged(); + } + if (other.hasRootVolume()) { + mergeRootVolume(other.getRootVolume()); + } + if (taintsBuilder_ == null) { + if (!other.taints_.isEmpty()) { + if (taints_.isEmpty()) { + taints_ = other.taints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaintsIsMutable(); + taints_.addAll(other.taints_); + } + onChanged(); + } + } else { + if (!other.taints_.isEmpty()) { + if (taintsBuilder_.isEmpty()) { + taintsBuilder_.dispose(); + taintsBuilder_ = null; + taints_ = other.taints_; + bitField0_ = (bitField0_ & ~0x00000001); + taintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaintsFieldBuilder() + : null; + } else { + taintsBuilder_.addAllMessages(other.taints_); + } + } + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + internalGetMutableTags().mergeFrom(other.internalGetTags()); + if (!other.getIamInstanceProfile().isEmpty()) { + iamInstanceProfile_ = other.iamInstanceProfile_; + onChanged(); + } + if (!other.getImageType().isEmpty()) { + imageType_ = other.imageType_; + onChanged(); + } + if (other.hasSshConfig()) { + mergeSshConfig(other.getSshConfig()); + } + if (!other.securityGroupIds_.isEmpty()) { + if (securityGroupIds_.isEmpty()) { + securityGroupIds_ = other.securityGroupIds_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.addAll(other.securityGroupIds_); + } + onChanged(); + } + if (other.hasProxyConfig()) { + mergeProxyConfig(other.getProxyConfig()); + } + if (other.hasConfigEncryption()) { + mergeConfigEncryption(other.getConfigEncryption()); + } + if (other.hasInstancePlacement()) { + mergeInstancePlacement(other.getInstancePlacement()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsNodeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsNodeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object instanceType_ = ""; + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the node pool's version.
+     * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + public java.lang.String getInstanceType() { + java.lang.Object ref = instanceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the node pool's version.
+     * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + public com.google.protobuf.ByteString getInstanceTypeBytes() { + java.lang.Object ref = instanceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the node pool's version.
+     * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the node pool's version.
+     * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceType() { + + instanceType_ = getDefaultInstance().getInstanceType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The AWS instance type.
+     * When unspecified, it uses a default based on the node pool's version.
+     * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate rootVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + rootVolumeBuilder_; + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + public boolean hasRootVolume() { + return rootVolumeBuilder_ != null || rootVolume_ != null; + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume() { + if (rootVolumeBuilder_ == null) { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } else { + return rootVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (rootVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rootVolume_ = value; + onChanged(); + } else { + rootVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder builderForValue) { + if (rootVolumeBuilder_ == null) { + rootVolume_ = builderForValue.build(); + onChanged(); + } else { + rootVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRootVolume(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate value) { + if (rootVolumeBuilder_ == null) { + if (rootVolume_ != null) { + rootVolume_ = + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.newBuilder(rootVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + rootVolume_ = value; + } + onChanged(); + } else { + rootVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRootVolume() { + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + onChanged(); + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder getRootVolumeBuilder() { + + onChanged(); + return getRootVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder() { + if (rootVolumeBuilder_ != null) { + return rootVolumeBuilder_.getMessageOrBuilder(); + } else { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance() + : rootVolume_; + } + } + /** + * + * + *
+     * Optional. Template for the root volume provisioned for node pool nodes.
+     * Volumes will be provisioned in the availability zone assigned
+     * to the node pool subnet.
+     * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder> + getRootVolumeFieldBuilder() { + if (rootVolumeBuilder_ == null) { + rootVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder>( + getRootVolume(), getParentForChildren(), isClean()); + rootVolume_ = null; + } + return rootVolumeBuilder_; + } + + private java.util.List taints_ = + java.util.Collections.emptyList(); + + private void ensureTaintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taints_ = new java.util.ArrayList(taints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder> + taintsBuilder_; + + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getTaintsList() { + if (taintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(taints_); + } else { + return taintsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getTaintsCount() { + if (taintsBuilder_ == null) { + return taints_.size(); + } else { + return taintsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index) { + if (taintsBuilder_ == null) { + return taints_.get(index); + } else { + return taintsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTaints(int index, com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.set(index, value); + onChanged(); + } else { + taintsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTaints( + int index, com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.set(index, builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.add(value); + onChanged(); + } else { + taintsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(int index, com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.add(index, value); + onChanged(); + } else { + taintsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.add(builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints( + int index, com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.add(index, builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllTaints( + java.lang.Iterable values) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taints_); + onChanged(); + } else { + taintsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTaints() { + if (taintsBuilder_ == null) { + taints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + taintsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTaints(int index) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.remove(index); + onChanged(); + } else { + taintsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder getTaintsBuilder(int index) { + return getTaintsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index) { + if (taintsBuilder_ == null) { + return taints_.get(index); + } else { + return taintsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTaintsOrBuilderList() { + if (taintsBuilder_ != null) { + return taintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taints_); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder addTaintsBuilder() { + return getTaintsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder addTaintsBuilder(int index) { + return getTaintsFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTaintsBuilderList() { + return getTaintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder> + getTaintsFieldBuilder() { + if (taintsBuilder_ == null) { + taintsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder>( + taints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + taints_ = null; + } + return taintsBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + onChanged(); + ; + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + internalGetMutableTags().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + return internalGetMutableTags().getMutableMap(); + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableTags().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+     * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+     * Keys can be up to 127 Unicode characters.
+     * Values can be up to 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object iamInstanceProfile_ = ""; + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+     * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + public java.lang.String getIamInstanceProfile() { + java.lang.Object ref = iamInstanceProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iamInstanceProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+     * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + public com.google.protobuf.ByteString getIamInstanceProfileBytes() { + java.lang.Object ref = iamInstanceProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iamInstanceProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+     * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The iamInstanceProfile to set. + * @return This builder for chaining. + */ + public Builder setIamInstanceProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + iamInstanceProfile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+     * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIamInstanceProfile() { + + iamInstanceProfile_ = getDefaultInstance().getIamInstanceProfile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+     * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for iamInstanceProfile to set. + * @return This builder for chaining. + */ + public Builder setIamInstanceProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + iamInstanceProfile_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageType_ = ""; + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + public java.lang.String getImageType() { + java.lang.Object ref = imageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + public com.google.protobuf.ByteString getImageTypeBytes() { + java.lang.Object ref = imageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The imageType to set. + * @return This builder for chaining. + */ + public Builder setImageType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImageType() { + + imageType_ = getDefaultInstance().getImageType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for imageType to set. + * @return This builder for chaining. + */ + public Builder setImageTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsSshConfig sshConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder> + sshConfigBuilder_; + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + public boolean hasSshConfig() { + return sshConfigBuilder_ != null || sshConfig_ != null; + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig() { + if (sshConfigBuilder_ == null) { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } else { + return sshConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSshConfig(com.google.cloud.gkemulticloud.v1.AwsSshConfig value) { + if (sshConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sshConfig_ = value; + onChanged(); + } else { + sshConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSshConfig( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder builderForValue) { + if (sshConfigBuilder_ == null) { + sshConfig_ = builderForValue.build(); + onChanged(); + } else { + sshConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSshConfig(com.google.cloud.gkemulticloud.v1.AwsSshConfig value) { + if (sshConfigBuilder_ == null) { + if (sshConfig_ != null) { + sshConfig_ = + com.google.cloud.gkemulticloud.v1.AwsSshConfig.newBuilder(sshConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sshConfig_ = value; + } + onChanged(); + } else { + sshConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSshConfig() { + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + onChanged(); + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder getSshConfigBuilder() { + + onChanged(); + return getSshConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder() { + if (sshConfigBuilder_ != null) { + return sshConfigBuilder_.getMessageOrBuilder(); + } else { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance() + : sshConfig_; + } + } + /** + * + * + *
+     * Optional. The SSH configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder> + getSshConfigFieldBuilder() { + if (sshConfigBuilder_ == null) { + sshConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsSshConfig, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder>( + getSshConfig(), getParentForChildren(), isClean()); + sshConfig_ = null; + } + return sshConfigBuilder_; + } + + private com.google.protobuf.LazyStringList securityGroupIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSecurityGroupIdsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(securityGroupIds_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the securityGroupIds. + */ + public com.google.protobuf.ProtocolStringList getSecurityGroupIdsList() { + return securityGroupIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of securityGroupIds. + */ + public int getSecurityGroupIdsCount() { + return securityGroupIds_.size(); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + public java.lang.String getSecurityGroupIds(int index) { + return securityGroupIds_.get(index); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + public com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index) { + return securityGroupIds_.getByteString(index); + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The securityGroupIds to set. + * @return This builder for chaining. + */ + public Builder setSecurityGroupIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addSecurityGroupIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addAllSecurityGroupIds(java.lang.Iterable values) { + ensureSecurityGroupIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, securityGroupIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSecurityGroupIds() { + securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IDs of additional security groups to add to nodes in this pool. The
+     * manager will automatically create security groups with minimum rules
+     * needed for a functioning cluster.
+     * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the securityGroupIds to add. + * @return This builder for chaining. + */ + public Builder addSecurityGroupIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSecurityGroupIdsIsMutable(); + securityGroupIds_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsProxyConfig proxyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder> + proxyConfigBuilder_; + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + public boolean hasProxyConfig() { + return proxyConfigBuilder_ != null || proxyConfig_ != null; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig() { + if (proxyConfigBuilder_ == null) { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } else { + return proxyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig(com.google.cloud.gkemulticloud.v1.AwsProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proxyConfig_ = value; + onChanged(); + } else { + proxyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder builderForValue) { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = builderForValue.build(); + onChanged(); + } else { + proxyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProxyConfig(com.google.cloud.gkemulticloud.v1.AwsProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (proxyConfig_ != null) { + proxyConfig_ = + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.newBuilder(proxyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + proxyConfig_ = value; + } + onChanged(); + } else { + proxyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProxyConfig() { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + onChanged(); + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder getProxyConfigBuilder() { + + onChanged(); + return getProxyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder() { + if (proxyConfigBuilder_ != null) { + return proxyConfigBuilder_.getMessageOrBuilder(); + } else { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance() + : proxyConfig_; + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder> + getProxyConfigFieldBuilder() { + if (proxyConfigBuilder_ == null) { + proxyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsProxyConfig, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder>( + getProxyConfig(), getParentForChildren(), isClean()); + proxyConfig_ = null; + } + return proxyConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsConfigEncryption configEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder> + configEncryptionBuilder_; + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + public boolean hasConfigEncryption() { + return configEncryptionBuilder_ != null || configEncryption_ != null; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption() { + if (configEncryptionBuilder_ == null) { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } else { + return configEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configEncryption_ = value; + onChanged(); + } else { + configEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder builderForValue) { + if (configEncryptionBuilder_ == null) { + configEncryption_ = builderForValue.build(); + onChanged(); + } else { + configEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfigEncryption( + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (configEncryption_ != null) { + configEncryption_ = + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.newBuilder(configEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + configEncryption_ = value; + } + onChanged(); + } else { + configEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfigEncryption() { + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + onChanged(); + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder + getConfigEncryptionBuilder() { + + onChanged(); + return getConfigEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + if (configEncryptionBuilder_ != null) { + return configEncryptionBuilder_.getMessageOrBuilder(); + } else { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.getDefaultInstance() + : configEncryption_; + } + } + /** + * + * + *
+     * Required. Config encryption for user data.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder> + getConfigEncryptionFieldBuilder() { + if (configEncryptionBuilder_ == null) { + configEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder>( + getConfigEncryption(), getParentForChildren(), isClean()); + configEncryption_ = null; + } + return configEncryptionBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsInstancePlacement instancePlacement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder> + instancePlacementBuilder_; + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + public boolean hasInstancePlacement() { + return instancePlacementBuilder_ != null || instancePlacement_ != null; + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement() { + if (instancePlacementBuilder_ == null) { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } else { + return instancePlacementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement value) { + if (instancePlacementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePlacement_ = value; + onChanged(); + } else { + instancePlacementBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder builderForValue) { + if (instancePlacementBuilder_ == null) { + instancePlacement_ = builderForValue.build(); + onChanged(); + } else { + instancePlacementBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstancePlacement( + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement value) { + if (instancePlacementBuilder_ == null) { + if (instancePlacement_ != null) { + instancePlacement_ = + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.newBuilder(instancePlacement_) + .mergeFrom(value) + .buildPartial(); + } else { + instancePlacement_ = value; + } + onChanged(); + } else { + instancePlacementBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstancePlacement() { + if (instancePlacementBuilder_ == null) { + instancePlacement_ = null; + onChanged(); + } else { + instancePlacement_ = null; + instancePlacementBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder + getInstancePlacementBuilder() { + + onChanged(); + return getInstancePlacementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder + getInstancePlacementOrBuilder() { + if (instancePlacementBuilder_ != null) { + return instancePlacementBuilder_.getMessageOrBuilder(); + } else { + return instancePlacement_ == null + ? com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.getDefaultInstance() + : instancePlacement_; + } + } + /** + * + * + *
+     * Optional. Placement related info for this node.
+     * When unspecified, the VPC's default tenancy will be used.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder> + getInstancePlacementFieldBuilder() { + if (instancePlacementBuilder_ == null) { + instancePlacementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Builder, + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder>( + getInstancePlacement(), getParentForChildren(), isClean()); + instancePlacement_ = null; + } + return instancePlacementBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsNodeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsNodeConfig) + private static final com.google.cloud.gkemulticloud.v1.AwsNodeConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsNodeConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsNodeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsNodeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java new file mode 100644 index 0000000..44f3a20 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java @@ -0,0 +1,589 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsNodeConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsNodeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the node pool's version.
+   * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceType. + */ + java.lang.String getInstanceType(); + /** + * + * + *
+   * Optional. The AWS instance type.
+   * When unspecified, it uses a default based on the node pool's version.
+   * 
+ * + * string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceType. + */ + com.google.protobuf.ByteString getInstanceTypeBytes(); + + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + boolean hasRootVolume(); + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getRootVolume(); + /** + * + * + *
+   * Optional. Template for the root volume provisioned for node pool nodes.
+   * Volumes will be provisioned in the availability zone assigned
+   * to the node pool subnet.
+   * When unspecified, it defaults to 32 GiB with the GP2 volume type.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder getRootVolumeOrBuilder(); + + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getTaintsList(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTaintsCount(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getTaintsOrBuilderList(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsTags(java.lang.String key); + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getTagsMap(); + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Key/value metadata to assign to each underlying AWS resource. Specify at
+   * most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/).
+   * Keys can be up to 127 Unicode characters.
+   * Values can be up to 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getTagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+   * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The iamInstanceProfile. + */ + java.lang.String getIamInstanceProfile(); + /** + * + * + *
+   * Required. The name or ARN of the AWS IAM role assigned to nodes in the pool.
+   * 
+ * + * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for iamInstanceProfile. + */ + com.google.protobuf.ByteString getIamInstanceProfileBytes(); + + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + java.lang.String getImageType(); + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + com.google.protobuf.ByteString getImageTypeBytes(); + + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sshConfig field is set. + */ + boolean hasSshConfig(); + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sshConfig. + */ + com.google.cloud.gkemulticloud.v1.AwsSshConfig getSshConfig(); + /** + * + * + *
+   * Optional. The SSH configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder getSshConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the securityGroupIds. + */ + java.util.List getSecurityGroupIdsList(); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of securityGroupIds. + */ + int getSecurityGroupIdsCount(); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The securityGroupIds at the given index. + */ + java.lang.String getSecurityGroupIds(int index); + /** + * + * + *
+   * Optional. The IDs of additional security groups to add to nodes in this pool. The
+   * manager will automatically create security groups with minimum rules
+   * needed for a functioning cluster.
+   * 
+ * + * repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the securityGroupIds at the given index. + */ + com.google.protobuf.ByteString getSecurityGroupIdsBytes(int index); + + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + boolean hasProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + com.google.cloud.gkemulticloud.v1.AwsProxyConfig getProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder getProxyConfigOrBuilder(); + + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configEncryption field is set. + */ + boolean hasConfigEncryption(); + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configEncryption. + */ + com.google.cloud.gkemulticloud.v1.AwsConfigEncryption getConfigEncryption(); + /** + * + * + *
+   * Required. Config encryption for user data.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsConfigEncryptionOrBuilder getConfigEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePlacement field is set. + */ + boolean hasInstancePlacement(); + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePlacement. + */ + com.google.cloud.gkemulticloud.v1.AwsInstancePlacement getInstancePlacement(); + /** + * + * + *
+   * Optional. Placement related info for this node.
+   * When unspecified, the VPC's default tenancy will be used.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsInstancePlacementOrBuilder getInstancePlacementOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePool.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePool.java new file mode 100644 index 0000000..7ecc3a2 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePool.java @@ -0,0 +1,3871 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * An Anthos node pool running on AWS.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodePool} + */ +public final class AwsNodePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsNodePool) + AwsNodePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsNodePool.newBuilder() to construct. + private AwsNodePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsNodePool() { + name_ = ""; + version_ = ""; + subnetId_ = ""; + state_ = 0; + uid_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsNodePool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsNodePool( + 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 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetId_ = s; + break; + } + case 128: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 144: + { + reconciling_ = input.readBool(); + break; + } + case 154: + { + 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 162: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 202: + { + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder subBuilder = null; + if (autoscaling_ != null) { + subBuilder = autoscaling_.toBuilder(); + } + autoscaling_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(autoscaling_); + autoscaling_ = subBuilder.buildPartial(); + } + + break; + } + case 218: + { + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder subBuilder = null; + if (maxPodsConstraint_ != null) { + subBuilder = maxPodsConstraint_.toBuilder(); + } + maxPodsConstraint_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxPodsConstraint_); + maxPodsConstraint_ = subBuilder.buildPartial(); + } + + break; + } + case 226: + { + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 22: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodePool.class, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder.class); + } + + /** + * + * + *
+   * The lifecycle state of the node pool.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AwsNodePool.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the node pool is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the node pool has been created
+     * and is fully usable.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The RECONCILING state indicates that the node pool is being reconciled.
+     * 
+ * + * RECONCILING = 3; + */ + RECONCILING(3), + /** + * + * + *
+     * The STOPPING state indicates the node pool is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The ERROR state indicates the node pool is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * The DEGRADED state indicates the node pool requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + DEGRADED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the node pool is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the node pool has been created
+     * and is fully usable.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The RECONCILING state indicates that the node pool is being reconciled.
+     * 
+ * + * RECONCILING = 3; + */ + public static final int RECONCILING_VALUE = 3; + /** + * + * + *
+     * The STOPPING state indicates the node pool is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The ERROR state indicates the node pool is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The DEGRADED state indicates the node pool requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + public static final int DEGRADED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return RUNNING; + case 3: + return RECONCILING; + case 4: + return STOPPING; + case 5: + return ERROR; + case 6: + return DEGRADED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsNodePool.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AwsNodePool.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * 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 = 3; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int CONFIG_FIELD_NUMBER = 28; + private com.google.cloud.gkemulticloud.v1.AwsNodeConfig config_; + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig getConfig() { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodeConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + public static final int AUTOSCALING_FIELD_NUMBER = 25; + private com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling_; + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + @java.lang.Override + public boolean hasAutoscaling() { + return autoscaling_ != null; + } + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getAutoscaling() { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder + getAutoscalingOrBuilder() { + return getAutoscaling(); + } + + public static final int SUBNET_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object subnetId_; + /** + * + * + *
+   * Required. The subnet where the node pool node run.
+   * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + @java.lang.Override + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The subnet where the node pool node run.
+   * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 16; + private int state_; + /** + * + * + *
+   * Output only. The lifecycle state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The lifecycle state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsNodePool.State result = + com.google.cloud.gkemulticloud.v1.AwsNodePool.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.State.UNRECOGNIZED + : result; + } + + public static final int UID_FIELD_NUMBER = 17; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONCILING_FIELD_NUMBER = 18; + private boolean reconciling_; + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the node
+   * pool.
+   * 
+ * + * bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 19; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 20; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 21; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 21; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 21; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 22; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MAX_PODS_CONSTRAINT_FIELD_NUMBER = 27; + private com.google.cloud.gkemulticloud.v1.MaxPodsConstraint maxPodsConstraint_; + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + @java.lang.Override + public boolean hasMaxPodsConstraint() { + return maxPodsConstraint_ != null; + } + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint() { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder + getMaxPodsConstraintOrBuilder() { + return getMaxPodsConstraint(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, subnetId_); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AwsNodePool.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(16, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, uid_); + } + if (reconciling_ != false) { + output.writeBool(18, reconciling_); + } + if (createTime_ != null) { + output.writeMessage(19, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(20, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 22); + if (autoscaling_ != null) { + output.writeMessage(25, getAutoscaling()); + } + if (maxPodsConstraint_ != null) { + output.writeMessage(27, getMaxPodsConstraint()); + } + if (config_ != null) { + output.writeMessage(28, getConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, subnetId_); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AwsNodePool.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, uid_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, reconciling_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, etag_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, annotations__); + } + if (autoscaling_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getAutoscaling()); + } + if (maxPodsConstraint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getMaxPodsConstraint()); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsNodePool)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsNodePool other = + (com.google.cloud.gkemulticloud.v1.AwsNodePool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (hasAutoscaling() != other.hasAutoscaling()) return false; + if (hasAutoscaling()) { + if (!getAutoscaling().equals(other.getAutoscaling())) return false; + } + if (!getSubnetId().equals(other.getSubnetId())) return false; + if (state_ != other.state_) return false; + if (!getUid().equals(other.getUid())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasMaxPodsConstraint() != other.hasMaxPodsConstraint()) return false; + if (hasMaxPodsConstraint()) { + if (!getMaxPodsConstraint().equals(other.getMaxPodsConstraint())) 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(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasAutoscaling()) { + hash = (37 * hash) + AUTOSCALING_FIELD_NUMBER; + hash = (53 * hash) + getAutoscaling().hashCode(); + } + hash = (37 * hash) + SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubnetId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasMaxPodsConstraint()) { + hash = (37 * hash) + MAX_PODS_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMaxPodsConstraint().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsNodePool 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 Anthos node pool running on AWS.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodePool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsNodePool) + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 22: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 22: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodePool.class, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsNodePool.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_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + if (autoscalingBuilder_ == null) { + autoscaling_ = null; + } else { + autoscaling_ = null; + autoscalingBuilder_ = null; + } + subnetId_ = ""; + + state_ = 0; + + uid_ = ""; + + reconciling_ = false; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableAnnotations().clear(); + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = null; + } else { + maxPodsConstraint_ = null; + maxPodsConstraintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool build() { + com.google.cloud.gkemulticloud.v1.AwsNodePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsNodePool result = + new com.google.cloud.gkemulticloud.v1.AwsNodePool(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.version_ = version_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + if (autoscalingBuilder_ == null) { + result.autoscaling_ = autoscaling_; + } else { + result.autoscaling_ = autoscalingBuilder_.build(); + } + result.subnetId_ = subnetId_; + result.state_ = state_; + result.uid_ = uid_; + result.reconciling_ = reconciling_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + if (maxPodsConstraintBuilder_ == null) { + result.maxPodsConstraint_ = maxPodsConstraint_; + } else { + result.maxPodsConstraint_ = maxPodsConstraintBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsNodePool) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsNodePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsNodePool other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasAutoscaling()) { + mergeAutoscaling(other.getAutoscaling()); + } + if (!other.getSubnetId().isEmpty()) { + subnetId_ = other.subnetId_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + if (other.hasMaxPodsConstraint()) { + mergeMaxPodsConstraint(other.getMaxPodsConstraint()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsNodePool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsNodePool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+     * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private com.google.cloud.gkemulticloud.v1.AwsNodeConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodeConfig, + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodeConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig(com.google.cloud.gkemulticloud.v1.AwsNodeConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig( + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfig(com.google.cloud.gkemulticloud.v1.AwsNodeConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.newBuilder(config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodeConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Required. The configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodeConfig, + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodeConfig, + com.google.cloud.gkemulticloud.v1.AwsNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder> + autoscalingBuilder_; + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + public boolean hasAutoscaling() { + return autoscalingBuilder_ != null || autoscaling_ != null; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getAutoscaling() { + if (autoscalingBuilder_ == null) { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } else { + return autoscalingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscaling(com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling value) { + if (autoscalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscaling_ = value; + onChanged(); + } else { + autoscalingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscaling( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder builderForValue) { + if (autoscalingBuilder_ == null) { + autoscaling_ = builderForValue.build(); + onChanged(); + } else { + autoscalingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoscaling( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling value) { + if (autoscalingBuilder_ == null) { + if (autoscaling_ != null) { + autoscaling_ = + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.newBuilder(autoscaling_) + .mergeFrom(value) + .buildPartial(); + } else { + autoscaling_ = value; + } + onChanged(); + } else { + autoscalingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoscaling() { + if (autoscalingBuilder_ == null) { + autoscaling_ = null; + onChanged(); + } else { + autoscaling_ = null; + autoscalingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder + getAutoscalingBuilder() { + + onChanged(); + return getAutoscalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder + getAutoscalingOrBuilder() { + if (autoscalingBuilder_ != null) { + return autoscalingBuilder_.getMessageOrBuilder(); + } else { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder> + getAutoscalingFieldBuilder() { + if (autoscalingBuilder_ == null) { + autoscalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder>( + getAutoscaling(), getParentForChildren(), isClean()); + autoscaling_ = null; + } + return autoscalingBuilder_; + } + + private java.lang.Object subnetId_ = ""; + /** + * + * + *
+     * Required. The subnet where the node pool node run.
+     * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The subnet where the node pool node run.
+     * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The subnet where the node pool node run.
+     * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subnet where the node pool node run.
+     * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetId() { + + subnetId_ = getDefaultInstance().getSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subnet where the node pool node run.
+     * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetId_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The lifecycle state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The lifecycle state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The lifecycle state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsNodePool.State result = + com.google.cloud.gkemulticloud.v1.AwsNodePool.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The lifecycle state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gkemulticloud.v1.AwsNodePool.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The lifecycle state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private boolean reconciling_; + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the node
+     * pool.
+     * 
+ * + * bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the node
+     * pool.
+     * 
+ * + * bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the node
+     * pool.
+     * 
+ * + * bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + + reconciling_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 21; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 21; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 21; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 21; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 21; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Key can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.gkemulticloud.v1.MaxPodsConstraint maxPodsConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder> + maxPodsConstraintBuilder_; + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + public boolean hasMaxPodsConstraint() { + return maxPodsConstraintBuilder_ != null || maxPodsConstraint_ != null; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint() { + if (maxPodsConstraintBuilder_ == null) { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } else { + return maxPodsConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaxPodsConstraint(com.google.cloud.gkemulticloud.v1.MaxPodsConstraint value) { + if (maxPodsConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxPodsConstraint_ = value; + onChanged(); + } else { + maxPodsConstraintBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaxPodsConstraint( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder builderForValue) { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = builderForValue.build(); + onChanged(); + } else { + maxPodsConstraintBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMaxPodsConstraint( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint value) { + if (maxPodsConstraintBuilder_ == null) { + if (maxPodsConstraint_ != null) { + maxPodsConstraint_ = + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.newBuilder(maxPodsConstraint_) + .mergeFrom(value) + .buildPartial(); + } else { + maxPodsConstraint_ = value; + } + onChanged(); + } else { + maxPodsConstraintBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMaxPodsConstraint() { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = null; + onChanged(); + } else { + maxPodsConstraint_ = null; + maxPodsConstraintBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder + getMaxPodsConstraintBuilder() { + + onChanged(); + return getMaxPodsConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder + getMaxPodsConstraintOrBuilder() { + if (maxPodsConstraintBuilder_ != null) { + return maxPodsConstraintBuilder_.getMessageOrBuilder(); + } else { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder> + getMaxPodsConstraintFieldBuilder() { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder>( + getMaxPodsConstraint(), getParentForChildren(), isClean()); + maxPodsConstraint_ = null; + } + return maxPodsConstraintBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsNodePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsNodePool) + private static final com.google.cloud.gkemulticloud.v1.AwsNodePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsNodePool(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsNodePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsNodePool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscaling.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscaling.java new file mode 100644 index 0000000..44b134f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscaling.java @@ -0,0 +1,649 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * AwsNodePoolAutoscaling contains information required by cluster autoscaler
+ * to adjust the size of the node pool to the current cluster usage.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} + */ +public final class AwsNodePoolAutoscaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + AwsNodePoolAutoscalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsNodePoolAutoscaling.newBuilder() to construct. + private AwsNodePoolAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsNodePoolAutoscaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsNodePoolAutoscaling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsNodePoolAutoscaling( + 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: + { + minNodeCount_ = input.readInt32(); + break; + } + case 16: + { + maxNodeCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.class, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder.class); + } + + public static final int MIN_NODE_COUNT_FIELD_NUMBER = 1; + private int minNodeCount_; + /** + * + * + *
+   * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+   * 1 and less than or equal to max_node_count.
+   * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + + public static final int MAX_NODE_COUNT_FIELD_NUMBER = 2; + private int maxNodeCount_; + /** + * + * + *
+   * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+   * min_node_count and less than or equal to 50.
+   * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + + 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 (minNodeCount_ != 0) { + output.writeInt32(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + output.writeInt32(2, maxNodeCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxNodeCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling other = + (com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) obj; + + if (getMinNodeCount() != other.getMinNodeCount()) return false; + if (getMaxNodeCount() != other.getMaxNodeCount()) 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) + MIN_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinNodeCount(); + hash = (37 * hash) + MAX_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxNodeCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling 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; + } + /** + * + * + *
+   * AwsNodePoolAutoscaling contains information required by cluster autoscaler
+   * to adjust the size of the node pool to the current cluster usage.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.class, + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.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(); + minNodeCount_ = 0; + + maxNodeCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling build() { + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling result = + new com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(this); + result.minNodeCount_ = minNodeCount_; + result.maxNodeCount_ = maxNodeCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.getDefaultInstance()) + return this; + if (other.getMinNodeCount() != 0) { + setMinNodeCount(other.getMinNodeCount()); + } + if (other.getMaxNodeCount() != 0) { + setMaxNodeCount(other.getMaxNodeCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int minNodeCount_; + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMinNodeCount(int value) { + + minNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinNodeCount() { + + minNodeCount_ = 0; + onChanged(); + return this; + } + + private int maxNodeCount_; + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMaxNodeCount(int value) { + + maxNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxNodeCount() { + + maxNodeCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + private static final com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsNodePoolAutoscaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsNodePoolAutoscaling(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscalingOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscalingOrBuilder.java new file mode 100644 index 0000000..32e1844 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolAutoscalingOrBuilder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsNodePoolAutoscalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+   * 1 and less than or equal to max_node_count.
+   * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + int getMinNodeCount(); + + /** + * + * + *
+   * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+   * min_node_count and less than or equal to 50.
+   * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + int getMaxNodeCount(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolName.java new file mode 100644 index 0000000..0c53fba --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AwsNodePoolName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AWS_CLUSTER_AWS_NODE_POOL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String awsCluster; + private final String awsNodePool; + + @Deprecated + protected AwsNodePoolName() { + project = null; + location = null; + awsCluster = null; + awsNodePool = null; + } + + private AwsNodePoolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + awsCluster = Preconditions.checkNotNull(builder.getAwsCluster()); + awsNodePool = Preconditions.checkNotNull(builder.getAwsNodePool()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAwsCluster() { + return awsCluster; + } + + public String getAwsNodePool() { + return awsNodePool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AwsNodePoolName of( + String project, String location, String awsCluster, String awsNodePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAwsCluster(awsCluster) + .setAwsNodePool(awsNodePool) + .build(); + } + + public static String format( + String project, String location, String awsCluster, String awsNodePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAwsCluster(awsCluster) + .setAwsNodePool(awsNodePool) + .build() + .toString(); + } + + public static AwsNodePoolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AWS_CLUSTER_AWS_NODE_POOL.validatedMatch( + formattedString, "AwsNodePoolName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("aws_cluster"), + matchMap.get("aws_node_pool")); + } + + 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 (AwsNodePoolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AWS_CLUSTER_AWS_NODE_POOL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (awsCluster != null) { + fieldMapBuilder.put("aws_cluster", awsCluster); + } + if (awsNodePool != null) { + fieldMapBuilder.put("aws_node_pool", awsNodePool); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AWS_CLUSTER_AWS_NODE_POOL.instantiate( + "project", + project, + "location", + location, + "aws_cluster", + awsCluster, + "aws_node_pool", + awsNodePool); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AwsNodePoolName that = ((AwsNodePoolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.awsCluster, that.awsCluster) + && Objects.equals(this.awsNodePool, that.awsNodePool); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(awsCluster); + h *= 1000003; + h ^= Objects.hashCode(awsNodePool); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}. + */ + public static class Builder { + private String project; + private String location; + private String awsCluster; + private String awsNodePool; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAwsCluster() { + return awsCluster; + } + + public String getAwsNodePool() { + return awsNodePool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAwsCluster(String awsCluster) { + this.awsCluster = awsCluster; + return this; + } + + public Builder setAwsNodePool(String awsNodePool) { + this.awsNodePool = awsNodePool; + return this; + } + + private Builder(AwsNodePoolName awsNodePoolName) { + this.project = awsNodePoolName.project; + this.location = awsNodePoolName.location; + this.awsCluster = awsNodePoolName.awsCluster; + this.awsNodePool = awsNodePoolName.awsNodePool; + } + + public AwsNodePoolName build() { + return new AwsNodePoolName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolOrBuilder.java new file mode 100644 index 0000000..62443dc --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodePoolOrBuilder.java @@ -0,0 +1,514 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsNodePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsNodePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
+   * 
+ * + * string version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + com.google.cloud.gkemulticloud.v1.AwsNodeConfig getConfig(); + /** + * + * + *
+   * Required. The configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsNodeConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + boolean hasAutoscaling(); + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling getAutoscaling(); + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscalingOrBuilder getAutoscalingOrBuilder(); + + /** + * + * + *
+   * Required. The subnet where the node pool node run.
+   * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + java.lang.String getSubnetId(); + /** + * + * + *
+   * Required. The subnet where the node pool node run.
+   * 
+ * + * string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + com.google.protobuf.ByteString getSubnetIdBytes(); + + /** + * + * + *
+   * Output only. The lifecycle state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The lifecycle state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gkemulticloud.v1.AwsNodePool.State getState(); + + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the node
+   * pool.
+   * 
+ * + * bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 21; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 21; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Key can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + boolean hasMaxPodsConstraint(); + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint(); + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder getMaxPodsConstraintOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfig.java new file mode 100644 index 0000000..fe8e745 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfig.java @@ -0,0 +1,830 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Details of a proxy config stored in AWS Secret Manager.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsProxyConfig} + */ +public final class AwsProxyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsProxyConfig) + AwsProxyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsProxyConfig.newBuilder() to construct. + private AwsProxyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsProxyConfig() { + secretArn_ = ""; + secretVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsProxyConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsProxyConfig( + 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(); + + secretArn_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + secretVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.class, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder.class); + } + + public static final int SECRET_ARN_FIELD_NUMBER = 1; + private volatile java.lang.Object secretArn_; + /** + * + * + *
+   * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+   * configuration.
+   * 
+ * + * string secret_arn = 1; + * + * @return The secretArn. + */ + @java.lang.Override + public java.lang.String getSecretArn() { + java.lang.Object ref = secretArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretArn_ = s; + return s; + } + } + /** + * + * + *
+   * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+   * configuration.
+   * 
+ * + * string secret_arn = 1; + * + * @return The bytes for secretArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretArnBytes() { + java.lang.Object ref = secretArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object secretVersion_; + /** + * + * + *
+   * The version string of the AWS Secret Manager secret that contains the
+   * HTTP(S) proxy configuration.
+   * 
+ * + * string secret_version = 2; + * + * @return The secretVersion. + */ + @java.lang.Override + public java.lang.String getSecretVersion() { + java.lang.Object ref = secretVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The version string of the AWS Secret Manager secret that contains the
+   * HTTP(S) proxy configuration.
+   * 
+ * + * string secret_version = 2; + * + * @return The bytes for secretVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretVersionBytes() { + java.lang.Object ref = secretVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretArn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, secretArn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secretVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretArn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, secretArn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secretVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsProxyConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsProxyConfig other = + (com.google.cloud.gkemulticloud.v1.AwsProxyConfig) obj; + + if (!getSecretArn().equals(other.getSecretArn())) return false; + if (!getSecretVersion().equals(other.getSecretVersion())) 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) + SECRET_ARN_FIELD_NUMBER; + hash = (53 * hash) + getSecretArn().hashCode(); + hash = (37 * hash) + SECRET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSecretVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsProxyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a proxy config stored in AWS Secret Manager.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsProxyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsProxyConfig) + com.google.cloud.gkemulticloud.v1.AwsProxyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.class, + com.google.cloud.gkemulticloud.v1.AwsProxyConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsProxyConfig.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(); + secretArn_ = ""; + + secretVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig build() { + com.google.cloud.gkemulticloud.v1.AwsProxyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsProxyConfig result = + new com.google.cloud.gkemulticloud.v1.AwsProxyConfig(this); + result.secretArn_ = secretArn_; + result.secretVersion_ = secretVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsProxyConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsProxyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsProxyConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsProxyConfig.getDefaultInstance()) + return this; + if (!other.getSecretArn().isEmpty()) { + secretArn_ = other.secretArn_; + onChanged(); + } + if (!other.getSecretVersion().isEmpty()) { + secretVersion_ = other.secretVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsProxyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsProxyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object secretArn_ = ""; + /** + * + * + *
+     * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+     * configuration.
+     * 
+ * + * string secret_arn = 1; + * + * @return The secretArn. + */ + public java.lang.String getSecretArn() { + java.lang.Object ref = secretArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+     * configuration.
+     * 
+ * + * string secret_arn = 1; + * + * @return The bytes for secretArn. + */ + public com.google.protobuf.ByteString getSecretArnBytes() { + java.lang.Object ref = secretArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+     * configuration.
+     * 
+ * + * string secret_arn = 1; + * + * @param value The secretArn to set. + * @return This builder for chaining. + */ + public Builder setSecretArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secretArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+     * configuration.
+     * 
+ * + * string secret_arn = 1; + * + * @return This builder for chaining. + */ + public Builder clearSecretArn() { + + secretArn_ = getDefaultInstance().getSecretArn(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+     * configuration.
+     * 
+ * + * string secret_arn = 1; + * + * @param value The bytes for secretArn to set. + * @return This builder for chaining. + */ + public Builder setSecretArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secretArn_ = value; + onChanged(); + return this; + } + + private java.lang.Object secretVersion_ = ""; + /** + * + * + *
+     * The version string of the AWS Secret Manager secret that contains the
+     * HTTP(S) proxy configuration.
+     * 
+ * + * string secret_version = 2; + * + * @return The secretVersion. + */ + public java.lang.String getSecretVersion() { + java.lang.Object ref = secretVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version string of the AWS Secret Manager secret that contains the
+     * HTTP(S) proxy configuration.
+     * 
+ * + * string secret_version = 2; + * + * @return The bytes for secretVersion. + */ + public com.google.protobuf.ByteString getSecretVersionBytes() { + java.lang.Object ref = secretVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version string of the AWS Secret Manager secret that contains the
+     * HTTP(S) proxy configuration.
+     * 
+ * + * string secret_version = 2; + * + * @param value The secretVersion to set. + * @return This builder for chaining. + */ + public Builder setSecretVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secretVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The version string of the AWS Secret Manager secret that contains the
+     * HTTP(S) proxy configuration.
+     * 
+ * + * string secret_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearSecretVersion() { + + secretVersion_ = getDefaultInstance().getSecretVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version string of the AWS Secret Manager secret that contains the
+     * HTTP(S) proxy configuration.
+     * 
+ * + * string secret_version = 2; + * + * @param value The bytes for secretVersion to set. + * @return This builder for chaining. + */ + public Builder setSecretVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secretVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsProxyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsProxyConfig) + private static final com.google.cloud.gkemulticloud.v1.AwsProxyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsProxyConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsProxyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsProxyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsProxyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsProxyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfigOrBuilder.java new file mode 100644 index 0000000..30d0d04 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsProxyConfigOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsProxyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsProxyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+   * configuration.
+   * 
+ * + * string secret_arn = 1; + * + * @return The secretArn. + */ + java.lang.String getSecretArn(); + /** + * + * + *
+   * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy
+   * configuration.
+   * 
+ * + * string secret_arn = 1; + * + * @return The bytes for secretArn. + */ + com.google.protobuf.ByteString getSecretArnBytes(); + + /** + * + * + *
+   * The version string of the AWS Secret Manager secret that contains the
+   * HTTP(S) proxy configuration.
+   * 
+ * + * string secret_version = 2; + * + * @return The secretVersion. + */ + java.lang.String getSecretVersion(); + /** + * + * + *
+   * The version string of the AWS Secret Manager secret that contains the
+   * HTTP(S) proxy configuration.
+   * 
+ * + * string secret_version = 2; + * + * @return The bytes for secretVersion. + */ + com.google.protobuf.ByteString getSecretVersionBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsResourcesProto.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsResourcesProto.java new file mode 100644 index 0000000..0415142 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsResourcesProto.java @@ -0,0 +1,531 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public final class AwsResourcesProto { + private AwsResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/gkemulticloud/v1/aws_reso" + + "urces.proto\022\035google.cloud.gkemulticloud." + + "v1\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\0324google/cloud/gke" + + "multicloud/v1/common_resources.proto\032\037go" + + "ogle/protobuf/timestamp.proto\"\260\t\n\nAwsClu" + + "ster\022\014\n\004name\030\001 \001(\t\022\030\n\013description\030\002 \001(\tB" + + "\003\340A\001\022L\n\nnetworking\030\003 \001(\01323.google.cloud." + + "gkemulticloud.v1.AwsClusterNetworkingB\003\340" + + "A\002\022\027\n\naws_region\030\004 \001(\tB\003\340A\002\022J\n\rcontrol_p" + + "lane\030\005 \001(\0132..google.cloud.gkemulticloud." + + "v1.AwsControlPlaneB\003\340A\002\022K\n\rauthorization" + + "\030\017 \001(\0132/.google.cloud.gkemulticloud.v1.A" + + "wsAuthorizationB\003\340A\002\022C\n\005state\030\007 \001(\0162/.go" + + "ogle.cloud.gkemulticloud.v1.AwsCluster.S" + + "tateB\003\340A\003\022\025\n\010endpoint\030\010 \001(\tB\003\340A\003\022\020\n\003uid\030" + + "\t \001(\tB\003\340A\003\022\030\n\013reconciling\030\n \001(\010B\003\340A\003\0224\n\013" + + "create_time\030\013 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0224\n\013update_time\030\014 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\022\014\n\004etag\030\r \001(\t\022T" + + "\n\013annotations\030\016 \003(\0132:.google.cloud.gkemu" + + "lticloud.v1.AwsCluster.AnnotationsEntryB" + + "\003\340A\001\022\\\n\030workload_identity_config\030\020 \001(\01325" + + ".google.cloud.gkemulticloud.v1.WorkloadI" + + "dentityConfigB\003\340A\003\022#\n\026cluster_ca_certifi" + + "cate\030\021 \001(\tB\003\340A\003\0228\n\005fleet\030\022 \001(\0132$.google." + + "cloud.gkemulticloud.v1.FleetB\003\340A\001\022I\n\016log" + + "ging_config\030\023 \001(\0132,.google.cloud.gkemult" + + "icloud.v1.LoggingConfigB\003\340A\001\0322\n\020Annotati" + + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"u\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014PROV" + + "ISIONING\020\001\022\013\n\007RUNNING\020\002\022\017\n\013RECONCILING\020\003" + + "\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005\022\014\n\010DEGRADED\020\006:" + + "o\352Al\n\'gkemulticloud.googleapis.com/AwsCl" + + "uster\022Aprojects/{project}/locations/{loc" + + "ation}/awsClusters/{aws_cluster}\"\250\007\n\017Aws" + + "ControlPlane\022\024\n\007version\030\001 \001(\tB\003\340A\002\022\032\n\rin" + + "stance_type\030\002 \001(\tB\003\340A\001\022D\n\nssh_config\030\016 \001" + + "(\0132+.google.cloud.gkemulticloud.v1.AwsSs" + + "hConfigB\003\340A\001\022\027\n\nsubnet_ids\030\004 \003(\tB\003\340A\002\022\037\n" + + "\022security_group_ids\030\005 \003(\tB\003\340A\001\022!\n\024iam_in" + + "stance_profile\030\007 \001(\tB\003\340A\002\022J\n\013root_volume" + + "\030\010 \001(\01320.google.cloud.gkemulticloud.v1.A" + + "wsVolumeTemplateB\003\340A\001\022J\n\013main_volume\030\t \001" + + "(\01320.google.cloud.gkemulticloud.v1.AwsVo" + + "lumeTemplateB\003\340A\001\022V\n\023database_encryption" + + "\030\n \001(\01324.google.cloud.gkemulticloud.v1.A" + + "wsDatabaseEncryptionB\003\340A\002\022K\n\004tags\030\013 \003(\0132" + + "8.google.cloud.gkemulticloud.v1.AwsContr" + + "olPlane.TagsEntryB\003\340A\001\022b\n\033aws_services_a" + + "uthentication\030\014 \001(\01328.google.cloud.gkemu" + + "lticloud.v1.AwsServicesAuthenticationB\003\340" + + "A\002\022H\n\014proxy_config\030\020 \001(\0132-.google.cloud." + + "gkemulticloud.v1.AwsProxyConfigB\003\340A\001\022R\n\021" + + "config_encryption\030\021 \001(\01322.google.cloud.g" + + "kemulticloud.v1.AwsConfigEncryptionB\003\340A\002" + + "\022T\n\022instance_placement\030\022 \001(\01323.google.cl" + + "oud.gkemulticloud.v1.AwsInstancePlacemen" + + "tB\003\340A\001\032+\n\tTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"R\n\031AwsServicesAuthentication" + + "\022\025\n\010role_arn\030\001 \001(\tB\003\340A\002\022\036\n\021role_session_" + + "name\030\002 \001(\tB\003\340A\001\"[\n\020AwsAuthorization\022G\n\013a" + + "dmin_users\030\001 \003(\0132-.google.cloud.gkemulti" + + "cloud.v1.AwsClusterUserB\003\340A\002\"\'\n\016AwsClust" + + "erUser\022\025\n\010username\030\001 \001(\tB\003\340A\002\"1\n\025AwsData" + + "baseEncryption\022\030\n\013kms_key_arn\030\001 \001(\tB\003\340A\002" + + "\"\353\001\n\021AwsVolumeTemplate\022\025\n\010size_gib\030\001 \001(\005" + + "B\003\340A\001\022U\n\013volume_type\030\002 \001(\0162;.google.clou" + + "d.gkemulticloud.v1.AwsVolumeTemplate.Vol" + + "umeTypeB\003\340A\001\022\021\n\004iops\030\003 \001(\005B\003\340A\001\022\030\n\013kms_k" + + "ey_arn\030\004 \001(\tB\003\340A\001\";\n\nVolumeType\022\033\n\027VOLUM" + + "E_TYPE_UNSPECIFIED\020\000\022\007\n\003GP2\020\001\022\007\n\003GP3\020\002\"{" + + "\n\024AwsClusterNetworking\022\023\n\006vpc_id\030\001 \001(\tB\003" + + "\340A\002\022$\n\027pod_address_cidr_blocks\030\002 \003(\tB\003\340A" + + "\002\022(\n\033service_address_cidr_blocks\030\003 \003(\tB\003" + + "\340A\002\"\260\007\n\013AwsNodePool\022\014\n\004name\030\001 \001(\t\022\024\n\007ver" + + "sion\030\003 \001(\tB\003\340A\002\022A\n\006config\030\034 \001(\0132,.google" + + ".cloud.gkemulticloud.v1.AwsNodeConfigB\003\340" + + "A\002\022O\n\013autoscaling\030\031 \001(\01325.google.cloud.g" + + "kemulticloud.v1.AwsNodePoolAutoscalingB\003" + + "\340A\002\022\026\n\tsubnet_id\030\006 \001(\tB\003\340A\002\022D\n\005state\030\020 \001" + + "(\01620.google.cloud.gkemulticloud.v1.AwsNo" + + "dePool.StateB\003\340A\003\022\020\n\003uid\030\021 \001(\tB\003\340A\003\022\030\n\013r" + + "econciling\030\022 \001(\010B\003\340A\003\0224\n\013create_time\030\023 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013u" + + "pdate_time\030\024 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022\014\n\004etag\030\025 \001(\t\022U\n\013annotations\030\026" + + " \003(\0132;.google.cloud.gkemulticloud.v1.Aws" + + "NodePool.AnnotationsEntryB\003\340A\001\022R\n\023max_po" + + "ds_constraint\030\033 \001(\01320.google.cloud.gkemu" + + "lticloud.v1.MaxPodsConstraintB\003\340A\002\0322\n\020An" + + "notationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"u\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020" + + "\n\014PROVISIONING\020\001\022\013\n\007RUNNING\020\002\022\017\n\013RECONCI" + + "LING\020\003\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005\022\014\n\010DEGRA" + + "DED\020\006:\216\001\352A\212\001\n(gkemulticloud.googleapis.c" + + "om/AwsNodePool\022^projects/{project}/locat" + + "ions/{location}/awsClusters/{aws_cluster" + + "}/awsNodePools/{aws_node_pool}\"\303\006\n\rAwsNo" + + "deConfig\022\032\n\rinstance_type\030\001 \001(\tB\003\340A\001\022J\n\013" + + "root_volume\030\002 \001(\01320.google.cloud.gkemult" + + "icloud.v1.AwsVolumeTemplateB\003\340A\001\022=\n\006tain" + + "ts\030\003 \003(\0132(.google.cloud.gkemulticloud.v1" + + ".NodeTaintB\003\340A\001\022M\n\006labels\030\004 \003(\01328.google" + + ".cloud.gkemulticloud.v1.AwsNodeConfig.La" + + "belsEntryB\003\340A\001\022I\n\004tags\030\005 \003(\01326.google.cl" + + "oud.gkemulticloud.v1.AwsNodeConfig.TagsE" + + "ntryB\003\340A\001\022!\n\024iam_instance_profile\030\006 \001(\tB" + + "\003\340A\002\022\027\n\nimage_type\030\013 \001(\tB\003\340A\001\022D\n\nssh_con" + + "fig\030\t \001(\0132+.google.cloud.gkemulticloud.v" + + "1.AwsSshConfigB\003\340A\001\022\037\n\022security_group_id" + + "s\030\n \003(\tB\003\340A\001\022H\n\014proxy_config\030\014 \001(\0132-.goo" + + "gle.cloud.gkemulticloud.v1.AwsProxyConfi" + + "gB\003\340A\001\022R\n\021config_encryption\030\r \001(\01322.goog" + + "le.cloud.gkemulticloud.v1.AwsConfigEncry" + + "ptionB\003\340A\002\022T\n\022instance_placement\030\016 \001(\01323" + + ".google.cloud.gkemulticloud.v1.AwsInstan" + + "cePlacementB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032+\n\tTagsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"R\n\026AwsNodeP" + + "oolAutoscaling\022\033\n\016min_node_count\030\001 \001(\005B\003" + + "\340A\002\022\033\n\016max_node_count\030\002 \001(\005B\003\340A\002\"\364\001\n\017Aws" + + "ServerConfig\022\014\n\004name\030\001 \001(\t\022H\n\016valid_vers" + + "ions\030\002 \003(\01320.google.cloud.gkemulticloud." + + "v1.AwsK8sVersionInfo\022\035\n\025supported_aws_re" + + "gions\030\003 \003(\t:j\352Ag\n,gkemulticloud.googleap" + + "is.com/AwsServerConfig\0227projects/{projec" + + "t}/locations/{location}/awsServerConfig\"" + + "$\n\021AwsK8sVersionInfo\022\017\n\007version\030\001 \001(\t\")\n" + + "\014AwsSshConfig\022\031\n\014ec2_key_pair\030\001 \001(\tB\003\340A\002" + + "\"<\n\016AwsProxyConfig\022\022\n\nsecret_arn\030\001 \001(\t\022\026" + + "\n\016secret_version\030\002 \001(\t\"/\n\023AwsConfigEncry" + + "ption\022\030\n\013kms_key_arn\030\001 \001(\tB\003\340A\002\"\263\001\n\024AwsI" + + "nstancePlacement\022Q\n\007tenancy\030\001 \001(\0162;.goog" + + "le.cloud.gkemulticloud.v1.AwsInstancePla" + + "cement.TenancyB\003\340A\002\"H\n\007Tenancy\022\027\n\023TENANC" + + "Y_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\r\n\tDEDICATE" + + "D\020\002\022\010\n\004HOST\020\003B\347\001\n!com.google.cloud.gkemu" + + "lticloud.v1B\021AwsResourcesProtoP\001ZJgoogle" + + ".golang.org/genproto/googleapis/cloud/gk" + + "emulticloud/v1;gkemulticloud\252\002\035Google.Cl" + + "oud.GkeMultiCloud.V1\312\002\035Google\\Cloud\\GkeM" + + "ultiCloud\\V1\352\002 Google::Cloud::GkeMultiCl" + + "oud::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.gkemulticloud.v1.CommonResourcesProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor, + new java.lang.String[] { + "Name", + "Description", + "Networking", + "AwsRegion", + "ControlPlane", + "Authorization", + "State", + "Endpoint", + "Uid", + "Reconciling", + "CreateTime", + "UpdateTime", + "Etag", + "Annotations", + "WorkloadIdentityConfig", + "ClusterCaCertificate", + "Fleet", + "LoggingConfig", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsCluster_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor, + new java.lang.String[] { + "Version", + "InstanceType", + "SshConfig", + "SubnetIds", + "SecurityGroupIds", + "IamInstanceProfile", + "RootVolume", + "MainVolume", + "DatabaseEncryption", + "Tags", + "AwsServicesAuthentication", + "ProxyConfig", + "ConfigEncryption", + "InstancePlacement", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsControlPlane_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor, + new java.lang.String[] { + "RoleArn", "RoleSessionName", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsAuthorization_descriptor, + new java.lang.String[] { + "AdminUsers", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsClusterUser_descriptor, + new java.lang.String[] { + "Username", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsDatabaseEncryption_descriptor, + new java.lang.String[] { + "KmsKeyArn", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor, + new java.lang.String[] { + "SizeGib", "VolumeType", "Iops", "KmsKeyArn", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsClusterNetworking_descriptor, + new java.lang.String[] { + "VpcId", "PodAddressCidrBlocks", "ServiceAddressCidrBlocks", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor, + new java.lang.String[] { + "Name", + "Version", + "Config", + "Autoscaling", + "SubnetId", + "State", + "Uid", + "Reconciling", + "CreateTime", + "UpdateTime", + "Etag", + "Annotations", + "MaxPodsConstraint", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodePool_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor, + new java.lang.String[] { + "InstanceType", + "RootVolume", + "Taints", + "Labels", + "Tags", + "IamInstanceProfile", + "ImageType", + "SshConfig", + "SecurityGroupIds", + "ProxyConfig", + "ConfigEncryption", + "InstancePlacement", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodeConfig_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsNodePoolAutoscaling_descriptor, + new java.lang.String[] { + "MinNodeCount", "MaxNodeCount", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor, + new java.lang.String[] { + "Name", "ValidVersions", "SupportedAwsRegions", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsK8sVersionInfo_descriptor, + new java.lang.String[] { + "Version", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor, + new java.lang.String[] { + "Ec2KeyPair", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsProxyConfig_descriptor, + new java.lang.String[] { + "SecretArn", "SecretVersion", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsConfigEncryption_descriptor, + new java.lang.String[] { + "KmsKeyArn", + }); + internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AwsInstancePlacement_descriptor, + new java.lang.String[] { + "Tenancy", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.gkemulticloud.v1.CommonResourcesProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfig.java new file mode 100644 index 0000000..ac826e4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfig.java @@ -0,0 +1,1423 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * AwsServerConfig is the configuration of GKE cluster on AWS.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsServerConfig} + */ +public final class AwsServerConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsServerConfig) + AwsServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsServerConfig.newBuilder() to construct. + private AwsServerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsServerConfig() { + name_ = ""; + validVersions_ = java.util.Collections.emptyList(); + supportedAwsRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsServerConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsServerConfig( + 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)) { + validVersions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + validVersions_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.parser(), + extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + supportedAwsRegions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + supportedAwsRegions_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + validVersions_ = java.util.Collections.unmodifiableList(validVersions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + supportedAwsRegions_ = supportedAwsRegions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsServerConfig.class, + com.google.cloud.gkemulticloud.v1.AwsServerConfig.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the config.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the config.
+   * 
+ * + * 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 VALID_VERSIONS_FIELD_NUMBER = 2; + private java.util.List validVersions_; + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public java.util.List + getValidVersionsList() { + return validVersions_; + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public java.util.List + getValidVersionsOrBuilderList() { + return validVersions_; + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public int getValidVersionsCount() { + return validVersions_.size(); + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getValidVersions(int index) { + return validVersions_.get(index); + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder getValidVersionsOrBuilder( + int index) { + return validVersions_.get(index); + } + + public static final int SUPPORTED_AWS_REGIONS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList supportedAwsRegions_; + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return A list containing the supportedAwsRegions. + */ + public com.google.protobuf.ProtocolStringList getSupportedAwsRegionsList() { + return supportedAwsRegions_; + } + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return The count of supportedAwsRegions. + */ + public int getSupportedAwsRegionsCount() { + return supportedAwsRegions_.size(); + } + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAwsRegions at the given index. + */ + public java.lang.String getSupportedAwsRegions(int index) { + return supportedAwsRegions_.get(index); + } + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAwsRegions at the given index. + */ + public com.google.protobuf.ByteString getSupportedAwsRegionsBytes(int index) { + return supportedAwsRegions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < validVersions_.size(); i++) { + output.writeMessage(2, validVersions_.get(i)); + } + for (int i = 0; i < supportedAwsRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, supportedAwsRegions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < validVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, validVersions_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < supportedAwsRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedAwsRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedAwsRegionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsServerConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsServerConfig other = + (com.google.cloud.gkemulticloud.v1.AwsServerConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValidVersionsList().equals(other.getValidVersionsList())) return false; + if (!getSupportedAwsRegionsList().equals(other.getSupportedAwsRegionsList())) 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 (getValidVersionsCount() > 0) { + hash = (37 * hash) + VALID_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getValidVersionsList().hashCode(); + } + if (getSupportedAwsRegionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_AWS_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedAwsRegionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsServerConfig 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; + } + /** + * + * + *
+   * AwsServerConfig is the configuration of GKE cluster on AWS.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsServerConfig) + com.google.cloud.gkemulticloud.v1.AwsServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsServerConfig.class, + com.google.cloud.gkemulticloud.v1.AwsServerConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsServerConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValidVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (validVersionsBuilder_ == null) { + validVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + validVersionsBuilder_.clear(); + } + supportedAwsRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServerConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsServerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServerConfig build() { + com.google.cloud.gkemulticloud.v1.AwsServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServerConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsServerConfig result = + new com.google.cloud.gkemulticloud.v1.AwsServerConfig(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (validVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validVersions_ = java.util.Collections.unmodifiableList(validVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validVersions_ = validVersions_; + } else { + result.validVersions_ = validVersionsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + supportedAwsRegions_ = supportedAwsRegions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.supportedAwsRegions_ = supportedAwsRegions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsServerConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsServerConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsServerConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (validVersionsBuilder_ == null) { + if (!other.validVersions_.isEmpty()) { + if (validVersions_.isEmpty()) { + validVersions_ = other.validVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidVersionsIsMutable(); + validVersions_.addAll(other.validVersions_); + } + onChanged(); + } + } else { + if (!other.validVersions_.isEmpty()) { + if (validVersionsBuilder_.isEmpty()) { + validVersionsBuilder_.dispose(); + validVersionsBuilder_ = null; + validVersions_ = other.validVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + validVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValidVersionsFieldBuilder() + : null; + } else { + validVersionsBuilder_.addAllMessages(other.validVersions_); + } + } + } + if (!other.supportedAwsRegions_.isEmpty()) { + if (supportedAwsRegions_.isEmpty()) { + supportedAwsRegions_ = other.supportedAwsRegions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSupportedAwsRegionsIsMutable(); + supportedAwsRegions_.addAll(other.supportedAwsRegions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsServerConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsServerConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the config.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the config.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the config.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The resource name of the config.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the config.
+     * 
+ * + * 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 validVersions_ = + java.util.Collections.emptyList(); + + private void ensureValidVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validVersions_ = + new java.util.ArrayList( + validVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder> + validVersionsBuilder_; + + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsList() { + if (validVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(validVersions_); + } else { + return validVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public int getValidVersionsCount() { + if (validVersionsBuilder_ == null) { + return validVersions_.size(); + } else { + return validVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getValidVersions(int index) { + if (validVersionsBuilder_ == null) { + return validVersions_.get(index); + } else { + return validVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder setValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.set(index, value); + onChanged(); + } else { + validVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder setValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions(com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.add(value); + onChanged(); + } else { + validVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.add(index, value); + onChanged(); + } else { + validVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.add(builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder addAllValidVersions( + java.lang.Iterable values) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, validVersions_); + onChanged(); + } else { + validVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder clearValidVersions() { + if (validVersionsBuilder_ == null) { + validVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public Builder removeValidVersions(int index) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.remove(index); + onChanged(); + } else { + validVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder getValidVersionsBuilder( + int index) { + return getValidVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder getValidVersionsOrBuilder( + int index) { + if (validVersionsBuilder_ == null) { + return validVersions_.get(index); + } else { + return validVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsOrBuilderList() { + if (validVersionsBuilder_ != null) { + return validVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validVersions_); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder addValidVersionsBuilder() { + return getValidVersionsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder addValidVersionsBuilder( + int index) { + return getValidVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsBuilderList() { + return getValidVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder> + getValidVersionsFieldBuilder() { + if (validVersionsBuilder_ == null) { + validVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder>( + validVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validVersions_ = null; + } + return validVersionsBuilder_; + } + + private com.google.protobuf.LazyStringList supportedAwsRegions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedAwsRegionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + supportedAwsRegions_ = new com.google.protobuf.LazyStringArrayList(supportedAwsRegions_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return A list containing the supportedAwsRegions. + */ + public com.google.protobuf.ProtocolStringList getSupportedAwsRegionsList() { + return supportedAwsRegions_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return The count of supportedAwsRegions. + */ + public int getSupportedAwsRegionsCount() { + return supportedAwsRegions_.size(); + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAwsRegions at the given index. + */ + public java.lang.String getSupportedAwsRegions(int index) { + return supportedAwsRegions_.get(index); + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAwsRegions at the given index. + */ + public com.google.protobuf.ByteString getSupportedAwsRegionsBytes(int index) { + return supportedAwsRegions_.getByteString(index); + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index to set the value at. + * @param value The supportedAwsRegions to set. + * @return This builder for chaining. + */ + public Builder setSupportedAwsRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAwsRegionsIsMutable(); + supportedAwsRegions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param value The supportedAwsRegions to add. + * @return This builder for chaining. + */ + public Builder addSupportedAwsRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAwsRegionsIsMutable(); + supportedAwsRegions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param values The supportedAwsRegions to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedAwsRegions(java.lang.Iterable values) { + ensureSupportedAwsRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedAwsRegions_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportedAwsRegions() { + supportedAwsRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported AWS regions.
+     * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param value The bytes of the supportedAwsRegions to add. + * @return This builder for chaining. + */ + public Builder addSupportedAwsRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedAwsRegionsIsMutable(); + supportedAwsRegions_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsServerConfig) + private static final com.google.cloud.gkemulticloud.v1.AwsServerConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsServerConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsServerConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigName.java new file mode 100644 index 0000000..642c4ca --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigName.java @@ -0,0 +1,193 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AwsServerConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/awsServerConfig"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected AwsServerConfigName() { + project = null; + location = null; + } + + private AwsServerConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AwsServerConfigName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static AwsServerConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "AwsServerConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AwsServerConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AwsServerConfigName that = ((AwsServerConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}/awsServerConfig. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(AwsServerConfigName awsServerConfigName) { + this.project = awsServerConfigName.project; + this.location = awsServerConfigName.location; + } + + public AwsServerConfigName build() { + return new AwsServerConfigName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigOrBuilder.java new file mode 100644 index 0000000..8d6d04e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServerConfigOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the config.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the config.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + java.util.List getValidVersionsList(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo getValidVersions(int index); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + int getValidVersionsCount(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + java.util.List + getValidVersionsOrBuilderList(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; + */ + com.google.cloud.gkemulticloud.v1.AwsK8sVersionInfoOrBuilder getValidVersionsOrBuilder(int index); + + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return A list containing the supportedAwsRegions. + */ + java.util.List getSupportedAwsRegionsList(); + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @return The count of supportedAwsRegions. + */ + int getSupportedAwsRegionsCount(); + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAwsRegions at the given index. + */ + java.lang.String getSupportedAwsRegions(int index); + /** + * + * + *
+   * The list of supported AWS regions.
+   * 
+ * + * repeated string supported_aws_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAwsRegions at the given index. + */ + com.google.protobuf.ByteString getSupportedAwsRegionsBytes(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServiceProto.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServiceProto.java new file mode 100644 index 0000000..41e5639 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServiceProto.java @@ -0,0 +1,393 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public final class AwsServiceProto { + private AwsServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/gkemulticloud/v1/aws_serv" + + "ice.proto\022\035google.cloud.gkemulticloud.v1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\0321goo" + + "gle/cloud/gkemulticloud/v1/aws_resources" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032 google/protobuf/field_mask.proto\032\037g" + + "oogle/protobuf/timestamp.proto\"\323\001\n\027Creat" + + "eAwsClusterRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372" + + "A)\022\'gkemulticloud.googleapis.com/AwsClus" + + "ter\022C\n\013aws_cluster\030\002 \001(\0132).google.cloud." + + "gkemulticloud.v1.AwsClusterB\003\340A\002\022\033\n\016aws_" + + "cluster_id\030\003 \001(\tB\003\340A\002\022\025\n\rvalidate_only\030\004" + + " \001(\010\"\253\001\n\027UpdateAwsClusterRequest\022C\n\013aws_" + + "cluster\030\001 \001(\0132).google.cloud.gkemulticlo" + + "ud.v1.AwsClusterB\003\340A\002\022\025\n\rvalidate_only\030\002" + + " \001(\010\0224\n\013update_mask\030\004 \001(\0132\032.google.proto" + + "buf.FieldMaskB\003\340A\002\"U\n\024GetAwsClusterReque" + + "st\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'gkemulticloud." + + "googleapis.com/AwsCluster\"\200\001\n\026ListAwsClu" + + "stersRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'gk" + + "emulticloud.googleapis.com/AwsCluster\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027" + + "ListAwsClustersResponse\022?\n\014aws_clusters\030" + + "\001 \003(\0132).google.cloud.gkemulticloud.v1.Aw" + + "sCluster\022\027\n\017next_page_token\030\002 \001(\t\"\224\001\n\027De" + + "leteAwsClusterRequest\022=\n\004name\030\001 \001(\tB/\340A\002" + + "\372A)\n\'gkemulticloud.googleapis.com/AwsClu" + + "ster\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n\rallow_mis" + + "sing\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"\332\001\n\030CreateAwsNo" + + "dePoolRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(g" + + "kemulticloud.googleapis.com/AwsNodePool\022" + + "F\n\raws_node_pool\030\002 \001(\0132*.google.cloud.gk" + + "emulticloud.v1.AwsNodePoolB\003\340A\002\022\035\n\020aws_n" + + "ode_pool_id\030\003 \001(\tB\003\340A\002\022\025\n\rvalidate_only\030" + + "\004 \001(\010\"\257\001\n\030UpdateAwsNodePoolRequest\022F\n\raw" + + "s_node_pool\030\001 \001(\0132*.google.cloud.gkemult" + + "icloud.v1.AwsNodePoolB\003\340A\002\022\025\n\rvalidate_o" + + "nly\030\002 \001(\010\0224\n\013update_mask\030\003 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\002\"W\n\025GetAwsNodePoo" + + "lRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(gkemulti" + + "cloud.googleapis.com/AwsNodePool\"\202\001\n\027Lis" + + "tAwsNodePoolsRequest\022@\n\006parent\030\001 \001(\tB0\340A" + + "\002\372A*\022(gkemulticloud.googleapis.com/AwsNo" + + "dePool\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"w\n\030ListAwsNodePoolsResponse\022B\n\016aws" + + "_node_pools\030\001 \003(\0132*.google.cloud.gkemult" + + "icloud.v1.AwsNodePool\022\027\n\017next_page_token" + + "\030\002 \001(\t\"\226\001\n\030DeleteAwsNodePoolRequest\022>\n\004n" + + "ame\030\001 \001(\tB0\340A\002\372A*\n(gkemulticloud.googlea" + + "pis.com/AwsNodePool\022\025\n\rvalidate_only\030\002 \001" + + "(\010\022\025\n\rallow_missing\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"" + + "_\n\031GetAwsServerConfigRequest\022B\n\004name\030\001 \001" + + "(\tB4\340A\002\372A.\n,gkemulticloud.googleapis.com" + + "/AwsServerConfig\"e\n\035GenerateAwsAccessTok" + + "enRequest\022D\n\013aws_cluster\030\001 \001(\tB/\340A\002\372A)\n\'" + + "gkemulticloud.googleapis.com/AwsCluster\"" + + "u\n\036GenerateAwsAccessTokenResponse\022\031\n\014acc" + + "ess_token\030\001 \001(\tB\003\340A\003\0228\n\017expiration_time\030" + + "\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\0032\376" + + "\025\n\013AwsClusters\022\366\001\n\020CreateAwsCluster\0226.go" + + "ogle.cloud.gkemulticloud.v1.CreateAwsClu" + + "sterRequest\032\035.google.longrunning.Operati" + + "on\"\212\001\202\323\344\223\002>\"//v1/{parent=projects/*/loca" + + "tions/*}/awsClusters:\013aws_cluster\332A!pare" + + "nt,aws_cluster,aws_cluster_id\312A\037\n\nAwsClu" + + "ster\022\021OperationMetadata\022\370\001\n\020UpdateAwsClu" + + "ster\0226.google.cloud.gkemulticloud.v1.Upd" + + "ateAwsClusterRequest\032\035.google.longrunnin" + + "g.Operation\"\214\001\202\323\344\223\002J2;/v1/{aws_cluster.n" + + "ame=projects/*/locations/*/awsClusters/*" + + "}:\013aws_cluster\332A\027aws_cluster,update_mask" + + "\312A\037\n\nAwsCluster\022\021OperationMetadata\022\257\001\n\rG" + + "etAwsCluster\0223.google.cloud.gkemulticlou" + + "d.v1.GetAwsClusterRequest\032).google.cloud" + + ".gkemulticloud.v1.AwsCluster\">\202\323\344\223\0021\022//v" + + "1/{name=projects/*/locations/*/awsCluste" + + "rs/*}\332A\004name\022\302\001\n\017ListAwsClusters\0225.googl" + + "e.cloud.gkemulticloud.v1.ListAwsClusters" + + "Request\0326.google.cloud.gkemulticloud.v1." + + "ListAwsClustersResponse\"@\202\323\344\223\0021\022//v1/{pa" + + "rent=projects/*/locations/*}/awsClusters" + + "\332A\006parent\022\326\001\n\020DeleteAwsCluster\0226.google." + + "cloud.gkemulticloud.v1.DeleteAwsClusterR" + + "equest\032\035.google.longrunning.Operation\"k\202" + + "\323\344\223\0021*//v1/{name=projects/*/locations/*/" + + "awsClusters/*}\332A\004name\312A*\n\025google.protobu" + + "f.Empty\022\021OperationMetadata\022\354\001\n\026GenerateA" + + "wsAccessToken\022<.google.cloud.gkemulticlo" + + "ud.v1.GenerateAwsAccessTokenRequest\032=.go" + + "ogle.cloud.gkemulticloud.v1.GenerateAwsA" + + "ccessTokenResponse\"U\202\323\344\223\002O\022M/v1/{aws_clu" + + "ster=projects/*/locations/*/awsClusters/" + + "*}:generateAwsAccessToken\022\216\002\n\021CreateAwsN" + + "odePool\0227.google.cloud.gkemulticloud.v1." + + "CreateAwsNodePoolRequest\032\035.google.longru" + + "nning.Operation\"\240\001\202\323\344\223\002O\">/v1/{parent=pr" + + "ojects/*/locations/*/awsClusters/*}/awsN" + + "odePools:\raws_node_pool\332A%parent,aws_nod" + + "e_pool,aws_node_pool_id\312A \n\013AwsNodePool\022" + + "\021OperationMetadata\022\220\002\n\021UpdateAwsNodePool" + + "\0227.google.cloud.gkemulticloud.v1.UpdateA" + + "wsNodePoolRequest\032\035.google.longrunning.O" + + "peration\"\242\001\202\323\344\223\002]2L/v1/{aws_node_pool.na" + + "me=projects/*/locations/*/awsClusters/*/" + + "awsNodePools/*}:\raws_node_pool\332A\031aws_nod" + + "e_pool,update_mask\312A \n\013AwsNodePool\022\021Oper" + + "ationMetadata\022\301\001\n\016GetAwsNodePool\0224.googl" + + "e.cloud.gkemulticloud.v1.GetAwsNodePoolR" + + "equest\032*.google.cloud.gkemulticloud.v1.A" + + "wsNodePool\"M\202\323\344\223\002@\022>/v1/{name=projects/*" + + "/locations/*/awsClusters/*/awsNodePools/" + + "*}\332A\004name\022\324\001\n\020ListAwsNodePools\0226.google." + + "cloud.gkemulticloud.v1.ListAwsNodePoolsR" + + "equest\0327.google.cloud.gkemulticloud.v1.L" + + "istAwsNodePoolsResponse\"O\202\323\344\223\002@\022>/v1/{pa" + + "rent=projects/*/locations/*/awsClusters/" + + "*}/awsNodePools\332A\006parent\022\347\001\n\021DeleteAwsNo" + + "dePool\0227.google.cloud.gkemulticloud.v1.D" + + "eleteAwsNodePoolRequest\032\035.google.longrun" + + "ning.Operation\"z\202\323\344\223\002@*>/v1/{name=projec" + + "ts/*/locations/*/awsClusters/*/awsNodePo" + + "ols/*}\332A\004name\312A*\n\025google.protobuf.Empty\022" + + "\021OperationMetadata\022\300\001\n\022GetAwsServerConfi" + + "g\0228.google.cloud.gkemulticloud.v1.GetAws" + + "ServerConfigRequest\032..google.cloud.gkemu" + + "lticloud.v1.AwsServerConfig\"@\202\323\344\223\0023\0221/v1" + + "/{name=projects/*/locations/*/awsServerC" + + "onfig}\332A\004name\032P\312A\034gkemulticloud.googleap" + + "is.com\322A.https://www.googleapis.com/auth" + + "/cloud-platformB\345\001\n!com.google.cloud.gke" + + "multicloud.v1B\017AwsServiceProtoP\001ZJgoogle" + + ".golang.org/genproto/googleapis/cloud/gk" + + "emulticloud/v1;gkemulticloud\252\002\035Google.Cl" + + "oud.GkeMultiCloud.V1\312\002\035Google\\Cloud\\GkeM" + + "ultiCloud\\V1\352\002 Google::Cloud::GkeMultiCl" + + "oud::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.gkemulticloud.v1.AwsResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor, + new java.lang.String[] { + "Parent", "AwsCluster", "AwsClusterId", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor, + new java.lang.String[] { + "AwsCluster", "ValidateOnly", "UpdateMask", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor, + new java.lang.String[] { + "AwsClusters", "NextPageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor, + new java.lang.String[] { + "Name", "ValidateOnly", "AllowMissing", "Etag", + }); + internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor, + new java.lang.String[] { + "Parent", "AwsNodePool", "AwsNodePoolId", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor, + new java.lang.String[] { + "AwsNodePool", "ValidateOnly", "UpdateMask", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor, + new java.lang.String[] { + "AwsNodePools", "NextPageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor, + new java.lang.String[] { + "Name", "ValidateOnly", "AllowMissing", "Etag", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor, + new java.lang.String[] { + "AwsCluster", + }); + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor, + new java.lang.String[] { + "AccessToken", "ExpirationTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.gkemulticloud.v1.AwsResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthentication.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthentication.java new file mode 100644 index 0000000..99134ab --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthentication.java @@ -0,0 +1,832 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Authentication configuration for the management of AWS resources.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsServicesAuthentication} + */ +public final class AwsServicesAuthentication extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + AwsServicesAuthenticationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsServicesAuthentication.newBuilder() to construct. + private AwsServicesAuthentication(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsServicesAuthentication() { + roleArn_ = ""; + roleSessionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsServicesAuthentication(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsServicesAuthentication( + 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(); + + roleArn_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + roleSessionName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.class, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder.class); + } + + public static final int ROLE_ARN_FIELD_NUMBER = 1; + private volatile java.lang.Object roleArn_; + /** + * + * + *
+   * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+   * will assume when managing AWS resources on your account.
+   * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The roleArn. + */ + @java.lang.Override + public java.lang.String getRoleArn() { + java.lang.Object ref = roleArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleArn_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+   * will assume when managing AWS resources on your account.
+   * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for roleArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleArnBytes() { + java.lang.Object ref = roleArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLE_SESSION_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object roleSessionName_; + /** + * + * + *
+   * Optional. An identifier for the assumed role session.
+   * When unspecified, it defaults to `multicloud-service-agent`.
+   * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The roleSessionName. + */ + @java.lang.Override + public java.lang.String getRoleSessionName() { + java.lang.Object ref = roleSessionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleSessionName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An identifier for the assumed role session.
+   * When unspecified, it defaults to `multicloud-service-agent`.
+   * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for roleSessionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleSessionNameBytes() { + java.lang.Object ref = roleSessionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleSessionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(roleArn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roleArn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(roleSessionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, roleSessionName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(roleArn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, roleArn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(roleSessionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, roleSessionName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication other = + (com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) obj; + + if (!getRoleArn().equals(other.getRoleArn())) return false; + if (!getRoleSessionName().equals(other.getRoleSessionName())) 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) + ROLE_ARN_FIELD_NUMBER; + hash = (53 * hash) + getRoleArn().hashCode(); + hash = (37 * hash) + ROLE_SESSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRoleSessionName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication 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; + } + /** + * + * + *
+   * Authentication configuration for the management of AWS resources.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsServicesAuthentication} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + com.google.cloud.gkemulticloud.v1.AwsServicesAuthenticationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.class, + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.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(); + roleArn_ = ""; + + roleSessionName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsServicesAuthentication_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication build() { + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication result = + new com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(this); + result.roleArn_ = roleArn_; + result.roleSessionName_ = roleSessionName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.getDefaultInstance()) + return this; + if (!other.getRoleArn().isEmpty()) { + roleArn_ = other.roleArn_; + onChanged(); + } + if (!other.getRoleSessionName().isEmpty()) { + roleSessionName_ = other.roleSessionName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object roleArn_ = ""; + /** + * + * + *
+     * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+     * will assume when managing AWS resources on your account.
+     * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The roleArn. + */ + public java.lang.String getRoleArn() { + java.lang.Object ref = roleArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+     * will assume when managing AWS resources on your account.
+     * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for roleArn. + */ + public com.google.protobuf.ByteString getRoleArnBytes() { + java.lang.Object ref = roleArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+     * will assume when managing AWS resources on your account.
+     * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The roleArn to set. + * @return This builder for chaining. + */ + public Builder setRoleArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + roleArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+     * will assume when managing AWS resources on your account.
+     * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRoleArn() { + + roleArn_ = getDefaultInstance().getRoleArn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+     * will assume when managing AWS resources on your account.
+     * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for roleArn to set. + * @return This builder for chaining. + */ + public Builder setRoleArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + roleArn_ = value; + onChanged(); + return this; + } + + private java.lang.Object roleSessionName_ = ""; + /** + * + * + *
+     * Optional. An identifier for the assumed role session.
+     * When unspecified, it defaults to `multicloud-service-agent`.
+     * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The roleSessionName. + */ + public java.lang.String getRoleSessionName() { + java.lang.Object ref = roleSessionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleSessionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An identifier for the assumed role session.
+     * When unspecified, it defaults to `multicloud-service-agent`.
+     * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for roleSessionName. + */ + public com.google.protobuf.ByteString getRoleSessionNameBytes() { + java.lang.Object ref = roleSessionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleSessionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An identifier for the assumed role session.
+     * When unspecified, it defaults to `multicloud-service-agent`.
+     * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The roleSessionName to set. + * @return This builder for chaining. + */ + public Builder setRoleSessionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + roleSessionName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An identifier for the assumed role session.
+     * When unspecified, it defaults to `multicloud-service-agent`.
+     * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRoleSessionName() { + + roleSessionName_ = getDefaultInstance().getRoleSessionName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An identifier for the assumed role session.
+     * When unspecified, it defaults to `multicloud-service-agent`.
+     * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for roleSessionName to set. + * @return This builder for chaining. + */ + public Builder setRoleSessionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + roleSessionName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + private static final com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsServicesAuthentication parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsServicesAuthentication(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsServicesAuthentication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthenticationOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthenticationOrBuilder.java new file mode 100644 index 0000000..cf9ad1e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsServicesAuthenticationOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsServicesAuthenticationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+   * will assume when managing AWS resources on your account.
+   * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The roleArn. + */ + java.lang.String getRoleArn(); + /** + * + * + *
+   * Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API
+   * will assume when managing AWS resources on your account.
+   * 
+ * + * string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for roleArn. + */ + com.google.protobuf.ByteString getRoleArnBytes(); + + /** + * + * + *
+   * Optional. An identifier for the assumed role session.
+   * When unspecified, it defaults to `multicloud-service-agent`.
+   * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The roleSessionName. + */ + java.lang.String getRoleSessionName(); + /** + * + * + *
+   * Optional. An identifier for the assumed role session.
+   * When unspecified, it defaults to `multicloud-service-agent`.
+   * 
+ * + * string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for roleSessionName. + */ + com.google.protobuf.ByteString getRoleSessionNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfig.java new file mode 100644 index 0000000..719e4ec --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfig.java @@ -0,0 +1,636 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * SSH configuration for AWS resources.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsSshConfig} + */ +public final class AwsSshConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsSshConfig) + AwsSshConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsSshConfig.newBuilder() to construct. + private AwsSshConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsSshConfig() { + ec2KeyPair_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsSshConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsSshConfig( + 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(); + + ec2KeyPair_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.class, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder.class); + } + + public static final int EC2_KEY_PAIR_FIELD_NUMBER = 1; + private volatile java.lang.Object ec2KeyPair_; + /** + * + * + *
+   * Required. The name of the EC2 key pair used to login into cluster machines.
+   * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ec2KeyPair. + */ + @java.lang.Override + public java.lang.String getEc2KeyPair() { + java.lang.Object ref = ec2KeyPair_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ec2KeyPair_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the EC2 key pair used to login into cluster machines.
+   * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ec2KeyPair. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEc2KeyPairBytes() { + java.lang.Object ref = ec2KeyPair_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ec2KeyPair_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ec2KeyPair_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ec2KeyPair_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ec2KeyPair_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ec2KeyPair_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsSshConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsSshConfig other = + (com.google.cloud.gkemulticloud.v1.AwsSshConfig) obj; + + if (!getEc2KeyPair().equals(other.getEc2KeyPair())) 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) + EC2_KEY_PAIR_FIELD_NUMBER; + hash = (53 * hash) + getEc2KeyPair().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsSshConfig 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; + } + /** + * + * + *
+   * SSH configuration for AWS resources.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsSshConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsSshConfig) + com.google.cloud.gkemulticloud.v1.AwsSshConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsSshConfig.class, + com.google.cloud.gkemulticloud.v1.AwsSshConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsSshConfig.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(); + ec2KeyPair_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsSshConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig build() { + com.google.cloud.gkemulticloud.v1.AwsSshConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsSshConfig result = + new com.google.cloud.gkemulticloud.v1.AwsSshConfig(this); + result.ec2KeyPair_ = ec2KeyPair_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsSshConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsSshConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsSshConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsSshConfig.getDefaultInstance()) return this; + if (!other.getEc2KeyPair().isEmpty()) { + ec2KeyPair_ = other.ec2KeyPair_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsSshConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AwsSshConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object ec2KeyPair_ = ""; + /** + * + * + *
+     * Required. The name of the EC2 key pair used to login into cluster machines.
+     * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ec2KeyPair. + */ + public java.lang.String getEc2KeyPair() { + java.lang.Object ref = ec2KeyPair_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ec2KeyPair_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the EC2 key pair used to login into cluster machines.
+     * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ec2KeyPair. + */ + public com.google.protobuf.ByteString getEc2KeyPairBytes() { + java.lang.Object ref = ec2KeyPair_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ec2KeyPair_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the EC2 key pair used to login into cluster machines.
+     * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The ec2KeyPair to set. + * @return This builder for chaining. + */ + public Builder setEc2KeyPair(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ec2KeyPair_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EC2 key pair used to login into cluster machines.
+     * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEc2KeyPair() { + + ec2KeyPair_ = getDefaultInstance().getEc2KeyPair(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the EC2 key pair used to login into cluster machines.
+     * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for ec2KeyPair to set. + * @return This builder for chaining. + */ + public Builder setEc2KeyPairBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ec2KeyPair_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsSshConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsSshConfig) + private static final com.google.cloud.gkemulticloud.v1.AwsSshConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsSshConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsSshConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsSshConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsSshConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsSshConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfigOrBuilder.java new file mode 100644 index 0000000..1732635 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsSshConfigOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsSshConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsSshConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the EC2 key pair used to login into cluster machines.
+   * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ec2KeyPair. + */ + java.lang.String getEc2KeyPair(); + /** + * + * + *
+   * Required. The name of the EC2 key pair used to login into cluster machines.
+   * 
+ * + * string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ec2KeyPair. + */ + com.google.protobuf.ByteString getEc2KeyPairBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplate.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplate.java new file mode 100644 index 0000000..26935f4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplate.java @@ -0,0 +1,1189 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration template for AWS EBS volumes.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsVolumeTemplate} + */ +public final class AwsVolumeTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + AwsVolumeTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsVolumeTemplate.newBuilder() to construct. + private AwsVolumeTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsVolumeTemplate() { + volumeType_ = 0; + kmsKeyArn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsVolumeTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsVolumeTemplate( + 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: + { + sizeGib_ = input.readInt32(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + volumeType_ = rawValue; + break; + } + case 24: + { + iops_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKeyArn_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.class, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder.class); + } + + /** + * + * + *
+   * Types of supported EBS volumes. We currently only support GP2 or GP3
+   * volumes.
+   * See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
+   * for more information.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType} + */ + public enum VolumeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * VOLUME_TYPE_UNSPECIFIED = 0; + */ + VOLUME_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * GP2 (General Purpose SSD volume type).
+     * 
+ * + * GP2 = 1; + */ + GP2(1), + /** + * + * + *
+     * GP3 (General Purpose SSD volume type).
+     * 
+ * + * GP3 = 2; + */ + GP3(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * VOLUME_TYPE_UNSPECIFIED = 0; + */ + public static final int VOLUME_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * GP2 (General Purpose SSD volume type).
+     * 
+ * + * GP2 = 1; + */ + public static final int GP2_VALUE = 1; + /** + * + * + *
+     * GP3 (General Purpose SSD volume type).
+     * 
+ * + * GP3 = 2; + */ + public static final int GP3_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 VolumeType 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 VolumeType forNumber(int value) { + switch (value) { + case 0: + return VOLUME_TYPE_UNSPECIFIED; + case 1: + return GP2; + case 2: + return GP3; + 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 VolumeType findValueByNumber(int number) { + return VolumeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final VolumeType[] VALUES = values(); + + public static VolumeType 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 VolumeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType) + } + + public static final int SIZE_GIB_FIELD_NUMBER = 1; + private int sizeGib_; + /** + * + * + *
+   * Optional. The size of the volume, in GiBs.
+   * When unspecified, a default value is provided. See the specific reference
+   * in the parent resource.
+   * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + @java.lang.Override + public int getSizeGib() { + return sizeGib_; + } + + public static final int VOLUME_TYPE_FIELD_NUMBER = 2; + private int volumeType_; + /** + * + * + *
+   * Optional. Type of the EBS volume.
+   * When unspecified, it defaults to GP2 volume.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for volumeType. + */ + @java.lang.Override + public int getVolumeTypeValue() { + return volumeType_; + } + /** + * + * + *
+   * Optional. Type of the EBS volume.
+   * When unspecified, it defaults to GP2 volume.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The volumeType. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType getVolumeType() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType result = + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.valueOf(volumeType_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.UNRECOGNIZED + : result; + } + + public static final int IOPS_FIELD_NUMBER = 3; + private int iops_; + /** + * + * + *
+   * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume.
+   * 
+ * + * int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iops. + */ + @java.lang.Override + public int getIops() { + return iops_; + } + + public static final int KMS_KEY_ARN_FIELD_NUMBER = 4; + private volatile java.lang.Object kmsKeyArn_; + /** + * + * + *
+   * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+   * encrypt AWS EBS volumes.
+   * If not specified, the default Amazon managed key associated to
+   * the AWS region where this cluster runs will be used.
+   * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyArn. + */ + @java.lang.Override + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+   * encrypt AWS EBS volumes.
+   * If not specified, the default Amazon managed key associated to
+   * the AWS region where this cluster runs will be used.
+   * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = 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 (sizeGib_ != 0) { + output.writeInt32(1, sizeGib_); + } + if (volumeType_ + != com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.VOLUME_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, volumeType_); + } + if (iops_ != 0) { + output.writeInt32(3, iops_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, kmsKeyArn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sizeGib_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sizeGib_); + } + if (volumeType_ + != com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.VOLUME_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, volumeType_); + } + if (iops_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, iops_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyArn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, kmsKeyArn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate other = + (com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) obj; + + if (getSizeGib() != other.getSizeGib()) return false; + if (volumeType_ != other.volumeType_) return false; + if (getIops() != other.getIops()) return false; + if (!getKmsKeyArn().equals(other.getKmsKeyArn())) 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) + SIZE_GIB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGib(); + hash = (37 * hash) + VOLUME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + volumeType_; + hash = (37 * hash) + IOPS_FIELD_NUMBER; + hash = (53 * hash) + getIops(); + hash = (37 * hash) + KMS_KEY_ARN_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyArn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate 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; + } + /** + * + * + *
+   * Configuration template for AWS EBS volumes.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AwsVolumeTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.class, + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.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(); + sizeGib_ = 0; + + volumeType_ = 0; + + iops_ = 0; + + kmsKeyArn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AwsVolumeTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate build() { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate buildPartial() { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate result = + new com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(this); + result.sizeGib_ = sizeGib_; + result.volumeType_ = volumeType_; + result.iops_ = iops_; + result.kmsKeyArn_ = kmsKeyArn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate other) { + if (other == com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.getDefaultInstance()) + return this; + if (other.getSizeGib() != 0) { + setSizeGib(other.getSizeGib()); + } + if (other.volumeType_ != 0) { + setVolumeTypeValue(other.getVolumeTypeValue()); + } + if (other.getIops() != 0) { + setIops(other.getIops()); + } + if (!other.getKmsKeyArn().isEmpty()) { + kmsKeyArn_ = other.kmsKeyArn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sizeGib_; + /** + * + * + *
+     * Optional. The size of the volume, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + @java.lang.Override + public int getSizeGib() { + return sizeGib_; + } + /** + * + * + *
+     * Optional. The size of the volume, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sizeGib to set. + * @return This builder for chaining. + */ + public Builder setSizeGib(int value) { + + sizeGib_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The size of the volume, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSizeGib() { + + sizeGib_ = 0; + onChanged(); + return this; + } + + private int volumeType_ = 0; + /** + * + * + *
+     * Optional. Type of the EBS volume.
+     * When unspecified, it defaults to GP2 volume.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for volumeType. + */ + @java.lang.Override + public int getVolumeTypeValue() { + return volumeType_; + } + /** + * + * + *
+     * Optional. Type of the EBS volume.
+     * When unspecified, it defaults to GP2 volume.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for volumeType to set. + * @return This builder for chaining. + */ + public Builder setVolumeTypeValue(int value) { + + volumeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of the EBS volume.
+     * When unspecified, it defaults to GP2 volume.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The volumeType. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType getVolumeType() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType result = + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.valueOf(volumeType_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Type of the EBS volume.
+     * When unspecified, it defaults to GP2 volume.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The volumeType to set. + * @return This builder for chaining. + */ + public Builder setVolumeType( + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType value) { + if (value == null) { + throw new NullPointerException(); + } + + volumeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of the EBS volume.
+     * When unspecified, it defaults to GP2 volume.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearVolumeType() { + + volumeType_ = 0; + onChanged(); + return this; + } + + private int iops_; + /** + * + * + *
+     * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume.
+     * 
+ * + * int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iops. + */ + @java.lang.Override + public int getIops() { + return iops_; + } + /** + * + * + *
+     * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume.
+     * 
+ * + * int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The iops to set. + * @return This builder for chaining. + */ + public Builder setIops(int value) { + + iops_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume.
+     * 
+ * + * int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIops() { + + iops_ = 0; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyArn_ = ""; + /** + * + * + *
+     * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+     * encrypt AWS EBS volumes.
+     * If not specified, the default Amazon managed key associated to
+     * the AWS region where this cluster runs will be used.
+     * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyArn. + */ + public java.lang.String getKmsKeyArn() { + java.lang.Object ref = kmsKeyArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+     * encrypt AWS EBS volumes.
+     * If not specified, the default Amazon managed key associated to
+     * the AWS region where this cluster runs will be used.
+     * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyArn. + */ + public com.google.protobuf.ByteString getKmsKeyArnBytes() { + java.lang.Object ref = kmsKeyArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+     * encrypt AWS EBS volumes.
+     * If not specified, the default Amazon managed key associated to
+     * the AWS region where this cluster runs will be used.
+     * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+     * encrypt AWS EBS volumes.
+     * If not specified, the default Amazon managed key associated to
+     * the AWS region where this cluster runs will be used.
+     * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyArn() { + + kmsKeyArn_ = getDefaultInstance().getKmsKeyArn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+     * encrypt AWS EBS volumes.
+     * If not specified, the default Amazon managed key associated to
+     * the AWS region where this cluster runs will be used.
+     * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKeyArn to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyArn_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + private static final com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(); + } + + public static com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsVolumeTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsVolumeTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplateOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplateOrBuilder.java new file mode 100644 index 0000000..2802560 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsVolumeTemplateOrBuilder.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/cloud/gkemulticloud/v1/aws_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AwsVolumeTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The size of the volume, in GiBs.
+   * When unspecified, a default value is provided. See the specific reference
+   * in the parent resource.
+   * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + int getSizeGib(); + + /** + * + * + *
+   * Optional. Type of the EBS volume.
+   * When unspecified, it defaults to GP2 volume.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for volumeType. + */ + int getVolumeTypeValue(); + /** + * + * + *
+   * Optional. Type of the EBS volume.
+   * When unspecified, it defaults to GP2 volume.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The volumeType. + */ + com.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType getVolumeType(); + + /** + * + * + *
+   * Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume.
+   * 
+ * + * int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The iops. + */ + int getIops(); + + /** + * + * + *
+   * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+   * encrypt AWS EBS volumes.
+   * If not specified, the default Amazon managed key associated to
+   * the AWS region where this cluster runs will be used.
+   * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyArn. + */ + java.lang.String getKmsKeyArn(); + /** + * + * + *
+   * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to
+   * encrypt AWS EBS volumes.
+   * If not specified, the default Amazon managed key associated to
+   * the AWS region where this cluster runs will be used.
+   * 
+ * + * string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyArn. + */ + com.google.protobuf.ByteString getKmsKeyArnBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorization.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorization.java new file mode 100644 index 0000000..16994a2 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorization.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to the cluster RBAC settings.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureAuthorization} + */ +public final class AzureAuthorization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureAuthorization) + AzureAuthorizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureAuthorization.newBuilder() to construct. + private AzureAuthorization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureAuthorization() { + adminUsers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureAuthorization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureAuthorization( + 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)) { + adminUsers_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + adminUsers_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureClusterUser.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + adminUsers_ = java.util.Collections.unmodifiableList(adminUsers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureAuthorization.class, + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder.class); + } + + public static final int ADMIN_USERS_FIELD_NUMBER = 1; + private java.util.List adminUsers_; + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getAdminUsersList() { + return adminUsers_; + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAdminUsersOrBuilderList() { + return adminUsers_; + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAdminUsersCount() { + return adminUsers_.size(); + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUser getAdminUsers(int index) { + return adminUsers_.get(index); + } + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder getAdminUsersOrBuilder( + int index) { + return adminUsers_.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 < adminUsers_.size(); i++) { + output.writeMessage(1, adminUsers_.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 < adminUsers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, adminUsers_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureAuthorization)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureAuthorization other = + (com.google.cloud.gkemulticloud.v1.AzureAuthorization) obj; + + if (!getAdminUsersList().equals(other.getAdminUsersList())) 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 (getAdminUsersCount() > 0) { + hash = (37 * hash) + ADMIN_USERS_FIELD_NUMBER; + hash = (53 * hash) + getAdminUsersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureAuthorization 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; + } + /** + * + * + *
+   * Configuration related to the cluster RBAC settings.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureAuthorization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureAuthorization) + com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureAuthorization.class, + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureAuthorization.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAdminUsersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (adminUsersBuilder_ == null) { + adminUsers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + adminUsersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorization getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureAuthorization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorization build() { + com.google.cloud.gkemulticloud.v1.AzureAuthorization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorization buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureAuthorization result = + new com.google.cloud.gkemulticloud.v1.AzureAuthorization(this); + int from_bitField0_ = bitField0_; + if (adminUsersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + adminUsers_ = java.util.Collections.unmodifiableList(adminUsers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.adminUsers_ = adminUsers_; + } else { + result.adminUsers_ = adminUsersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureAuthorization) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureAuthorization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureAuthorization other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureAuthorization.getDefaultInstance()) + return this; + if (adminUsersBuilder_ == null) { + if (!other.adminUsers_.isEmpty()) { + if (adminUsers_.isEmpty()) { + adminUsers_ = other.adminUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdminUsersIsMutable(); + adminUsers_.addAll(other.adminUsers_); + } + onChanged(); + } + } else { + if (!other.adminUsers_.isEmpty()) { + if (adminUsersBuilder_.isEmpty()) { + adminUsersBuilder_.dispose(); + adminUsersBuilder_ = null; + adminUsers_ = other.adminUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + adminUsersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdminUsersFieldBuilder() + : null; + } else { + adminUsersBuilder_.addAllMessages(other.adminUsers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureAuthorization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureAuthorization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List adminUsers_ = + java.util.Collections.emptyList(); + + private void ensureAdminUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + adminUsers_ = + new java.util.ArrayList( + adminUsers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterUser, + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder> + adminUsersBuilder_; + + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAdminUsersList() { + if (adminUsersBuilder_ == null) { + return java.util.Collections.unmodifiableList(adminUsers_); + } else { + return adminUsersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAdminUsersCount() { + if (adminUsersBuilder_ == null) { + return adminUsers_.size(); + } else { + return adminUsersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterUser getAdminUsers(int index) { + if (adminUsersBuilder_ == null) { + return adminUsers_.get(index); + } else { + return adminUsersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AzureClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.set(index, value); + onChanged(); + } else { + adminUsersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.set(index, builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers(com.google.cloud.gkemulticloud.v1.AzureClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.add(value); + onChanged(); + } else { + adminUsersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AzureClusterUser value) { + if (adminUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdminUsersIsMutable(); + adminUsers_.add(index, value); + onChanged(); + } else { + adminUsersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.add(builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdminUsers( + int index, com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder builderForValue) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.add(index, builderForValue.build()); + onChanged(); + } else { + adminUsersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAdminUsers( + java.lang.Iterable values) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, adminUsers_); + onChanged(); + } else { + adminUsersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAdminUsers() { + if (adminUsersBuilder_ == null) { + adminUsers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + adminUsersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAdminUsers(int index) { + if (adminUsersBuilder_ == null) { + ensureAdminUsersIsMutable(); + adminUsers_.remove(index); + onChanged(); + } else { + adminUsersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder getAdminUsersBuilder( + int index) { + return getAdminUsersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder getAdminUsersOrBuilder( + int index) { + if (adminUsersBuilder_ == null) { + return adminUsers_.get(index); + } else { + return adminUsersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAdminUsersOrBuilderList() { + if (adminUsersBuilder_ != null) { + return adminUsersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(adminUsers_); + } + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder addAdminUsersBuilder() { + return getAdminUsersFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AzureClusterUser.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder addAdminUsersBuilder( + int index) { + return getAdminUsersFieldBuilder() + .addBuilder( + index, com.google.cloud.gkemulticloud.v1.AzureClusterUser.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Users that can perform operations as a cluster admin. A managed
+     * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+     * to the users. Up to ten admin users can be provided.
+     * For more info on RBAC, see
+     * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAdminUsersBuilderList() { + return getAdminUsersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterUser, + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder> + getAdminUsersFieldBuilder() { + if (adminUsersBuilder_ == null) { + adminUsersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterUser, + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder>( + adminUsers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + adminUsers_ = null; + } + return adminUsersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureAuthorization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureAuthorization) + private static final com.google.cloud.gkemulticloud.v1.AzureAuthorization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureAuthorization(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureAuthorization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureAuthorization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureAuthorization(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorizationOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorizationOrBuilder.java new file mode 100644 index 0000000..1889eaf --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureAuthorizationOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureAuthorizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureAuthorization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getAdminUsersList(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterUser getAdminUsers(int index); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAdminUsersCount(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAdminUsersOrBuilderList(); + /** + * + * + *
+   * Required. Users that can perform operations as a cluster admin. A managed
+   * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole
+   * to the users. Up to ten admin users can be provided.
+   * For more info on RBAC, see
+   * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder getAdminUsersOrBuilder(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClient.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClient.java new file mode 100644 index 0000000..aa9ce6a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClient.java @@ -0,0 +1,2107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * `AzureClient` resources hold client authentication information needed by the
+ * Anthos Multi-Cloud API to manage Azure resources on your Azure subscription.
+ * When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is created, an `AzureClient` resource needs to be
+ * provided and all operations on Azure resources associated to that cluster
+ * will authenticate to Azure services using the given client.
+ * `AzureClient` resources are immutable and cannot be modified upon creation.
+ * Each `AzureClient` resource is bound to a single Azure Active Directory
+ * Application and tenant.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClient} + */ +public final class AzureClient extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureClient) + AzureClientOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureClient.newBuilder() to construct. + private AzureClient(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureClient() { + name_ = ""; + tenantId_ = ""; + applicationId_ = ""; + pemCertificate_ = ""; + uid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureClient(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureClient( + 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(); + + tenantId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + applicationId_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 50: + { + 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 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + pemCertificate_ = s; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClient.class, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this resource.
+   * `AzureClient` resource names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this resource.
+   * `AzureClient` resource names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * 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 TENANT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object tenantId_; + /** + * + * + *
+   * Required. The Azure Active Directory Tenant ID.
+   * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tenantId. + */ + @java.lang.Override + public java.lang.String getTenantId() { + java.lang.Object ref = tenantId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Azure Active Directory Tenant ID.
+   * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tenantId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTenantIdBytes() { + java.lang.Object ref = tenantId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object applicationId_; + /** + * + * + *
+   * Required. The Azure Active Directory Application ID.
+   * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + @java.lang.Override + public java.lang.String getApplicationId() { + java.lang.Object ref = applicationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Azure Active Directory Application ID.
+   * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationIdBytes() { + java.lang.Object ref = applicationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 8; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PEM_CERTIFICATE_FIELD_NUMBER = 7; + private volatile java.lang.Object pemCertificate_; + /** + * + * + *
+   * Output only. The PEM encoded x509 certificate.
+   * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + @java.lang.Override + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PEM encoded x509 certificate.
+   * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 5; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. A globally unique identifier for the client.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A globally unique identifier for the client.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tenantId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tenantId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uid_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pemCertificate_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 8); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tenantId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tenantId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pemCertificate_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, annotations__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureClient)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureClient other = + (com.google.cloud.gkemulticloud.v1.AzureClient) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTenantId().equals(other.getTenantId())) return false; + if (!getApplicationId().equals(other.getApplicationId())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getPemCertificate().equals(other.getPemCertificate())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) 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) + TENANT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTenantId().hashCode(); + hash = (37 * hash) + APPLICATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getApplicationId().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + PEM_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificate().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureClient 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; + } + /** + * + * + *
+   * `AzureClient` resources hold client authentication information needed by the
+   * Anthos Multi-Cloud API to manage Azure resources on your Azure subscription.
+   * When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is created, an `AzureClient` resource needs to be
+   * provided and all operations on Azure resources associated to that cluster
+   * will authenticate to Azure services using the given client.
+   * `AzureClient` resources are immutable and cannot be modified upon creation.
+   * Each `AzureClient` resource is bound to a single Azure Active Directory
+   * Application and tenant.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClient} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureClient) + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClient.class, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureClient.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_ = ""; + + tenantId_ = ""; + + applicationId_ = ""; + + internalGetMutableAnnotations().clear(); + pemCertificate_ = ""; + + uid_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient build() { + com.google.cloud.gkemulticloud.v1.AzureClient result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureClient result = + new com.google.cloud.gkemulticloud.v1.AzureClient(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.tenantId_ = tenantId_; + result.applicationId_ = applicationId_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + result.pemCertificate_ = pemCertificate_; + result.uid_ = uid_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureClient) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureClient) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureClient other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTenantId().isEmpty()) { + tenantId_ = other.tenantId_; + onChanged(); + } + if (!other.getApplicationId().isEmpty()) { + applicationId_ = other.applicationId_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + if (!other.getPemCertificate().isEmpty()) { + pemCertificate_ = other.pemCertificate_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureClient parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AzureClient) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this resource.
+     * `AzureClient` resource names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * `AzureClient` resource names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * `AzureClient` resource names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The name of this resource.
+     * `AzureClient` resource names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this resource.
+     * `AzureClient` resource names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * 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 tenantId_ = ""; + /** + * + * + *
+     * Required. The Azure Active Directory Tenant ID.
+     * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tenantId. + */ + public java.lang.String getTenantId() { + java.lang.Object ref = tenantId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Azure Active Directory Tenant ID.
+     * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tenantId. + */ + public com.google.protobuf.ByteString getTenantIdBytes() { + java.lang.Object ref = tenantId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Azure Active Directory Tenant ID.
+     * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tenantId to set. + * @return This builder for chaining. + */ + public Builder setTenantId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tenantId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Active Directory Tenant ID.
+     * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTenantId() { + + tenantId_ = getDefaultInstance().getTenantId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Active Directory Tenant ID.
+     * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tenantId to set. + * @return This builder for chaining. + */ + public Builder setTenantIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tenantId_ = value; + onChanged(); + return this; + } + + private java.lang.Object applicationId_ = ""; + /** + * + * + *
+     * Required. The Azure Active Directory Application ID.
+     * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + public java.lang.String getApplicationId() { + java.lang.Object ref = applicationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Azure Active Directory Application ID.
+     * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + public com.google.protobuf.ByteString getApplicationIdBytes() { + java.lang.Object ref = applicationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Azure Active Directory Application ID.
+     * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Active Directory Application ID.
+     * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearApplicationId() { + + applicationId_ = getDefaultInstance().getApplicationId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Active Directory Application ID.
+     * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the resource.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object pemCertificate_ = ""; + /** + * + * + *
+     * Output only. The PEM encoded x509 certificate.
+     * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PEM encoded x509 certificate.
+     * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PEM encoded x509 certificate.
+     * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM encoded x509 certificate.
+     * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCertificate() { + + pemCertificate_ = getDefaultInstance().getPemCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM encoded x509 certificate.
+     * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCertificate_ = value; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. A globally unique identifier for the client.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the client.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the client.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the client.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the client.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureClient) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureClient) + private static final com.google.cloud.gkemulticloud.v1.AzureClient DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureClient(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClient getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureClient parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureClient(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientName.java new file mode 100644 index 0000000..cdf1db1 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AzureClientName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AZURE_CLIENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/azureClients/{azure_client}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String azureClient; + + @Deprecated + protected AzureClientName() { + project = null; + location = null; + azureClient = null; + } + + private AzureClientName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + azureClient = Preconditions.checkNotNull(builder.getAzureClient()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureClient() { + return azureClient; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AzureClientName of(String project, String location, String azureClient) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureClient(azureClient) + .build(); + } + + public static String format(String project, String location, String azureClient) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureClient(azureClient) + .build() + .toString(); + } + + public static AzureClientName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AZURE_CLIENT.validatedMatch( + formattedString, "AzureClientName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("azure_client")); + } + + 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 (AzureClientName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AZURE_CLIENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (azureClient != null) { + fieldMapBuilder.put("azure_client", azureClient); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AZURE_CLIENT.instantiate( + "project", project, "location", location, "azure_client", azureClient); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AzureClientName that = ((AzureClientName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.azureClient, that.azureClient); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(azureClient); + return h; + } + + /** Builder for projects/{project}/locations/{location}/azureClients/{azure_client}. */ + public static class Builder { + private String project; + private String location; + private String azureClient; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureClient() { + return azureClient; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAzureClient(String azureClient) { + this.azureClient = azureClient; + return this; + } + + private Builder(AzureClientName azureClientName) { + this.project = azureClientName.project; + this.location = azureClientName.location; + this.azureClient = azureClientName.azureClient; + } + + public AzureClientName build() { + return new AzureClientName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientOrBuilder.java new file mode 100644 index 0000000..6a8ff20 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClientOrBuilder.java @@ -0,0 +1,295 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureClientOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureClient) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this resource.
+   * `AzureClient` resource names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this resource.
+   * `AzureClient` resource names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The Azure Active Directory Tenant ID.
+   * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tenantId. + */ + java.lang.String getTenantId(); + /** + * + * + *
+   * Required. The Azure Active Directory Tenant ID.
+   * 
+ * + * string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tenantId. + */ + com.google.protobuf.ByteString getTenantIdBytes(); + + /** + * + * + *
+   * Required. The Azure Active Directory Application ID.
+   * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + java.lang.String getApplicationId(); + /** + * + * + *
+   * Required. The Azure Active Directory Application ID.
+   * 
+ * + * string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + com.google.protobuf.ByteString getApplicationIdBytes(); + + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Annotations on the resource.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The PEM encoded x509 certificate.
+   * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + java.lang.String getPemCertificate(); + /** + * + * + *
+   * Output only. The PEM encoded x509 certificate.
+   * 
+ * + * string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + com.google.protobuf.ByteString getPemCertificateBytes(); + + /** + * + * + *
+   * Output only. A globally unique identifier for the client.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. A globally unique identifier for the client.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureCluster.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureCluster.java new file mode 100644 index 0000000..7560097 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureCluster.java @@ -0,0 +1,5865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * An Anthos cluster running on Azure.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureCluster} + */ +public final class AzureCluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureCluster) + AzureClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureCluster.newBuilder() to construct. + private AzureCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureCluster() { + name_ = ""; + description_ = ""; + azureRegion_ = ""; + resourceGroupId_ = ""; + azureClient_ = ""; + state_ = 0; + endpoint_ = ""; + uid_ = ""; + etag_ = ""; + clusterCaCertificate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureCluster(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureCluster( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureRegion_ = s; + break; + } + case 34: + { + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder subBuilder = null; + if (networking_ != null) { + subBuilder = networking_.toBuilder(); + } + networking_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networking_); + networking_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder subBuilder = null; + if (controlPlane_ != null) { + subBuilder = controlPlane_.toBuilder(); + } + controlPlane_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureControlPlane.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(controlPlane_); + controlPlane_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder subBuilder = null; + if (authorization_ != null) { + subBuilder = authorization_.toBuilder(); + } + authorization_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureAuthorization.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(authorization_); + authorization_ = subBuilder.buildPartial(); + } + + break; + } + case 56: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + endpoint_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 80: + { + reconciling_ = input.readBool(); + break; + } + case 90: + { + 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 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 114: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureClient_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceGroupId_ = s; + break; + } + case 146: + { + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder subBuilder = null; + if (workloadIdentityConfig_ != null) { + subBuilder = workloadIdentityConfig_.toBuilder(); + } + workloadIdentityConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(workloadIdentityConfig_); + workloadIdentityConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterCaCertificate_ = s; + break; + } + case 162: + { + com.google.cloud.gkemulticloud.v1.Fleet.Builder subBuilder = null; + if (fleet_ != null) { + subBuilder = fleet_.toBuilder(); + } + fleet_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.Fleet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fleet_); + fleet_ = subBuilder.buildPartial(); + } + + break; + } + case 170: + { + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder subBuilder = null; + if (managedResources_ != null) { + subBuilder = managedResources_.toBuilder(); + } + managedResources_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureClusterResources.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(managedResources_); + managedResources_ = subBuilder.buildPartial(); + } + + break; + } + case 186: + { + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder subBuilder = null; + if (loggingConfig_ != null) { + subBuilder = loggingConfig_.toBuilder(); + } + loggingConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.LoggingConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(loggingConfig_); + loggingConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureCluster.class, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder.class); + } + + /** + * + * + *
+   * The lifecycle state of the cluster.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AzureCluster.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The RECONCILING state indicates that some work is actively being done on
+     * the cluster, such as upgrading the control plane replicas.
+     * 
+ * + * RECONCILING = 3; + */ + RECONCILING(3), + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The ERROR state indicates the cluster is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * The DEGRADED state indicates the cluster requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + DEGRADED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The RECONCILING state indicates that some work is actively being done on
+     * the cluster, such as upgrading the control plane replicas.
+     * 
+ * + * RECONCILING = 3; + */ + public static final int RECONCILING_VALUE = 3; + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The ERROR state indicates the cluster is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The DEGRADED state indicates the cluster requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + public static final int DEGRADED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return RUNNING; + case 3: + return RECONCILING; + case 4: + return STOPPING; + case 5: + return ERROR; + case 6: + return DEGRADED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureCluster.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AzureCluster.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_REGION_FIELD_NUMBER = 3; + private volatile java.lang.Object azureRegion_; + /** + * + * + *
+   * Required. The Azure region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby Azure regions.
+   * You can call
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+   * to list all supported Azure regions within a given Google Cloud region.
+   * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureRegion. + */ + @java.lang.Override + public java.lang.String getAzureRegion() { + java.lang.Object ref = azureRegion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureRegion_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Azure region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby Azure regions.
+   * You can call
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+   * to list all supported Azure regions within a given Google Cloud region.
+   * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureRegion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureRegionBytes() { + java.lang.Object ref = azureRegion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_GROUP_ID_FIELD_NUMBER = 17; + private volatile java.lang.Object resourceGroupId_; + /** + * + * + *
+   * Required. The ARM ID of the resource group where the cluster resources are deployed.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+   * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceGroupId. + */ + @java.lang.Override + public java.lang.String getResourceGroupId() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARM ID of the resource group where the cluster resources are deployed.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+   * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceGroupIdBytes() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_CLIENT_FIELD_NUMBER = 16; + private volatile java.lang.Object azureClient_; + /** + * + * + *
+   * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+   * how the Anthos Multi-Cloud API connects to Azure APIs.
+   * The `AzureClient` resource must reside on the same GCP project and region
+   * as the `AzureCluster`.
+   * `AzureClient` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClient. + */ + @java.lang.Override + public java.lang.String getAzureClient() { + java.lang.Object ref = azureClient_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClient_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+   * how the Anthos Multi-Cloud API connects to Azure APIs.
+   * The `AzureClient` resource must reside on the same GCP project and region
+   * as the `AzureCluster`.
+   * `AzureClient` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClient. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureClientBytes() { + java.lang.Object ref = azureClient_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORKING_FIELD_NUMBER = 4; + private com.google.cloud.gkemulticloud.v1.AzureClusterNetworking networking_; + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + @java.lang.Override + public boolean hasNetworking() { + return networking_ != null; + } + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getNetworking() { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.getDefaultInstance() + : networking_; + } + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder + getNetworkingOrBuilder() { + return getNetworking(); + } + + public static final int CONTROL_PLANE_FIELD_NUMBER = 5; + private com.google.cloud.gkemulticloud.v1.AzureControlPlane controlPlane_; + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + @java.lang.Override + public boolean hasControlPlane() { + return controlPlane_ != null; + } + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlane getControlPlane() { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AzureControlPlane.getDefaultInstance() + : controlPlane_; + } + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder getControlPlaneOrBuilder() { + return getControlPlane(); + } + + public static final int AUTHORIZATION_FIELD_NUMBER = 6; + private com.google.cloud.gkemulticloud.v1.AzureAuthorization authorization_; + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + @java.lang.Override + public boolean hasAuthorization() { + return authorization_ != null; + } + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorization getAuthorization() { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AzureAuthorization.getDefaultInstance() + : authorization_; + } + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder getAuthorizationOrBuilder() { + return getAuthorization(); + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_; + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AzureCluster.State result = + com.google.cloud.gkemulticloud.v1.AzureCluster.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.State.UNRECOGNIZED + : result; + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 9; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONCILING_FIELD_NUMBER = 10; + private boolean reconciling_; + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the cluster.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 13; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 14; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int WORKLOAD_IDENTITY_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workloadIdentityConfig_; + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + @java.lang.Override + public boolean hasWorkloadIdentityConfig() { + return workloadIdentityConfig_ != null; + } + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig() { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder() { + return getWorkloadIdentityConfig(); + } + + public static final int CLUSTER_CA_CERTIFICATE_FIELD_NUMBER = 19; + private volatile java.lang.Object clusterCaCertificate_; + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + @java.lang.Override + public java.lang.String getClusterCaCertificate() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterCaCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterCaCertificateBytes() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLEET_FIELD_NUMBER = 20; + private com.google.cloud.gkemulticloud.v1.Fleet fleet_; + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + @java.lang.Override + public boolean hasFleet() { + return fleet_ != null; + } + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet getFleet() { + return fleet_ == null ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() : fleet_; + } + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder() { + return getFleet(); + } + + public static final int MANAGED_RESOURCES_FIELD_NUMBER = 21; + private com.google.cloud.gkemulticloud.v1.AzureClusterResources managedResources_; + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managedResources field is set. + */ + @java.lang.Override + public boolean hasManagedResources() { + return managedResources_ != null; + } + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managedResources. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResources getManagedResources() { + return managedResources_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterResources.getDefaultInstance() + : managedResources_; + } + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder + getManagedResourcesOrBuilder() { + return getManagedResources(); + } + + public static final int LOGGING_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.gkemulticloud.v1.LoggingConfig loggingConfig_; + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + @java.lang.Override + public boolean hasLoggingConfig() { + return loggingConfig_ != null; + } + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig() { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + return getLoggingConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureRegion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, azureRegion_); + } + if (networking_ != null) { + output.writeMessage(4, getNetworking()); + } + if (controlPlane_ != null) { + output.writeMessage(5, getControlPlane()); + } + if (authorization_ != null) { + output.writeMessage(6, getAuthorization()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AzureCluster.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpoint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, uid_); + } + if (reconciling_ != false) { + output.writeBool(10, reconciling_); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 14); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClient_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, azureClient_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, resourceGroupId_); + } + if (workloadIdentityConfig_ != null) { + output.writeMessage(18, getWorkloadIdentityConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, clusterCaCertificate_); + } + if (fleet_ != null) { + output.writeMessage(20, getFleet()); + } + if (managedResources_ != null) { + output.writeMessage(21, getManagedResources()); + } + if (loggingConfig_ != null) { + output.writeMessage(23, getLoggingConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureRegion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, azureRegion_); + } + if (networking_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNetworking()); + } + if (controlPlane_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getControlPlane()); + } + if (authorization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getAuthorization()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AzureCluster.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpoint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, uid_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, reconciling_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, etag_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, annotations__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClient_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, azureClient_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, resourceGroupId_); + } + if (workloadIdentityConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(18, getWorkloadIdentityConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, clusterCaCertificate_); + } + if (fleet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getFleet()); + } + if (managedResources_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getManagedResources()); + } + if (loggingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getLoggingConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureCluster)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureCluster other = + (com.google.cloud.gkemulticloud.v1.AzureCluster) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getAzureRegion().equals(other.getAzureRegion())) return false; + if (!getResourceGroupId().equals(other.getResourceGroupId())) return false; + if (!getAzureClient().equals(other.getAzureClient())) return false; + if (hasNetworking() != other.hasNetworking()) return false; + if (hasNetworking()) { + if (!getNetworking().equals(other.getNetworking())) return false; + } + if (hasControlPlane() != other.hasControlPlane()) return false; + if (hasControlPlane()) { + if (!getControlPlane().equals(other.getControlPlane())) return false; + } + if (hasAuthorization() != other.hasAuthorization()) return false; + if (hasAuthorization()) { + if (!getAuthorization().equals(other.getAuthorization())) return false; + } + if (state_ != other.state_) return false; + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getUid().equals(other.getUid())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasWorkloadIdentityConfig() != other.hasWorkloadIdentityConfig()) return false; + if (hasWorkloadIdentityConfig()) { + if (!getWorkloadIdentityConfig().equals(other.getWorkloadIdentityConfig())) return false; + } + if (!getClusterCaCertificate().equals(other.getClusterCaCertificate())) return false; + if (hasFleet() != other.hasFleet()) return false; + if (hasFleet()) { + if (!getFleet().equals(other.getFleet())) return false; + } + if (hasManagedResources() != other.hasManagedResources()) return false; + if (hasManagedResources()) { + if (!getManagedResources().equals(other.getManagedResources())) return false; + } + if (hasLoggingConfig() != other.hasLoggingConfig()) return false; + if (hasLoggingConfig()) { + if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + AZURE_REGION_FIELD_NUMBER; + hash = (53 * hash) + getAzureRegion().hashCode(); + hash = (37 * hash) + RESOURCE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceGroupId().hashCode(); + hash = (37 * hash) + AZURE_CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getAzureClient().hashCode(); + if (hasNetworking()) { + hash = (37 * hash) + NETWORKING_FIELD_NUMBER; + hash = (53 * hash) + getNetworking().hashCode(); + } + if (hasControlPlane()) { + hash = (37 * hash) + CONTROL_PLANE_FIELD_NUMBER; + hash = (53 * hash) + getControlPlane().hashCode(); + } + if (hasAuthorization()) { + hash = (37 * hash) + AUTHORIZATION_FIELD_NUMBER; + hash = (53 * hash) + getAuthorization().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasWorkloadIdentityConfig()) { + hash = (37 * hash) + WORKLOAD_IDENTITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWorkloadIdentityConfig().hashCode(); + } + hash = (37 * hash) + CLUSTER_CA_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getClusterCaCertificate().hashCode(); + if (hasFleet()) { + hash = (37 * hash) + FLEET_FIELD_NUMBER; + hash = (53 * hash) + getFleet().hashCode(); + } + if (hasManagedResources()) { + hash = (37 * hash) + MANAGED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getManagedResources().hashCode(); + } + if (hasLoggingConfig()) { + hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLoggingConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureCluster 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 Anthos cluster running on Azure.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureCluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureCluster) + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 14: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureCluster.class, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureCluster.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + azureRegion_ = ""; + + resourceGroupId_ = ""; + + azureClient_ = ""; + + if (networkingBuilder_ == null) { + networking_ = null; + } else { + networking_ = null; + networkingBuilder_ = null; + } + if (controlPlaneBuilder_ == null) { + controlPlane_ = null; + } else { + controlPlane_ = null; + controlPlaneBuilder_ = null; + } + if (authorizationBuilder_ == null) { + authorization_ = null; + } else { + authorization_ = null; + authorizationBuilder_ = null; + } + state_ = 0; + + endpoint_ = ""; + + uid_ = ""; + + reconciling_ = false; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableAnnotations().clear(); + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = null; + } else { + workloadIdentityConfig_ = null; + workloadIdentityConfigBuilder_ = null; + } + clusterCaCertificate_ = ""; + + if (fleetBuilder_ == null) { + fleet_ = null; + } else { + fleet_ = null; + fleetBuilder_ = null; + } + if (managedResourcesBuilder_ == null) { + managedResources_ = null; + } else { + managedResources_ = null; + managedResourcesBuilder_ = null; + } + if (loggingConfigBuilder_ == null) { + loggingConfig_ = null; + } else { + loggingConfig_ = null; + loggingConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster build() { + com.google.cloud.gkemulticloud.v1.AzureCluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureCluster result = + new com.google.cloud.gkemulticloud.v1.AzureCluster(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + result.azureRegion_ = azureRegion_; + result.resourceGroupId_ = resourceGroupId_; + result.azureClient_ = azureClient_; + if (networkingBuilder_ == null) { + result.networking_ = networking_; + } else { + result.networking_ = networkingBuilder_.build(); + } + if (controlPlaneBuilder_ == null) { + result.controlPlane_ = controlPlane_; + } else { + result.controlPlane_ = controlPlaneBuilder_.build(); + } + if (authorizationBuilder_ == null) { + result.authorization_ = authorization_; + } else { + result.authorization_ = authorizationBuilder_.build(); + } + result.state_ = state_; + result.endpoint_ = endpoint_; + result.uid_ = uid_; + result.reconciling_ = reconciling_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + if (workloadIdentityConfigBuilder_ == null) { + result.workloadIdentityConfig_ = workloadIdentityConfig_; + } else { + result.workloadIdentityConfig_ = workloadIdentityConfigBuilder_.build(); + } + result.clusterCaCertificate_ = clusterCaCertificate_; + if (fleetBuilder_ == null) { + result.fleet_ = fleet_; + } else { + result.fleet_ = fleetBuilder_.build(); + } + if (managedResourcesBuilder_ == null) { + result.managedResources_ = managedResources_; + } else { + result.managedResources_ = managedResourcesBuilder_.build(); + } + if (loggingConfigBuilder_ == null) { + result.loggingConfig_ = loggingConfig_; + } else { + result.loggingConfig_ = loggingConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureCluster) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureCluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureCluster other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getAzureRegion().isEmpty()) { + azureRegion_ = other.azureRegion_; + onChanged(); + } + if (!other.getResourceGroupId().isEmpty()) { + resourceGroupId_ = other.resourceGroupId_; + onChanged(); + } + if (!other.getAzureClient().isEmpty()) { + azureClient_ = other.azureClient_; + onChanged(); + } + if (other.hasNetworking()) { + mergeNetworking(other.getNetworking()); + } + if (other.hasControlPlane()) { + mergeControlPlane(other.getControlPlane()); + } + if (other.hasAuthorization()) { + mergeAuthorization(other.getAuthorization()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + if (other.hasWorkloadIdentityConfig()) { + mergeWorkloadIdentityConfig(other.getWorkloadIdentityConfig()); + } + if (!other.getClusterCaCertificate().isEmpty()) { + clusterCaCertificate_ = other.clusterCaCertificate_; + onChanged(); + } + if (other.hasFleet()) { + mergeFleet(other.getFleet()); + } + if (other.hasManagedResources()) { + mergeManagedResources(other.getManagedResources()); + } + if (other.hasLoggingConfig()) { + mergeLoggingConfig(other.getLoggingConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureCluster parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AzureCluster) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this resource.
+     * Cluster names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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 description_ = ""; + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human readable description of this cluster.
+     * Cannot be longer than 255 UTF-8 encoded bytes.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object azureRegion_ = ""; + /** + * + * + *
+     * Required. The Azure region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby Azure regions.
+     * You can call
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+     * to list all supported Azure regions within a given Google Cloud region.
+     * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureRegion. + */ + public java.lang.String getAzureRegion() { + java.lang.Object ref = azureRegion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureRegion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Azure region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby Azure regions.
+     * You can call
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+     * to list all supported Azure regions within a given Google Cloud region.
+     * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureRegion. + */ + public com.google.protobuf.ByteString getAzureRegionBytes() { + java.lang.Object ref = azureRegion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Azure region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby Azure regions.
+     * You can call
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+     * to list all supported Azure regions within a given Google Cloud region.
+     * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureRegion to set. + * @return This builder for chaining. + */ + public Builder setAzureRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureRegion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby Azure regions.
+     * You can call
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+     * to list all supported Azure regions within a given Google Cloud region.
+     * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureRegion() { + + azureRegion_ = getDefaultInstance().getAzureRegion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure region where the cluster runs.
+     * Each Google Cloud region supports a subset of nearby Azure regions.
+     * You can call
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+     * to list all supported Azure regions within a given Google Cloud region.
+     * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureRegion to set. + * @return This builder for chaining. + */ + public Builder setAzureRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureRegion_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceGroupId_ = ""; + /** + * + * + *
+     * Required. The ARM ID of the resource group where the cluster resources are deployed.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+     * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceGroupId. + */ + public java.lang.String getResourceGroupId() { + java.lang.Object ref = resourceGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the resource group where the cluster resources are deployed.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+     * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceGroupId. + */ + public com.google.protobuf.ByteString getResourceGroupIdBytes() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the resource group where the cluster resources are deployed.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+     * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceGroupId to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the resource group where the cluster resources are deployed.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+     * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceGroupId() { + + resourceGroupId_ = getDefaultInstance().getResourceGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the resource group where the cluster resources are deployed.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+     * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceGroupId to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object azureClient_ = ""; + /** + * + * + *
+     * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+     * how the Anthos Multi-Cloud API connects to Azure APIs.
+     * The `AzureClient` resource must reside on the same GCP project and region
+     * as the `AzureCluster`.
+     * `AzureClient` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClient. + */ + public java.lang.String getAzureClient() { + java.lang.Object ref = azureClient_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClient_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+     * how the Anthos Multi-Cloud API connects to Azure APIs.
+     * The `AzureClient` resource must reside on the same GCP project and region
+     * as the `AzureCluster`.
+     * `AzureClient` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClient. + */ + public com.google.protobuf.ByteString getAzureClientBytes() { + java.lang.Object ref = azureClient_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClient_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+     * how the Anthos Multi-Cloud API connects to Azure APIs.
+     * The `AzureClient` resource must reside on the same GCP project and region
+     * as the `AzureCluster`.
+     * `AzureClient` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureClient to set. + * @return This builder for chaining. + */ + public Builder setAzureClient(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureClient_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+     * how the Anthos Multi-Cloud API connects to Azure APIs.
+     * The `AzureClient` resource must reside on the same GCP project and region
+     * as the `AzureCluster`.
+     * `AzureClient` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureClient() { + + azureClient_ = getDefaultInstance().getAzureClient(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+     * how the Anthos Multi-Cloud API connects to Azure APIs.
+     * The `AzureClient` resource must reside on the same GCP project and region
+     * as the `AzureCluster`.
+     * `AzureClient` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureClient to set. + * @return This builder for chaining. + */ + public Builder setAzureClientBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureClient_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureClusterNetworking networking_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder> + networkingBuilder_; + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + public boolean hasNetworking() { + return networkingBuilder_ != null || networking_ != null; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getNetworking() { + if (networkingBuilder_ == null) { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.getDefaultInstance() + : networking_; + } else { + return networkingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetworking(com.google.cloud.gkemulticloud.v1.AzureClusterNetworking value) { + if (networkingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networking_ = value; + onChanged(); + } else { + networkingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetworking( + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder builderForValue) { + if (networkingBuilder_ == null) { + networking_ = builderForValue.build(); + onChanged(); + } else { + networkingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNetworking(com.google.cloud.gkemulticloud.v1.AzureClusterNetworking value) { + if (networkingBuilder_ == null) { + if (networking_ != null) { + networking_ = + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.newBuilder(networking_) + .mergeFrom(value) + .buildPartial(); + } else { + networking_ = value; + } + onChanged(); + } else { + networkingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNetworking() { + if (networkingBuilder_ == null) { + networking_ = null; + onChanged(); + } else { + networking_ = null; + networkingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder getNetworkingBuilder() { + + onChanged(); + return getNetworkingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder + getNetworkingOrBuilder() { + if (networkingBuilder_ != null) { + return networkingBuilder_.getMessageOrBuilder(); + } else { + return networking_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.getDefaultInstance() + : networking_; + } + } + /** + * + * + *
+     * Required. Cluster-wide networking configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder> + getNetworkingFieldBuilder() { + if (networkingBuilder_ == null) { + networkingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder>( + getNetworking(), getParentForChildren(), isClean()); + networking_ = null; + } + return networkingBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureControlPlane controlPlane_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureControlPlane, + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder> + controlPlaneBuilder_; + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + public boolean hasControlPlane() { + return controlPlaneBuilder_ != null || controlPlane_ != null; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + public com.google.cloud.gkemulticloud.v1.AzureControlPlane getControlPlane() { + if (controlPlaneBuilder_ == null) { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AzureControlPlane.getDefaultInstance() + : controlPlane_; + } else { + return controlPlaneBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setControlPlane(com.google.cloud.gkemulticloud.v1.AzureControlPlane value) { + if (controlPlaneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controlPlane_ = value; + onChanged(); + } else { + controlPlaneBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setControlPlane( + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder builderForValue) { + if (controlPlaneBuilder_ == null) { + controlPlane_ = builderForValue.build(); + onChanged(); + } else { + controlPlaneBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeControlPlane(com.google.cloud.gkemulticloud.v1.AzureControlPlane value) { + if (controlPlaneBuilder_ == null) { + if (controlPlane_ != null) { + controlPlane_ = + com.google.cloud.gkemulticloud.v1.AzureControlPlane.newBuilder(controlPlane_) + .mergeFrom(value) + .buildPartial(); + } else { + controlPlane_ = value; + } + onChanged(); + } else { + controlPlaneBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearControlPlane() { + if (controlPlaneBuilder_ == null) { + controlPlane_ = null; + onChanged(); + } else { + controlPlane_ = null; + controlPlaneBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder getControlPlaneBuilder() { + + onChanged(); + return getControlPlaneFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder getControlPlaneOrBuilder() { + if (controlPlaneBuilder_ != null) { + return controlPlaneBuilder_.getMessageOrBuilder(); + } else { + return controlPlane_ == null + ? com.google.cloud.gkemulticloud.v1.AzureControlPlane.getDefaultInstance() + : controlPlane_; + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster control plane.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureControlPlane, + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder> + getControlPlaneFieldBuilder() { + if (controlPlaneBuilder_ == null) { + controlPlaneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureControlPlane, + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder, + com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder>( + getControlPlane(), getParentForChildren(), isClean()); + controlPlane_ = null; + } + return controlPlaneBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureAuthorization authorization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureAuthorization, + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder> + authorizationBuilder_; + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + public boolean hasAuthorization() { + return authorizationBuilder_ != null || authorization_ != null; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + public com.google.cloud.gkemulticloud.v1.AzureAuthorization getAuthorization() { + if (authorizationBuilder_ == null) { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AzureAuthorization.getDefaultInstance() + : authorization_; + } else { + return authorizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorization(com.google.cloud.gkemulticloud.v1.AzureAuthorization value) { + if (authorizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorization_ = value; + onChanged(); + } else { + authorizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorization( + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder builderForValue) { + if (authorizationBuilder_ == null) { + authorization_ = builderForValue.build(); + onChanged(); + } else { + authorizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthorization(com.google.cloud.gkemulticloud.v1.AzureAuthorization value) { + if (authorizationBuilder_ == null) { + if (authorization_ != null) { + authorization_ = + com.google.cloud.gkemulticloud.v1.AzureAuthorization.newBuilder(authorization_) + .mergeFrom(value) + .buildPartial(); + } else { + authorization_ = value; + } + onChanged(); + } else { + authorizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthorization() { + if (authorizationBuilder_ == null) { + authorization_ = null; + onChanged(); + } else { + authorization_ = null; + authorizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder getAuthorizationBuilder() { + + onChanged(); + return getAuthorizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder + getAuthorizationOrBuilder() { + if (authorizationBuilder_ != null) { + return authorizationBuilder_.getMessageOrBuilder(); + } else { + return authorization_ == null + ? com.google.cloud.gkemulticloud.v1.AzureAuthorization.getDefaultInstance() + : authorization_; + } + } + /** + * + * + *
+     * Required. Configuration related to the cluster RBAC settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureAuthorization, + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder> + getAuthorizationFieldBuilder() { + if (authorizationBuilder_ == null) { + authorizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureAuthorization, + com.google.cloud.gkemulticloud.v1.AzureAuthorization.Builder, + com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder>( + getAuthorization(), getParentForChildren(), isClean()); + authorization_ = null; + } + return authorizationBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AzureCluster.State result = + com.google.cloud.gkemulticloud.v1.AzureCluster.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gkemulticloud.v1.AzureCluster.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The endpoint of the cluster's API server.
+     * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the cluster.
+     * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private boolean reconciling_; + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set, there are currently changes in flight to the cluster.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + + reconciling_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this cluster was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 13; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the cluster.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workloadIdentityConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder> + workloadIdentityConfigBuilder_; + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + public boolean hasWorkloadIdentityConfig() { + return workloadIdentityConfigBuilder_ != null || workloadIdentityConfig_ != null; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig() { + if (workloadIdentityConfigBuilder_ == null) { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } else { + return workloadIdentityConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig value) { + if (workloadIdentityConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workloadIdentityConfig_ = value; + onChanged(); + } else { + workloadIdentityConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder builderForValue) { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = builderForValue.build(); + onChanged(); + } else { + workloadIdentityConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWorkloadIdentityConfig( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig value) { + if (workloadIdentityConfigBuilder_ == null) { + if (workloadIdentityConfig_ != null) { + workloadIdentityConfig_ = + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.newBuilder( + workloadIdentityConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + workloadIdentityConfig_ = value; + } + onChanged(); + } else { + workloadIdentityConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWorkloadIdentityConfig() { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfig_ = null; + onChanged(); + } else { + workloadIdentityConfig_ = null; + workloadIdentityConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder + getWorkloadIdentityConfigBuilder() { + + onChanged(); + return getWorkloadIdentityConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder() { + if (workloadIdentityConfigBuilder_ != null) { + return workloadIdentityConfigBuilder_.getMessageOrBuilder(); + } else { + return workloadIdentityConfig_ == null + ? com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance() + : workloadIdentityConfig_; + } + } + /** + * + * + *
+     * Output only. Workload Identity settings.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder> + getWorkloadIdentityConfigFieldBuilder() { + if (workloadIdentityConfigBuilder_ == null) { + workloadIdentityConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder>( + getWorkloadIdentityConfig(), getParentForChildren(), isClean()); + workloadIdentityConfig_ = null; + } + return workloadIdentityConfigBuilder_; + } + + private java.lang.Object clusterCaCertificate_ = ""; + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + public java.lang.String getClusterCaCertificate() { + java.lang.Object ref = clusterCaCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterCaCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + public com.google.protobuf.ByteString getClusterCaCertificateBytes() { + java.lang.Object ref = clusterCaCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The clusterCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setClusterCaCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterCaCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClusterCaCertificate() { + + clusterCaCertificate_ = getDefaultInstance().getClusterCaCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. PEM encoded x509 certificate of the cluster root of trust.
+     * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for clusterCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setClusterCaCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterCaCertificate_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.Fleet fleet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder> + fleetBuilder_; + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + public boolean hasFleet() { + return fleetBuilder_ != null || fleet_ != null; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + public com.google.cloud.gkemulticloud.v1.Fleet getFleet() { + if (fleetBuilder_ == null) { + return fleet_ == null + ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() + : fleet_; + } else { + return fleetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFleet(com.google.cloud.gkemulticloud.v1.Fleet value) { + if (fleetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fleet_ = value; + onChanged(); + } else { + fleetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFleet(com.google.cloud.gkemulticloud.v1.Fleet.Builder builderForValue) { + if (fleetBuilder_ == null) { + fleet_ = builderForValue.build(); + onChanged(); + } else { + fleetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFleet(com.google.cloud.gkemulticloud.v1.Fleet value) { + if (fleetBuilder_ == null) { + if (fleet_ != null) { + fleet_ = + com.google.cloud.gkemulticloud.v1.Fleet.newBuilder(fleet_) + .mergeFrom(value) + .buildPartial(); + } else { + fleet_ = value; + } + onChanged(); + } else { + fleetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFleet() { + if (fleetBuilder_ == null) { + fleet_ = null; + onChanged(); + } else { + fleet_ = null; + fleetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.Fleet.Builder getFleetBuilder() { + + onChanged(); + return getFleetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder() { + if (fleetBuilder_ != null) { + return fleetBuilder_.getMessageOrBuilder(); + } else { + return fleet_ == null + ? com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance() + : fleet_; + } + } + /** + * + * + *
+     * Optional. Fleet configuration.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder> + getFleetFieldBuilder() { + if (fleetBuilder_ == null) { + fleetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.Fleet, + com.google.cloud.gkemulticloud.v1.Fleet.Builder, + com.google.cloud.gkemulticloud.v1.FleetOrBuilder>( + getFleet(), getParentForChildren(), isClean()); + fleet_ = null; + } + return fleetBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureClusterResources managedResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterResources, + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder> + managedResourcesBuilder_; + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managedResources field is set. + */ + public boolean hasManagedResources() { + return managedResourcesBuilder_ != null || managedResources_ != null; + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managedResources. + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterResources getManagedResources() { + if (managedResourcesBuilder_ == null) { + return managedResources_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterResources.getDefaultInstance() + : managedResources_; + } else { + return managedResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setManagedResources( + com.google.cloud.gkemulticloud.v1.AzureClusterResources value) { + if (managedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managedResources_ = value; + onChanged(); + } else { + managedResourcesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setManagedResources( + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder builderForValue) { + if (managedResourcesBuilder_ == null) { + managedResources_ = builderForValue.build(); + onChanged(); + } else { + managedResourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeManagedResources( + com.google.cloud.gkemulticloud.v1.AzureClusterResources value) { + if (managedResourcesBuilder_ == null) { + if (managedResources_ != null) { + managedResources_ = + com.google.cloud.gkemulticloud.v1.AzureClusterResources.newBuilder(managedResources_) + .mergeFrom(value) + .buildPartial(); + } else { + managedResources_ = value; + } + onChanged(); + } else { + managedResourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearManagedResources() { + if (managedResourcesBuilder_ == null) { + managedResources_ = null; + onChanged(); + } else { + managedResources_ = null; + managedResourcesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder + getManagedResourcesBuilder() { + + onChanged(); + return getManagedResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder + getManagedResourcesOrBuilder() { + if (managedResourcesBuilder_ != null) { + return managedResourcesBuilder_.getMessageOrBuilder(); + } else { + return managedResources_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClusterResources.getDefaultInstance() + : managedResources_; + } + } + /** + * + * + *
+     * Output only. Mananged Azure resources for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterResources, + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder> + getManagedResourcesFieldBuilder() { + if (managedResourcesBuilder_ == null) { + managedResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClusterResources, + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder>( + getManagedResources(), getParentForChildren(), isClean()); + managedResources_ = null; + } + return managedResourcesBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.LoggingConfig loggingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder> + loggingConfigBuilder_; + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + public boolean hasLoggingConfig() { + return loggingConfigBuilder_ != null || loggingConfig_ != null; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig() { + if (loggingConfigBuilder_ == null) { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } else { + return loggingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLoggingConfig(com.google.cloud.gkemulticloud.v1.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loggingConfig_ = value; + onChanged(); + } else { + loggingConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLoggingConfig( + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder builderForValue) { + if (loggingConfigBuilder_ == null) { + loggingConfig_ = builderForValue.build(); + onChanged(); + } else { + loggingConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLoggingConfig(com.google.cloud.gkemulticloud.v1.LoggingConfig value) { + if (loggingConfigBuilder_ == null) { + if (loggingConfig_ != null) { + loggingConfig_ = + com.google.cloud.gkemulticloud.v1.LoggingConfig.newBuilder(loggingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + loggingConfig_ = value; + } + onChanged(); + } else { + loggingConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLoggingConfig() { + if (loggingConfigBuilder_ == null) { + loggingConfig_ = null; + onChanged(); + } else { + loggingConfig_ = null; + loggingConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder getLoggingConfigBuilder() { + + onChanged(); + return getLoggingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { + if (loggingConfigBuilder_ != null) { + return loggingConfigBuilder_.getMessageOrBuilder(); + } else { + return loggingConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance() + : loggingConfig_; + } + } + /** + * + * + *
+     * Optional. Logging configuration for this cluster.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder> + getLoggingConfigFieldBuilder() { + if (loggingConfigBuilder_ == null) { + loggingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingConfig, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder>( + getLoggingConfig(), getParentForChildren(), isClean()); + loggingConfig_ = null; + } + return loggingConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureCluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureCluster) + private static final com.google.cloud.gkemulticloud.v1.AzureCluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureCluster(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureCluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureCluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureCluster(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterName.java new file mode 100644 index 0000000..1c59ea0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AzureClusterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AZURE_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/azureClusters/{azure_cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String azureCluster; + + @Deprecated + protected AzureClusterName() { + project = null; + location = null; + azureCluster = null; + } + + private AzureClusterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + azureCluster = Preconditions.checkNotNull(builder.getAzureCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureCluster() { + return azureCluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AzureClusterName of(String project, String location, String azureCluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureCluster(azureCluster) + .build(); + } + + public static String format(String project, String location, String azureCluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureCluster(azureCluster) + .build() + .toString(); + } + + public static AzureClusterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AZURE_CLUSTER.validatedMatch( + formattedString, "AzureClusterName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("azure_cluster")); + } + + 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 (AzureClusterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AZURE_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (azureCluster != null) { + fieldMapBuilder.put("azure_cluster", azureCluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AZURE_CLUSTER.instantiate( + "project", project, "location", location, "azure_cluster", azureCluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AzureClusterName that = ((AzureClusterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.azureCluster, that.azureCluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(azureCluster); + return h; + } + + /** Builder for projects/{project}/locations/{location}/azureClusters/{azure_cluster}. */ + public static class Builder { + private String project; + private String location; + private String azureCluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureCluster() { + return azureCluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAzureCluster(String azureCluster) { + this.azureCluster = azureCluster; + return this; + } + + private Builder(AzureClusterName azureClusterName) { + this.project = azureClusterName.project; + this.location = azureClusterName.location; + this.azureCluster = azureClusterName.azureCluster; + } + + public AzureClusterName build() { + return new AzureClusterName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworking.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworking.java new file mode 100644 index 0000000..d4a2a0f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworking.java @@ -0,0 +1,1600 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * ClusterNetworking contains cluster-wide networking configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterNetworking} + */ +public final class AzureClusterNetworking extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureClusterNetworking) + AzureClusterNetworkingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureClusterNetworking.newBuilder() to construct. + private AzureClusterNetworking(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureClusterNetworking() { + virtualNetworkId_ = ""; + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceLoadBalancerSubnetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureClusterNetworking(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureClusterNetworking( + 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(); + + virtualNetworkId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + podAddressCidrBlocks_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + serviceAddressCidrBlocks_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceLoadBalancerSubnetId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = podAddressCidrBlocks_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.class, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder.class); + } + + public static final int VIRTUAL_NETWORK_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object virtualNetworkId_; + /** + * + * + *
+   * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+   * cluster.
+   * All components in the cluster (i.e. control plane and node pools) run on a
+   * single VNet.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+   * This field cannot be changed after creation.
+   * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The virtualNetworkId. + */ + @java.lang.Override + public java.lang.String getVirtualNetworkId() { + java.lang.Object ref = virtualNetworkId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + virtualNetworkId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+   * cluster.
+   * All components in the cluster (i.e. control plane and node pools) run on a
+   * single VNet.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+   * This field cannot be changed after creation.
+   * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for virtualNetworkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVirtualNetworkIdBytes() { + java.lang.Object ref = virtualNetworkId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + virtualNetworkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList podAddressCidrBlocks_; + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getPodAddressCidrBlocksList() { + return podAddressCidrBlocks_; + } + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + public int getPodAddressCidrBlocksCount() { + return podAddressCidrBlocks_.size(); + } + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + public java.lang.String getPodAddressCidrBlocks(int index) { + return podAddressCidrBlocks_.get(index); + } + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index) { + return podAddressCidrBlocks_.getByteString(index); + } + + public static final int SERVICE_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList serviceAddressCidrBlocks_; + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getServiceAddressCidrBlocksList() { + return serviceAddressCidrBlocks_; + } + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + public int getServiceAddressCidrBlocksCount() { + return serviceAddressCidrBlocks_.size(); + } + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + public java.lang.String getServiceAddressCidrBlocks(int index) { + return serviceAddressCidrBlocks_.get(index); + } + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index) { + return serviceAddressCidrBlocks_.getByteString(index); + } + + public static final int SERVICE_LOAD_BALANCER_SUBNET_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object serviceLoadBalancerSubnetId_; + /** + * + * + *
+   * Optional. The ARM ID of the subnet where Kubernetes private service type load
+   * balancers are deployed. When unspecified, it defaults to
+   * AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+   * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceLoadBalancerSubnetId. + */ + @java.lang.Override + public java.lang.String getServiceLoadBalancerSubnetId() { + java.lang.Object ref = serviceLoadBalancerSubnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceLoadBalancerSubnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ARM ID of the subnet where Kubernetes private service type load
+   * balancers are deployed. When unspecified, it defaults to
+   * AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+   * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for serviceLoadBalancerSubnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceLoadBalancerSubnetIdBytes() { + java.lang.Object ref = serviceLoadBalancerSubnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceLoadBalancerSubnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(virtualNetworkId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, virtualNetworkId_); + } + for (int i = 0; i < podAddressCidrBlocks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, podAddressCidrBlocks_.getRaw(i)); + } + for (int i = 0; i < serviceAddressCidrBlocks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, serviceAddressCidrBlocks_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceLoadBalancerSubnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceLoadBalancerSubnetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(virtualNetworkId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, virtualNetworkId_); + } + { + int dataSize = 0; + for (int i = 0; i < podAddressCidrBlocks_.size(); i++) { + dataSize += computeStringSizeNoTag(podAddressCidrBlocks_.getRaw(i)); + } + size += dataSize; + size += 1 * getPodAddressCidrBlocksList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < serviceAddressCidrBlocks_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceAddressCidrBlocks_.getRaw(i)); + } + size += dataSize; + size += 1 * getServiceAddressCidrBlocksList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceLoadBalancerSubnetId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceLoadBalancerSubnetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureClusterNetworking)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking other = + (com.google.cloud.gkemulticloud.v1.AzureClusterNetworking) obj; + + if (!getVirtualNetworkId().equals(other.getVirtualNetworkId())) return false; + if (!getPodAddressCidrBlocksList().equals(other.getPodAddressCidrBlocksList())) return false; + if (!getServiceAddressCidrBlocksList().equals(other.getServiceAddressCidrBlocksList())) + return false; + if (!getServiceLoadBalancerSubnetId().equals(other.getServiceLoadBalancerSubnetId())) + 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) + VIRTUAL_NETWORK_ID_FIELD_NUMBER; + hash = (53 * hash) + getVirtualNetworkId().hashCode(); + if (getPodAddressCidrBlocksCount() > 0) { + hash = (37 * hash) + POD_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getPodAddressCidrBlocksList().hashCode(); + } + if (getServiceAddressCidrBlocksCount() > 0) { + hash = (37 * hash) + SERVICE_ADDRESS_CIDR_BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getServiceAddressCidrBlocksList().hashCode(); + } + hash = (37 * hash) + SERVICE_LOAD_BALANCER_SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceLoadBalancerSubnetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking 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; + } + /** + * + * + *
+   * ClusterNetworking contains cluster-wide networking configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterNetworking} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureClusterNetworking) + com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.class, + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.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(); + virtualNetworkId_ = ""; + + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + serviceLoadBalancerSubnetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking build() { + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking result = + new com.google.cloud.gkemulticloud.v1.AzureClusterNetworking(this); + int from_bitField0_ = bitField0_; + result.virtualNetworkId_ = virtualNetworkId_; + if (((bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = podAddressCidrBlocks_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.podAddressCidrBlocks_ = podAddressCidrBlocks_; + if (((bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceAddressCidrBlocks_ = serviceAddressCidrBlocks_; + result.serviceLoadBalancerSubnetId_ = serviceLoadBalancerSubnetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureClusterNetworking) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureClusterNetworking) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureClusterNetworking other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureClusterNetworking.getDefaultInstance()) + return this; + if (!other.getVirtualNetworkId().isEmpty()) { + virtualNetworkId_ = other.virtualNetworkId_; + onChanged(); + } + if (!other.podAddressCidrBlocks_.isEmpty()) { + if (podAddressCidrBlocks_.isEmpty()) { + podAddressCidrBlocks_ = other.podAddressCidrBlocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.addAll(other.podAddressCidrBlocks_); + } + onChanged(); + } + if (!other.serviceAddressCidrBlocks_.isEmpty()) { + if (serviceAddressCidrBlocks_.isEmpty()) { + serviceAddressCidrBlocks_ = other.serviceAddressCidrBlocks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.addAll(other.serviceAddressCidrBlocks_); + } + onChanged(); + } + if (!other.getServiceLoadBalancerSubnetId().isEmpty()) { + serviceLoadBalancerSubnetId_ = other.serviceLoadBalancerSubnetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureClusterNetworking) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object virtualNetworkId_ = ""; + /** + * + * + *
+     * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+     * cluster.
+     * All components in the cluster (i.e. control plane and node pools) run on a
+     * single VNet.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+     * This field cannot be changed after creation.
+     * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The virtualNetworkId. + */ + public java.lang.String getVirtualNetworkId() { + java.lang.Object ref = virtualNetworkId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + virtualNetworkId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+     * cluster.
+     * All components in the cluster (i.e. control plane and node pools) run on a
+     * single VNet.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+     * This field cannot be changed after creation.
+     * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for virtualNetworkId. + */ + public com.google.protobuf.ByteString getVirtualNetworkIdBytes() { + java.lang.Object ref = virtualNetworkId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + virtualNetworkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+     * cluster.
+     * All components in the cluster (i.e. control plane and node pools) run on a
+     * single VNet.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+     * This field cannot be changed after creation.
+     * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The virtualNetworkId to set. + * @return This builder for chaining. + */ + public Builder setVirtualNetworkId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + virtualNetworkId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+     * cluster.
+     * All components in the cluster (i.e. control plane and node pools) run on a
+     * single VNet.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+     * This field cannot be changed after creation.
+     * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVirtualNetworkId() { + + virtualNetworkId_ = getDefaultInstance().getVirtualNetworkId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+     * cluster.
+     * All components in the cluster (i.e. control plane and node pools) run on a
+     * single VNet.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+     * This field cannot be changed after creation.
+     * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for virtualNetworkId to set. + * @return This builder for chaining. + */ + public Builder setVirtualNetworkIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + virtualNetworkId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList podAddressCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePodAddressCidrBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + podAddressCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(podAddressCidrBlocks_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getPodAddressCidrBlocksList() { + return podAddressCidrBlocks_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + public int getPodAddressCidrBlocksCount() { + return podAddressCidrBlocks_.size(); + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + public java.lang.String getPodAddressCidrBlocks(int index) { + return podAddressCidrBlocks_.get(index); + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index) { + return podAddressCidrBlocks_.getByteString(index); + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The podAddressCidrBlocks to set. + * @return This builder for chaining. + */ + public Builder setPodAddressCidrBlocks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addPodAddressCidrBlocks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllPodAddressCidrBlocks(java.lang.Iterable values) { + ensurePodAddressCidrBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, podAddressCidrBlocks_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPodAddressCidrBlocks() { + podAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range of the pods in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All pods in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creation.
+     * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the podAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addPodAddressCidrBlocksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePodAddressCidrBlocksIsMutable(); + podAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList serviceAddressCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServiceAddressCidrBlocksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceAddressCidrBlocks_ = + new com.google.protobuf.LazyStringArrayList(serviceAddressCidrBlocks_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getServiceAddressCidrBlocksList() { + return serviceAddressCidrBlocks_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + public int getServiceAddressCidrBlocksCount() { + return serviceAddressCidrBlocks_.size(); + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + public java.lang.String getServiceAddressCidrBlocks(int index) { + return serviceAddressCidrBlocks_.get(index); + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index) { + return serviceAddressCidrBlocks_.getByteString(index); + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The serviceAddressCidrBlocks to set. + * @return This builder for chaining. + */ + public Builder setServiceAddressCidrBlocks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addServiceAddressCidrBlocks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllServiceAddressCidrBlocks(java.lang.Iterable values) { + ensureServiceAddressCidrBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAddressCidrBlocks_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAddressCidrBlocks() { + serviceAddressCidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP address range for services in this cluster, in CIDR
+     * notation (e.g. `10.96.0.0/14`).
+     * All services in the cluster get assigned a unique IPv4 address from these
+     * ranges. Only a single range is supported.
+     * This field cannot be changed after creating a cluster.
+     * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the serviceAddressCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addServiceAddressCidrBlocksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServiceAddressCidrBlocksIsMutable(); + serviceAddressCidrBlocks_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceLoadBalancerSubnetId_ = ""; + /** + * + * + *
+     * Optional. The ARM ID of the subnet where Kubernetes private service type load
+     * balancers are deployed. When unspecified, it defaults to
+     * AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+     * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceLoadBalancerSubnetId. + */ + public java.lang.String getServiceLoadBalancerSubnetId() { + java.lang.Object ref = serviceLoadBalancerSubnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceLoadBalancerSubnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where Kubernetes private service type load
+     * balancers are deployed. When unspecified, it defaults to
+     * AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+     * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for serviceLoadBalancerSubnetId. + */ + public com.google.protobuf.ByteString getServiceLoadBalancerSubnetIdBytes() { + java.lang.Object ref = serviceLoadBalancerSubnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceLoadBalancerSubnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where Kubernetes private service type load
+     * balancers are deployed. When unspecified, it defaults to
+     * AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+     * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The serviceLoadBalancerSubnetId to set. + * @return This builder for chaining. + */ + public Builder setServiceLoadBalancerSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceLoadBalancerSubnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where Kubernetes private service type load
+     * balancers are deployed. When unspecified, it defaults to
+     * AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+     * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceLoadBalancerSubnetId() { + + serviceLoadBalancerSubnetId_ = getDefaultInstance().getServiceLoadBalancerSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where Kubernetes private service type load
+     * balancers are deployed. When unspecified, it defaults to
+     * AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+     * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for serviceLoadBalancerSubnetId to set. + * @return This builder for chaining. + */ + public Builder setServiceLoadBalancerSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceLoadBalancerSubnetId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureClusterNetworking) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureClusterNetworking) + private static final com.google.cloud.gkemulticloud.v1.AzureClusterNetworking DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureClusterNetworking(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureClusterNetworking parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureClusterNetworking(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworkingOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworkingOrBuilder.java new file mode 100644 index 0000000..1c879d7 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterNetworkingOrBuilder.java @@ -0,0 +1,243 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureClusterNetworkingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureClusterNetworking) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+   * cluster.
+   * All components in the cluster (i.e. control plane and node pools) run on a
+   * single VNet.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+   * This field cannot be changed after creation.
+   * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The virtualNetworkId. + */ + java.lang.String getVirtualNetworkId(); + /** + * + * + *
+   * Required. The Azure Resource Manager (ARM) ID of the VNet associated with your
+   * cluster.
+   * All components in the cluster (i.e. control plane and node pools) run on a
+   * single VNet.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>`
+   * This field cannot be changed after creation.
+   * 
+ * + * string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for virtualNetworkId. + */ + com.google.protobuf.ByteString getVirtualNetworkIdBytes(); + + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the podAddressCidrBlocks. + */ + java.util.List getPodAddressCidrBlocksList(); + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of podAddressCidrBlocks. + */ + int getPodAddressCidrBlocksCount(); + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The podAddressCidrBlocks at the given index. + */ + java.lang.String getPodAddressCidrBlocks(int index); + /** + * + * + *
+   * Required. The IP address range of the pods in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All pods in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creation.
+   * 
+ * + * repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the podAddressCidrBlocks at the given index. + */ + com.google.protobuf.ByteString getPodAddressCidrBlocksBytes(int index); + + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the serviceAddressCidrBlocks. + */ + java.util.List getServiceAddressCidrBlocksList(); + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of serviceAddressCidrBlocks. + */ + int getServiceAddressCidrBlocksCount(); + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The serviceAddressCidrBlocks at the given index. + */ + java.lang.String getServiceAddressCidrBlocks(int index); + /** + * + * + *
+   * Required. The IP address range for services in this cluster, in CIDR
+   * notation (e.g. `10.96.0.0/14`).
+   * All services in the cluster get assigned a unique IPv4 address from these
+   * ranges. Only a single range is supported.
+   * This field cannot be changed after creating a cluster.
+   * 
+ * + * + * repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAddressCidrBlocks at the given index. + */ + com.google.protobuf.ByteString getServiceAddressCidrBlocksBytes(int index); + + /** + * + * + *
+   * Optional. The ARM ID of the subnet where Kubernetes private service type load
+   * balancers are deployed. When unspecified, it defaults to
+   * AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+   * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceLoadBalancerSubnetId. + */ + java.lang.String getServiceLoadBalancerSubnetId(); + /** + * + * + *
+   * Optional. The ARM ID of the subnet where Kubernetes private service type load
+   * balancers are deployed. When unspecified, it defaults to
+   * AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456"
+   * 
+ * + * string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for serviceLoadBalancerSubnetId. + */ + com.google.protobuf.ByteString getServiceLoadBalancerSubnetIdBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterOrBuilder.java new file mode 100644 index 0000000..8c3233d --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureCluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this resource.
+   * Cluster names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A human readable description of this cluster.
+   * Cannot be longer than 255 UTF-8 encoded bytes.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The Azure region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby Azure regions.
+   * You can call
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+   * to list all supported Azure regions within a given Google Cloud region.
+   * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureRegion. + */ + java.lang.String getAzureRegion(); + /** + * + * + *
+   * Required. The Azure region where the cluster runs.
+   * Each Google Cloud region supports a subset of nearby Azure regions.
+   * You can call
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]
+   * to list all supported Azure regions within a given Google Cloud region.
+   * 
+ * + * string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureRegion. + */ + com.google.protobuf.ByteString getAzureRegionBytes(); + + /** + * + * + *
+   * Required. The ARM ID of the resource group where the cluster resources are deployed.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+   * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceGroupId. + */ + java.lang.String getResourceGroupId(); + /** + * + * + *
+   * Required. The ARM ID of the resource group where the cluster resources are deployed.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`
+   * 
+ * + * string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceGroupId. + */ + com.google.protobuf.ByteString getResourceGroupIdBytes(); + + /** + * + * + *
+   * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+   * how the Anthos Multi-Cloud API connects to Azure APIs.
+   * The `AzureClient` resource must reside on the same GCP project and region
+   * as the `AzureCluster`.
+   * `AzureClient` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClient. + */ + java.lang.String getAzureClient(); + /** + * + * + *
+   * Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for
+   * how the Anthos Multi-Cloud API connects to Azure APIs.
+   * The `AzureClient` resource must reside on the same GCP project and region
+   * as the `AzureCluster`.
+   * `AzureClient` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * string azure_client = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClient. + */ + com.google.protobuf.ByteString getAzureClientBytes(); + + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the networking field is set. + */ + boolean hasNetworking(); + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networking. + */ + com.google.cloud.gkemulticloud.v1.AzureClusterNetworking getNetworking(); + /** + * + * + *
+   * Required. Cluster-wide networking configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterNetworkingOrBuilder getNetworkingOrBuilder(); + + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the controlPlane field is set. + */ + boolean hasControlPlane(); + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The controlPlane. + */ + com.google.cloud.gkemulticloud.v1.AzureControlPlane getControlPlane(); + /** + * + * + *
+   * Required. Configuration related to the cluster control plane.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder getControlPlaneOrBuilder(); + + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorization field is set. + */ + boolean hasAuthorization(); + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorization. + */ + com.google.cloud.gkemulticloud.v1.AzureAuthorization getAuthorization(); + /** + * + * + *
+   * Required. Configuration related to the cluster RBAC settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureAuthorizationOrBuilder getAuthorizationOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gkemulticloud.v1.AzureCluster.State getState(); + + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Output only. The endpoint of the cluster's API server.
+   * 
+ * + * string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. A globally unique identifier for the cluster.
+   * 
+ * + * string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. If set, there are currently changes in flight to the cluster.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this cluster was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 13; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Annotations on the cluster.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workloadIdentityConfig field is set. + */ + boolean hasWorkloadIdentityConfig(); + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workloadIdentityConfig. + */ + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getWorkloadIdentityConfig(); + /** + * + * + *
+   * Output only. Workload Identity settings.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder + getWorkloadIdentityConfigOrBuilder(); + + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterCaCertificate. + */ + java.lang.String getClusterCaCertificate(); + /** + * + * + *
+   * Output only. PEM encoded x509 certificate of the cluster root of trust.
+   * 
+ * + * string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterCaCertificate. + */ + com.google.protobuf.ByteString getClusterCaCertificateBytes(); + + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fleet field is set. + */ + boolean hasFleet(); + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fleet. + */ + com.google.cloud.gkemulticloud.v1.Fleet getFleet(); + /** + * + * + *
+   * Optional. Fleet configuration.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.FleetOrBuilder getFleetOrBuilder(); + + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managedResources field is set. + */ + boolean hasManagedResources(); + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managedResources. + */ + com.google.cloud.gkemulticloud.v1.AzureClusterResources getManagedResources(); + /** + * + * + *
+   * Output only. Mananged Azure resources for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder getManagedResourcesOrBuilder(); + + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the loggingConfig field is set. + */ + boolean hasLoggingConfig(); + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The loggingConfig. + */ + com.google.cloud.gkemulticloud.v1.LoggingConfig getLoggingConfig(); + /** + * + * + *
+   * Optional. Logging configuration for this cluster.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResources.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResources.java new file mode 100644 index 0000000..d6d0c2a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResources.java @@ -0,0 +1,847 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Managed Azure resources for the cluster.
+ * The values could change and be empty, depending on the state of the cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterResources} + */ +public final class AzureClusterResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureClusterResources) + AzureClusterResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureClusterResources.newBuilder() to construct. + private AzureClusterResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureClusterResources() { + networkSecurityGroupId_ = ""; + controlPlaneApplicationSecurityGroupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureClusterResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureClusterResources( + 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(); + + networkSecurityGroupId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + controlPlaneApplicationSecurityGroupId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterResources.class, + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder.class); + } + + public static final int NETWORK_SECURITY_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object networkSecurityGroupId_; + /** + * + * + *
+   * Output only. The ARM ID of the cluster network security group.
+   * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The networkSecurityGroupId. + */ + @java.lang.Override + public java.lang.String getNetworkSecurityGroupId() { + java.lang.Object ref = networkSecurityGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkSecurityGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ARM ID of the cluster network security group.
+   * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for networkSecurityGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkSecurityGroupIdBytes() { + java.lang.Object ref = networkSecurityGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkSecurityGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTROL_PLANE_APPLICATION_SECURITY_GROUP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object controlPlaneApplicationSecurityGroupId_; + /** + * + * + *
+   * Output only. The ARM ID of the control plane application security group.
+   * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The controlPlaneApplicationSecurityGroupId. + */ + @java.lang.Override + public java.lang.String getControlPlaneApplicationSecurityGroupId() { + java.lang.Object ref = controlPlaneApplicationSecurityGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + controlPlaneApplicationSecurityGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ARM ID of the control plane application security group.
+   * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for controlPlaneApplicationSecurityGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getControlPlaneApplicationSecurityGroupIdBytes() { + java.lang.Object ref = controlPlaneApplicationSecurityGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + controlPlaneApplicationSecurityGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkSecurityGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkSecurityGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty( + controlPlaneApplicationSecurityGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, controlPlaneApplicationSecurityGroupId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkSecurityGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkSecurityGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty( + controlPlaneApplicationSecurityGroupId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, controlPlaneApplicationSecurityGroupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureClusterResources)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureClusterResources other = + (com.google.cloud.gkemulticloud.v1.AzureClusterResources) obj; + + if (!getNetworkSecurityGroupId().equals(other.getNetworkSecurityGroupId())) return false; + if (!getControlPlaneApplicationSecurityGroupId() + .equals(other.getControlPlaneApplicationSecurityGroupId())) 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) + NETWORK_SECURITY_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getNetworkSecurityGroupId().hashCode(); + hash = (37 * hash) + CONTROL_PLANE_APPLICATION_SECURITY_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getControlPlaneApplicationSecurityGroupId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureClusterResources 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; + } + /** + * + * + *
+   * Managed Azure resources for the cluster.
+   * The values could change and be empty, depending on the state of the cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureClusterResources) + com.google.cloud.gkemulticloud.v1.AzureClusterResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterResources.class, + com.google.cloud.gkemulticloud.v1.AzureClusterResources.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureClusterResources.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(); + networkSecurityGroupId_ = ""; + + controlPlaneApplicationSecurityGroupId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResources getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureClusterResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResources build() { + com.google.cloud.gkemulticloud.v1.AzureClusterResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResources buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureClusterResources result = + new com.google.cloud.gkemulticloud.v1.AzureClusterResources(this); + result.networkSecurityGroupId_ = networkSecurityGroupId_; + result.controlPlaneApplicationSecurityGroupId_ = controlPlaneApplicationSecurityGroupId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureClusterResources) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureClusterResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureClusterResources other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureClusterResources.getDefaultInstance()) + return this; + if (!other.getNetworkSecurityGroupId().isEmpty()) { + networkSecurityGroupId_ = other.networkSecurityGroupId_; + onChanged(); + } + if (!other.getControlPlaneApplicationSecurityGroupId().isEmpty()) { + controlPlaneApplicationSecurityGroupId_ = other.controlPlaneApplicationSecurityGroupId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureClusterResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureClusterResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object networkSecurityGroupId_ = ""; + /** + * + * + *
+     * Output only. The ARM ID of the cluster network security group.
+     * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The networkSecurityGroupId. + */ + public java.lang.String getNetworkSecurityGroupId() { + java.lang.Object ref = networkSecurityGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkSecurityGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ARM ID of the cluster network security group.
+     * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for networkSecurityGroupId. + */ + public com.google.protobuf.ByteString getNetworkSecurityGroupIdBytes() { + java.lang.Object ref = networkSecurityGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkSecurityGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ARM ID of the cluster network security group.
+     * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The networkSecurityGroupId to set. + * @return This builder for chaining. + */ + public Builder setNetworkSecurityGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkSecurityGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ARM ID of the cluster network security group.
+     * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearNetworkSecurityGroupId() { + + networkSecurityGroupId_ = getDefaultInstance().getNetworkSecurityGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ARM ID of the cluster network security group.
+     * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for networkSecurityGroupId to set. + * @return This builder for chaining. + */ + public Builder setNetworkSecurityGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkSecurityGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object controlPlaneApplicationSecurityGroupId_ = ""; + /** + * + * + *
+     * Output only. The ARM ID of the control plane application security group.
+     * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The controlPlaneApplicationSecurityGroupId. + */ + public java.lang.String getControlPlaneApplicationSecurityGroupId() { + java.lang.Object ref = controlPlaneApplicationSecurityGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + controlPlaneApplicationSecurityGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ARM ID of the control plane application security group.
+     * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for controlPlaneApplicationSecurityGroupId. + */ + public com.google.protobuf.ByteString getControlPlaneApplicationSecurityGroupIdBytes() { + java.lang.Object ref = controlPlaneApplicationSecurityGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + controlPlaneApplicationSecurityGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ARM ID of the control plane application security group.
+     * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The controlPlaneApplicationSecurityGroupId to set. + * @return This builder for chaining. + */ + public Builder setControlPlaneApplicationSecurityGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + controlPlaneApplicationSecurityGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ARM ID of the control plane application security group.
+     * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearControlPlaneApplicationSecurityGroupId() { + + controlPlaneApplicationSecurityGroupId_ = + getDefaultInstance().getControlPlaneApplicationSecurityGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ARM ID of the control plane application security group.
+     * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for controlPlaneApplicationSecurityGroupId to set. + * @return This builder for chaining. + */ + public Builder setControlPlaneApplicationSecurityGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + controlPlaneApplicationSecurityGroupId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureClusterResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureClusterResources) + private static final com.google.cloud.gkemulticloud.v1.AzureClusterResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureClusterResources(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureClusterResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureClusterResources(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResourcesOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResourcesOrBuilder.java new file mode 100644 index 0000000..10af61b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterResourcesOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureClusterResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureClusterResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ARM ID of the cluster network security group.
+   * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The networkSecurityGroupId. + */ + java.lang.String getNetworkSecurityGroupId(); + /** + * + * + *
+   * Output only. The ARM ID of the cluster network security group.
+   * 
+ * + * string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for networkSecurityGroupId. + */ + com.google.protobuf.ByteString getNetworkSecurityGroupIdBytes(); + + /** + * + * + *
+   * Output only. The ARM ID of the control plane application security group.
+   * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The controlPlaneApplicationSecurityGroupId. + */ + java.lang.String getControlPlaneApplicationSecurityGroupId(); + /** + * + * + *
+   * Output only. The ARM ID of the control plane application security group.
+   * 
+ * + * + * string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for controlPlaneApplicationSecurityGroupId. + */ + com.google.protobuf.ByteString getControlPlaneApplicationSecurityGroupIdBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUser.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUser.java new file mode 100644 index 0000000..7830805 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUser.java @@ -0,0 +1,638 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Identities of a user-type subject for Azure clusters.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterUser} + */ +public final class AzureClusterUser extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureClusterUser) + AzureClusterUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureClusterUser.newBuilder() to construct. + private AzureClusterUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureClusterUser() { + username_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureClusterUser(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureClusterUser( + 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(); + + username_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterUser.class, + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder.class); + } + + public static final int USERNAME_FIELD_NUMBER = 1; + private volatile java.lang.Object username_; + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureClusterUser)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureClusterUser other = + (com.google.cloud.gkemulticloud.v1.AzureClusterUser) obj; + + if (!getUsername().equals(other.getUsername())) 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) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureClusterUser 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; + } + /** + * + * + *
+   * Identities of a user-type subject for Azure clusters.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureClusterUser} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureClusterUser) + com.google.cloud.gkemulticloud.v1.AzureClusterUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureClusterUser.class, + com.google.cloud.gkemulticloud.v1.AzureClusterUser.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureClusterUser.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(); + username_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUser getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureClusterUser.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUser build() { + com.google.cloud.gkemulticloud.v1.AzureClusterUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUser buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureClusterUser result = + new com.google.cloud.gkemulticloud.v1.AzureClusterUser(this); + result.username_ = username_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureClusterUser) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureClusterUser) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureClusterUser other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureClusterUser.getDefaultInstance()) + return this; + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureClusterUser parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureClusterUser) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object username_ = ""; + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+     * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureClusterUser) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureClusterUser) + private static final com.google.cloud.gkemulticloud.v1.AzureClusterUser DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureClusterUser(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureClusterUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureClusterUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureClusterUser(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUserOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUserOrBuilder.java new file mode 100644 index 0000000..f024aa2 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClusterUserOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureClusterUserOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureClusterUser) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + java.lang.String getUsername(); + /** + * + * + *
+   * Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
+   * 
+ * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryption.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryption.java new file mode 100644 index 0000000..d099025 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryption.java @@ -0,0 +1,857 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to config data encryption.
+ * Azure VM bootstrap secret is envelope encrypted with the provided key vault
+ * key.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureConfigEncryption} + */ +public final class AzureConfigEncryption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureConfigEncryption) + AzureConfigEncryptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureConfigEncryption.newBuilder() to construct. + private AzureConfigEncryption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureConfigEncryption() { + keyId_ = ""; + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureConfigEncryption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureConfigEncryption( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + keyId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + publicKey_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.class, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder.class); + } + + public static final int KEY_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object keyId_; + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + @java.lang.Override + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private volatile java.lang.Object publicKey_; + /** + * + * + *
+   * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+   * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+   * in ASN.1 DER form. The string must be comprised of a single PEM block of
+   * type "PUBLIC KEY".
+   * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+   * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+   * in ASN.1 DER form. The string must be comprised of a single PEM block of
+   * type "PUBLIC KEY".
+   * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureConfigEncryption)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption other = + (com.google.cloud.gkemulticloud.v1.AzureConfigEncryption) obj; + + if (!getKeyId().equals(other.getKeyId())) return false; + if (!getPublicKey().equals(other.getPublicKey())) 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) + KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption 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; + } + /** + * + * + *
+   * Configuration related to config data encryption.
+   * Azure VM bootstrap secret is envelope encrypted with the provided key vault
+   * key.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureConfigEncryption} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureConfigEncryption) + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.class, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.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(); + keyId_ = ""; + + publicKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption build() { + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption result = + new com.google.cloud.gkemulticloud.v1.AzureConfigEncryption(this); + result.keyId_ = keyId_; + result.publicKey_ = publicKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureConfigEncryption) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureConfigEncryption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureConfigEncryption other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance()) + return this; + if (!other.getKeyId().isEmpty()) { + keyId_ = other.keyId_; + onChanged(); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureConfigEncryption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyId_ = ""; + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyId() { + + keyId_ = getDefaultInstance().getKeyId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyId_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + * + * + *
+     * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+     * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+     * in ASN.1 DER form. The string must be comprised of a single PEM block of
+     * type "PUBLIC KEY".
+     * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+     * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+     * in ASN.1 DER form. The string must be comprised of a single PEM block of
+     * type "PUBLIC KEY".
+     * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+     * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+     * in ASN.1 DER form. The string must be comprised of a single PEM block of
+     * type "PUBLIC KEY".
+     * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+     * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+     * in ASN.1 DER form. The string must be comprised of a single PEM block of
+     * type "PUBLIC KEY".
+     * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+     * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+     * in ASN.1 DER form. The string must be comprised of a single PEM block of
+     * type "PUBLIC KEY".
+     * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureConfigEncryption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureConfigEncryption) + private static final com.google.cloud.gkemulticloud.v1.AzureConfigEncryption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureConfigEncryption(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureConfigEncryption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureConfigEncryption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryptionOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryptionOrBuilder.java new file mode 100644 index 0000000..1f634e2 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureConfigEncryptionOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureConfigEncryptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureConfigEncryption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + java.lang.String getKeyId(); + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + com.google.protobuf.ByteString getKeyIdBytes(); + + /** + * + * + *
+   * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+   * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+   * in ASN.1 DER form. The string must be comprised of a single PEM block of
+   * type "PUBLIC KEY".
+   * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + * + * + *
+   * Optional. RSA key of the Azure Key Vault public key to use for encrypting the data.
+   * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280)
+   * in ASN.1 DER form. The string must be comprised of a single PEM block of
+   * type "PUBLIC KEY".
+   * 
+ * + * string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString getPublicKeyBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlane.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlane.java new file mode 100644 index 0000000..fb3ae8c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlane.java @@ -0,0 +1,4147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * AzureControlPlane represents the control plane configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureControlPlane} + */ +public final class AzureControlPlane extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureControlPlane) + AzureControlPlaneOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureControlPlane.newBuilder() to construct. + private AzureControlPlane(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureControlPlane() { + version_ = ""; + subnetId_ = ""; + vmSize_ = ""; + replicaPlacements_ = java.util.Collections.emptyList(); + endpointSubnetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureControlPlane(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureControlPlane( + 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(); + + version_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmSize_ = s; + break; + } + case 34: + { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder subBuilder = null; + if (rootVolume_ != null) { + subBuilder = rootVolume_.toBuilder(); + } + rootVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rootVolume_); + rootVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder subBuilder = null; + if (mainVolume_ != null) { + subBuilder = mainVolume_.toBuilder(); + } + mainVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mainVolume_); + mainVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = + com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tags_.getMutableMap().put(tags__.getKey(), tags__.getValue()); + break; + } + case 82: + { + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder subBuilder = null; + if (databaseEncryption_ != null) { + subBuilder = databaseEncryption_.toBuilder(); + } + databaseEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(databaseEncryption_); + databaseEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder subBuilder = null; + if (sshConfig_ != null) { + subBuilder = sshConfig_.toBuilder(); + } + sshConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sshConfig_); + sshConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder subBuilder = null; + if (proxyConfig_ != null) { + subBuilder = proxyConfig_.toBuilder(); + } + proxyConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proxyConfig_); + proxyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + replicaPlacements_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + replicaPlacements_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.parser(), + extensionRegistry)); + break; + } + case 114: + { + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder subBuilder = null; + if (configEncryption_ != null) { + subBuilder = configEncryption_.toBuilder(); + } + configEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configEncryption_); + configEncryption_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + endpointSubnetId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + replicaPlacements_ = java.util.Collections.unmodifiableList(replicaPlacements_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureControlPlane.class, + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int SUBNET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object subnetId_; + /** + * + * + *
+   * Optional. The ARM ID of the default subnet for the control plane. The control plane
+   * VMs are deployed in this subnet, unless
+   * `AzureControlPlane.replica_placements` is specified. This subnet will also
+   * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+   * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+   * be used as default for
+   * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetId. + */ + @java.lang.Override + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ARM ID of the default subnet for the control plane. The control plane
+   * VMs are deployed in this subnet, unless
+   * `AzureControlPlane.replica_placements` is specified. This subnet will also
+   * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+   * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+   * be used as default for
+   * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_SIZE_FIELD_NUMBER = 3; + private volatile java.lang.Object vmSize_; + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * For available VM sizes, see
+   * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + @java.lang.Override + public java.lang.String getVmSize() { + java.lang.Object ref = vmSize_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmSize_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * For available VM sizes, see
+   * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmSizeBytes() { + java.lang.Object ref = vmSize_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSH_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.gkemulticloud.v1.AzureSshConfig sshConfig_; + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + @java.lang.Override + public boolean hasSshConfig() { + return sshConfig_ != null; + } + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig() { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder() { + return getSshConfig(); + } + + public static final int ROOT_VOLUME_FIELD_NUMBER = 4; + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate rootVolume_; + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + @java.lang.Override + public boolean hasRootVolume() { + return rootVolume_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume() { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder() { + return getRootVolume(); + } + + public static final int MAIN_VOLUME_FIELD_NUMBER = 5; + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate mainVolume_; + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + @java.lang.Override + public boolean hasMainVolume() { + return mainVolume_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getMainVolume() { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : mainVolume_; + } + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getMainVolumeOrBuilder() { + return getMainVolume(); + } + + public static final int DATABASE_ENCRYPTION_FIELD_NUMBER = 10; + private com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption databaseEncryption_; + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseEncryption field is set. + */ + @java.lang.Override + public boolean hasDatabaseEncryption() { + return databaseEncryption_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDatabaseEncryption() { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder + getDatabaseEncryptionOrBuilder() { + return getDatabaseEncryption(); + } + + public static final int PROXY_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.gkemulticloud.v1.AzureProxyConfig proxyConfig_; + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + @java.lang.Override + public boolean hasProxyConfig() { + return proxyConfig_ != null; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig() { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder() { + return getProxyConfig(); + } + + public static final int CONFIG_ENCRYPTION_FIELD_NUMBER = 14; + private com.google.cloud.gkemulticloud.v1.AzureConfigEncryption configEncryption_; + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + @java.lang.Override + public boolean hasConfigEncryption() { + return configEncryption_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + return getConfigEncryption(); + } + + public static final int TAGS_FIELD_NUMBER = 7; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int REPLICA_PLACEMENTS_FIELD_NUMBER = 13; + private java.util.List replicaPlacements_; + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getReplicaPlacementsList() { + return replicaPlacements_; + } + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getReplicaPlacementsOrBuilderList() { + return replicaPlacements_; + } + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getReplicaPlacementsCount() { + return replicaPlacements_.size(); + } + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement getReplicaPlacements(int index) { + return replicaPlacements_.get(index); + } + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder getReplicaPlacementsOrBuilder( + int index) { + return replicaPlacements_.get(index); + } + + public static final int ENDPOINT_SUBNET_ID_FIELD_NUMBER = 15; + private volatile java.lang.Object endpointSubnetId_; + /** + * + * + *
+   * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+   * When unspecified, it defaults to AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+   * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endpointSubnetId. + */ + @java.lang.Override + public java.lang.String getEndpointSubnetId() { + java.lang.Object ref = endpointSubnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointSubnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+   * When unspecified, it defaults to AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+   * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for endpointSubnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointSubnetIdBytes() { + java.lang.Object ref = endpointSubnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointSubnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subnetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmSize_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vmSize_); + } + if (rootVolume_ != null) { + output.writeMessage(4, getRootVolume()); + } + if (mainVolume_ != null) { + output.writeMessage(5, getMainVolume()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 7); + if (databaseEncryption_ != null) { + output.writeMessage(10, getDatabaseEncryption()); + } + if (sshConfig_ != null) { + output.writeMessage(11, getSshConfig()); + } + if (proxyConfig_ != null) { + output.writeMessage(12, getProxyConfig()); + } + for (int i = 0; i < replicaPlacements_.size(); i++) { + output.writeMessage(13, replicaPlacements_.get(i)); + } + if (configEncryption_ != null) { + output.writeMessage(14, getConfigEncryption()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointSubnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, endpointSubnetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subnetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmSize_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vmSize_); + } + if (rootVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRootVolume()); + } + if (mainVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMainVolume()); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, tags__); + } + if (databaseEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDatabaseEncryption()); + } + if (sshConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getSshConfig()); + } + if (proxyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getProxyConfig()); + } + for (int i = 0; i < replicaPlacements_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, replicaPlacements_.get(i)); + } + if (configEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getConfigEncryption()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointSubnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, endpointSubnetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureControlPlane)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureControlPlane other = + (com.google.cloud.gkemulticloud.v1.AzureControlPlane) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (!getSubnetId().equals(other.getSubnetId())) return false; + if (!getVmSize().equals(other.getVmSize())) return false; + if (hasSshConfig() != other.hasSshConfig()) return false; + if (hasSshConfig()) { + if (!getSshConfig().equals(other.getSshConfig())) return false; + } + if (hasRootVolume() != other.hasRootVolume()) return false; + if (hasRootVolume()) { + if (!getRootVolume().equals(other.getRootVolume())) return false; + } + if (hasMainVolume() != other.hasMainVolume()) return false; + if (hasMainVolume()) { + if (!getMainVolume().equals(other.getMainVolume())) return false; + } + if (hasDatabaseEncryption() != other.hasDatabaseEncryption()) return false; + if (hasDatabaseEncryption()) { + if (!getDatabaseEncryption().equals(other.getDatabaseEncryption())) return false; + } + if (hasProxyConfig() != other.hasProxyConfig()) return false; + if (hasProxyConfig()) { + if (!getProxyConfig().equals(other.getProxyConfig())) return false; + } + if (hasConfigEncryption() != other.hasConfigEncryption()) return false; + if (hasConfigEncryption()) { + if (!getConfigEncryption().equals(other.getConfigEncryption())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (!getReplicaPlacementsList().equals(other.getReplicaPlacementsList())) return false; + if (!getEndpointSubnetId().equals(other.getEndpointSubnetId())) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubnetId().hashCode(); + hash = (37 * hash) + VM_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getVmSize().hashCode(); + if (hasSshConfig()) { + hash = (37 * hash) + SSH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSshConfig().hashCode(); + } + if (hasRootVolume()) { + hash = (37 * hash) + ROOT_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getRootVolume().hashCode(); + } + if (hasMainVolume()) { + hash = (37 * hash) + MAIN_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getMainVolume().hashCode(); + } + if (hasDatabaseEncryption()) { + hash = (37 * hash) + DATABASE_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseEncryption().hashCode(); + } + if (hasProxyConfig()) { + hash = (37 * hash) + PROXY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProxyConfig().hashCode(); + } + if (hasConfigEncryption()) { + hash = (37 * hash) + CONFIG_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getConfigEncryption().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + if (getReplicaPlacementsCount() > 0) { + hash = (37 * hash) + REPLICA_PLACEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getReplicaPlacementsList().hashCode(); + } + hash = (37 * hash) + ENDPOINT_SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointSubnetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureControlPlane 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; + } + /** + * + * + *
+   * AzureControlPlane represents the control plane configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureControlPlane} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureControlPlane) + com.google.cloud.gkemulticloud.v1.AzureControlPlaneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureControlPlane.class, + com.google.cloud.gkemulticloud.v1.AzureControlPlane.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureControlPlane.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReplicaPlacementsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + subnetId_ = ""; + + vmSize_ = ""; + + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + if (mainVolumeBuilder_ == null) { + mainVolume_ = null; + } else { + mainVolume_ = null; + mainVolumeBuilder_ = null; + } + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = null; + } else { + databaseEncryption_ = null; + databaseEncryptionBuilder_ = null; + } + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + internalGetMutableTags().clear(); + if (replicaPlacementsBuilder_ == null) { + replicaPlacements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + replicaPlacementsBuilder_.clear(); + } + endpointSubnetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlane getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureControlPlane.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlane build() { + com.google.cloud.gkemulticloud.v1.AzureControlPlane result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlane buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureControlPlane result = + new com.google.cloud.gkemulticloud.v1.AzureControlPlane(this); + int from_bitField0_ = bitField0_; + result.version_ = version_; + result.subnetId_ = subnetId_; + result.vmSize_ = vmSize_; + if (sshConfigBuilder_ == null) { + result.sshConfig_ = sshConfig_; + } else { + result.sshConfig_ = sshConfigBuilder_.build(); + } + if (rootVolumeBuilder_ == null) { + result.rootVolume_ = rootVolume_; + } else { + result.rootVolume_ = rootVolumeBuilder_.build(); + } + if (mainVolumeBuilder_ == null) { + result.mainVolume_ = mainVolume_; + } else { + result.mainVolume_ = mainVolumeBuilder_.build(); + } + if (databaseEncryptionBuilder_ == null) { + result.databaseEncryption_ = databaseEncryption_; + } else { + result.databaseEncryption_ = databaseEncryptionBuilder_.build(); + } + if (proxyConfigBuilder_ == null) { + result.proxyConfig_ = proxyConfig_; + } else { + result.proxyConfig_ = proxyConfigBuilder_.build(); + } + if (configEncryptionBuilder_ == null) { + result.configEncryption_ = configEncryption_; + } else { + result.configEncryption_ = configEncryptionBuilder_.build(); + } + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + if (replicaPlacementsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + replicaPlacements_ = java.util.Collections.unmodifiableList(replicaPlacements_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.replicaPlacements_ = replicaPlacements_; + } else { + result.replicaPlacements_ = replicaPlacementsBuilder_.build(); + } + result.endpointSubnetId_ = endpointSubnetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureControlPlane) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureControlPlane) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureControlPlane other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureControlPlane.getDefaultInstance()) + return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getSubnetId().isEmpty()) { + subnetId_ = other.subnetId_; + onChanged(); + } + if (!other.getVmSize().isEmpty()) { + vmSize_ = other.vmSize_; + onChanged(); + } + if (other.hasSshConfig()) { + mergeSshConfig(other.getSshConfig()); + } + if (other.hasRootVolume()) { + mergeRootVolume(other.getRootVolume()); + } + if (other.hasMainVolume()) { + mergeMainVolume(other.getMainVolume()); + } + if (other.hasDatabaseEncryption()) { + mergeDatabaseEncryption(other.getDatabaseEncryption()); + } + if (other.hasProxyConfig()) { + mergeProxyConfig(other.getProxyConfig()); + } + if (other.hasConfigEncryption()) { + mergeConfigEncryption(other.getConfigEncryption()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + if (replicaPlacementsBuilder_ == null) { + if (!other.replicaPlacements_.isEmpty()) { + if (replicaPlacements_.isEmpty()) { + replicaPlacements_ = other.replicaPlacements_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.addAll(other.replicaPlacements_); + } + onChanged(); + } + } else { + if (!other.replicaPlacements_.isEmpty()) { + if (replicaPlacementsBuilder_.isEmpty()) { + replicaPlacementsBuilder_.dispose(); + replicaPlacementsBuilder_ = null; + replicaPlacements_ = other.replicaPlacements_; + bitField0_ = (bitField0_ & ~0x00000002); + replicaPlacementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReplicaPlacementsFieldBuilder() + : null; + } else { + replicaPlacementsBuilder_.addAllMessages(other.replicaPlacements_); + } + } + } + if (!other.getEndpointSubnetId().isEmpty()) { + endpointSubnetId_ = other.endpointSubnetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureControlPlane parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureControlPlane) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Kubernetes version to run on control plane replicas
+     * (e.g. `1.19.10-gke.1000`).
+     * You can list all supported versions on a given Google Cloud region by
+     * calling
+     * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private java.lang.Object subnetId_ = ""; + /** + * + * + *
+     * Optional. The ARM ID of the default subnet for the control plane. The control plane
+     * VMs are deployed in this subnet, unless
+     * `AzureControlPlane.replica_placements` is specified. This subnet will also
+     * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+     * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+     * be used as default for
+     * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetId. + */ + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the default subnet for the control plane. The control plane
+     * VMs are deployed in this subnet, unless
+     * `AzureControlPlane.replica_placements` is specified. This subnet will also
+     * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+     * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+     * be used as default for
+     * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetId. + */ + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the default subnet for the control plane. The control plane
+     * VMs are deployed in this subnet, unless
+     * `AzureControlPlane.replica_placements` is specified. This subnet will also
+     * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+     * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+     * be used as default for
+     * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the default subnet for the control plane. The control plane
+     * VMs are deployed in this subnet, unless
+     * `AzureControlPlane.replica_placements` is specified. This subnet will also
+     * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+     * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+     * be used as default for
+     * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetId() { + + subnetId_ = getDefaultInstance().getSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the default subnet for the control plane. The control plane
+     * VMs are deployed in this subnet, unless
+     * `AzureControlPlane.replica_placements` is specified. This subnet will also
+     * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+     * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+     * be used as default for
+     * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+     * Example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmSize_ = ""; + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * For available VM sizes, see
+     * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + public java.lang.String getVmSize() { + java.lang.Object ref = vmSize_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmSize_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * For available VM sizes, see
+     * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + public com.google.protobuf.ByteString getVmSizeBytes() { + java.lang.Object ref = vmSize_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * For available VM sizes, see
+     * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vmSize to set. + * @return This builder for chaining. + */ + public Builder setVmSize(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * For available VM sizes, see
+     * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVmSize() { + + vmSize_ = getDefaultInstance().getVmSize(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * For available VM sizes, see
+     * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for vmSize to set. + * @return This builder for chaining. + */ + public Builder setVmSizeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmSize_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureSshConfig sshConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder> + sshConfigBuilder_; + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + public boolean hasSshConfig() { + return sshConfigBuilder_ != null || sshConfig_ != null; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig() { + if (sshConfigBuilder_ == null) { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } else { + return sshConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSshConfig(com.google.cloud.gkemulticloud.v1.AzureSshConfig value) { + if (sshConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sshConfig_ = value; + onChanged(); + } else { + sshConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSshConfig( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder builderForValue) { + if (sshConfigBuilder_ == null) { + sshConfig_ = builderForValue.build(); + onChanged(); + } else { + sshConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSshConfig(com.google.cloud.gkemulticloud.v1.AzureSshConfig value) { + if (sshConfigBuilder_ == null) { + if (sshConfig_ != null) { + sshConfig_ = + com.google.cloud.gkemulticloud.v1.AzureSshConfig.newBuilder(sshConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sshConfig_ = value; + } + onChanged(); + } else { + sshConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSshConfig() { + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + onChanged(); + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder getSshConfigBuilder() { + + onChanged(); + return getSshConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder() { + if (sshConfigBuilder_ != null) { + return sshConfigBuilder_.getMessageOrBuilder(); + } else { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } + } + /** + * + * + *
+     * Required. SSH configuration for how to access the underlying control plane
+     * machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder> + getSshConfigFieldBuilder() { + if (sshConfigBuilder_ == null) { + sshConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder>( + getSshConfig(), getParentForChildren(), isClean()); + sshConfig_ = null; + } + return sshConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate rootVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + rootVolumeBuilder_; + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + public boolean hasRootVolume() { + return rootVolumeBuilder_ != null || rootVolume_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume() { + if (rootVolumeBuilder_ == null) { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } else { + return rootVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (rootVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rootVolume_ = value; + onChanged(); + } else { + rootVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder builderForValue) { + if (rootVolumeBuilder_ == null) { + rootVolume_ = builderForValue.build(); + onChanged(); + } else { + rootVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRootVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (rootVolumeBuilder_ == null) { + if (rootVolume_ != null) { + rootVolume_ = + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.newBuilder(rootVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + rootVolume_ = value; + } + onChanged(); + } else { + rootVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRootVolume() { + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + onChanged(); + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder getRootVolumeBuilder() { + + onChanged(); + return getRootVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder() { + if (rootVolumeBuilder_ != null) { + return rootVolumeBuilder_.getMessageOrBuilder(); + } else { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * control plane replica.
+     * When unspecified, it defaults to 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + getRootVolumeFieldBuilder() { + if (rootVolumeBuilder_ == null) { + rootVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder>( + getRootVolume(), getParentForChildren(), isClean()); + rootVolume_ = null; + } + return rootVolumeBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate mainVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + mainVolumeBuilder_; + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + public boolean hasMainVolume() { + return mainVolumeBuilder_ != null || mainVolume_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getMainVolume() { + if (mainVolumeBuilder_ == null) { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : mainVolume_; + } else { + return mainVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMainVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (mainVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mainVolume_ = value; + onChanged(); + } else { + mainVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMainVolume( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder builderForValue) { + if (mainVolumeBuilder_ == null) { + mainVolume_ = builderForValue.build(); + onChanged(); + } else { + mainVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMainVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (mainVolumeBuilder_ == null) { + if (mainVolume_ != null) { + mainVolume_ = + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.newBuilder(mainVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + mainVolume_ = value; + } + onChanged(); + } else { + mainVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMainVolume() { + if (mainVolumeBuilder_ == null) { + mainVolume_ = null; + onChanged(); + } else { + mainVolume_ = null; + mainVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder getMainVolumeBuilder() { + + onChanged(); + return getMainVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getMainVolumeOrBuilder() { + if (mainVolumeBuilder_ != null) { + return mainVolumeBuilder_.getMessageOrBuilder(); + } else { + return mainVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : mainVolume_; + } + } + /** + * + * + *
+     * Optional. Configuration related to the main volume provisioned for each
+     * control plane replica.
+     * The main volume is in charge of storing all of the cluster's etcd state.
+     * When unspecified, it defaults to a 8-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + getMainVolumeFieldBuilder() { + if (mainVolumeBuilder_ == null) { + mainVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder>( + getMainVolume(), getParentForChildren(), isClean()); + mainVolume_ = null; + } + return mainVolumeBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption databaseEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder> + databaseEncryptionBuilder_; + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseEncryption field is set. + */ + public boolean hasDatabaseEncryption() { + return databaseEncryptionBuilder_ != null || databaseEncryption_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDatabaseEncryption() { + if (databaseEncryptionBuilder_ == null) { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } else { + return databaseEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption value) { + if (databaseEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + databaseEncryption_ = value; + onChanged(); + } else { + databaseEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder builderForValue) { + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = builderForValue.build(); + onChanged(); + } else { + databaseEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDatabaseEncryption( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption value) { + if (databaseEncryptionBuilder_ == null) { + if (databaseEncryption_ != null) { + databaseEncryption_ = + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.newBuilder( + databaseEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + databaseEncryption_ = value; + } + onChanged(); + } else { + databaseEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatabaseEncryption() { + if (databaseEncryptionBuilder_ == null) { + databaseEncryption_ = null; + onChanged(); + } else { + databaseEncryption_ = null; + databaseEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder + getDatabaseEncryptionBuilder() { + + onChanged(); + return getDatabaseEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder + getDatabaseEncryptionOrBuilder() { + if (databaseEncryptionBuilder_ != null) { + return databaseEncryptionBuilder_.getMessageOrBuilder(); + } else { + return databaseEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.getDefaultInstance() + : databaseEncryption_; + } + } + /** + * + * + *
+     * Optional. Configuration related to application-layer secrets encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder> + getDatabaseEncryptionFieldBuilder() { + if (databaseEncryptionBuilder_ == null) { + databaseEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder>( + getDatabaseEncryption(), getParentForChildren(), isClean()); + databaseEncryption_ = null; + } + return databaseEncryptionBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureProxyConfig proxyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder> + proxyConfigBuilder_; + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + public boolean hasProxyConfig() { + return proxyConfigBuilder_ != null || proxyConfig_ != null; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig() { + if (proxyConfigBuilder_ == null) { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } else { + return proxyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig(com.google.cloud.gkemulticloud.v1.AzureProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proxyConfig_ = value; + onChanged(); + } else { + proxyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder builderForValue) { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = builderForValue.build(); + onChanged(); + } else { + proxyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProxyConfig(com.google.cloud.gkemulticloud.v1.AzureProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (proxyConfig_ != null) { + proxyConfig_ = + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.newBuilder(proxyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + proxyConfig_ = value; + } + onChanged(); + } else { + proxyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProxyConfig() { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + onChanged(); + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder getProxyConfigBuilder() { + + onChanged(); + return getProxyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder() { + if (proxyConfigBuilder_ != null) { + return proxyConfigBuilder_.getMessageOrBuilder(); + } else { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder> + getProxyConfigFieldBuilder() { + if (proxyConfigBuilder_ == null) { + proxyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder>( + getProxyConfig(), getParentForChildren(), isClean()); + proxyConfig_ = null; + } + return proxyConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureConfigEncryption configEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder> + configEncryptionBuilder_; + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + public boolean hasConfigEncryption() { + return configEncryptionBuilder_ != null || configEncryption_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() { + if (configEncryptionBuilder_ == null) { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } else { + return configEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configEncryption_ = value; + onChanged(); + } else { + configEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder builderForValue) { + if (configEncryptionBuilder_ == null) { + configEncryption_ = builderForValue.build(); + onChanged(); + } else { + configEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (configEncryption_ != null) { + configEncryption_ = + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.newBuilder(configEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + configEncryption_ = value; + } + onChanged(); + } else { + configEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConfigEncryption() { + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + onChanged(); + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder + getConfigEncryptionBuilder() { + + onChanged(); + return getConfigEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + if (configEncryptionBuilder_ != null) { + return configEncryptionBuilder_.getMessageOrBuilder(); + } else { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder> + getConfigEncryptionFieldBuilder() { + if (configEncryptionBuilder_ == null) { + configEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder>( + getConfigEncryption(), getParentForChildren(), isClean()); + configEncryption_ = null; + } + return configEncryptionBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + onChanged(); + ; + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + internalGetMutableTags().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + return internalGetMutableTags().getMutableMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableTags().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying control plane Azure resources.
+     * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + return this; + } + + private java.util.List replicaPlacements_ = + java.util.Collections.emptyList(); + + private void ensureReplicaPlacementsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + replicaPlacements_ = + new java.util.ArrayList( + replicaPlacements_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.ReplicaPlacement, + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder, + com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder> + replicaPlacementsBuilder_; + + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getReplicaPlacementsList() { + if (replicaPlacementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(replicaPlacements_); + } else { + return replicaPlacementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getReplicaPlacementsCount() { + if (replicaPlacementsBuilder_ == null) { + return replicaPlacements_.size(); + } else { + return replicaPlacementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement getReplicaPlacements(int index) { + if (replicaPlacementsBuilder_ == null) { + return replicaPlacements_.get(index); + } else { + return replicaPlacementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReplicaPlacements( + int index, com.google.cloud.gkemulticloud.v1.ReplicaPlacement value) { + if (replicaPlacementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.set(index, value); + onChanged(); + } else { + replicaPlacementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReplicaPlacements( + int index, com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder builderForValue) { + if (replicaPlacementsBuilder_ == null) { + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.set(index, builderForValue.build()); + onChanged(); + } else { + replicaPlacementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReplicaPlacements(com.google.cloud.gkemulticloud.v1.ReplicaPlacement value) { + if (replicaPlacementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.add(value); + onChanged(); + } else { + replicaPlacementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReplicaPlacements( + int index, com.google.cloud.gkemulticloud.v1.ReplicaPlacement value) { + if (replicaPlacementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.add(index, value); + onChanged(); + } else { + replicaPlacementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReplicaPlacements( + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder builderForValue) { + if (replicaPlacementsBuilder_ == null) { + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.add(builderForValue.build()); + onChanged(); + } else { + replicaPlacementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReplicaPlacements( + int index, com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder builderForValue) { + if (replicaPlacementsBuilder_ == null) { + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.add(index, builderForValue.build()); + onChanged(); + } else { + replicaPlacementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllReplicaPlacements( + java.lang.Iterable values) { + if (replicaPlacementsBuilder_ == null) { + ensureReplicaPlacementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicaPlacements_); + onChanged(); + } else { + replicaPlacementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReplicaPlacements() { + if (replicaPlacementsBuilder_ == null) { + replicaPlacements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + replicaPlacementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeReplicaPlacements(int index) { + if (replicaPlacementsBuilder_ == null) { + ensureReplicaPlacementsIsMutable(); + replicaPlacements_.remove(index); + onChanged(); + } else { + replicaPlacementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder getReplicaPlacementsBuilder( + int index) { + return getReplicaPlacementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder + getReplicaPlacementsOrBuilder(int index) { + if (replicaPlacementsBuilder_ == null) { + return replicaPlacements_.get(index); + } else { + return replicaPlacementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getReplicaPlacementsOrBuilderList() { + if (replicaPlacementsBuilder_ != null) { + return replicaPlacementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(replicaPlacements_); + } + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder + addReplicaPlacementsBuilder() { + return getReplicaPlacementsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.ReplicaPlacement.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder addReplicaPlacementsBuilder( + int index) { + return getReplicaPlacementsFieldBuilder() + .addBuilder( + index, com.google.cloud.gkemulticloud.v1.ReplicaPlacement.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Configuration for where to place the control plane replicas.
+     * Up to three replica placement instances can be specified. If
+     * replica_placements is set, the replica placement instances will be applied
+     * to the three control plane replicas as evenly as possible.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getReplicaPlacementsBuilderList() { + return getReplicaPlacementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.ReplicaPlacement, + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder, + com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder> + getReplicaPlacementsFieldBuilder() { + if (replicaPlacementsBuilder_ == null) { + replicaPlacementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.ReplicaPlacement, + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder, + com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder>( + replicaPlacements_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + replicaPlacements_ = null; + } + return replicaPlacementsBuilder_; + } + + private java.lang.Object endpointSubnetId_ = ""; + /** + * + * + *
+     * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+     * When unspecified, it defaults to AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+     * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endpointSubnetId. + */ + public java.lang.String getEndpointSubnetId() { + java.lang.Object ref = endpointSubnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointSubnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+     * When unspecified, it defaults to AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+     * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for endpointSubnetId. + */ + public com.google.protobuf.ByteString getEndpointSubnetIdBytes() { + java.lang.Object ref = endpointSubnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointSubnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+     * When unspecified, it defaults to AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+     * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The endpointSubnetId to set. + * @return This builder for chaining. + */ + public Builder setEndpointSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpointSubnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+     * When unspecified, it defaults to AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+     * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEndpointSubnetId() { + + endpointSubnetId_ = getDefaultInstance().getEndpointSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+     * When unspecified, it defaults to AzureControlPlane.subnet_id.
+     * Example:
+     * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+     * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for endpointSubnetId to set. + * @return This builder for chaining. + */ + public Builder setEndpointSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpointSubnetId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureControlPlane) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureControlPlane) + private static final com.google.cloud.gkemulticloud.v1.AzureControlPlane DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureControlPlane(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureControlPlane getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureControlPlane parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureControlPlane(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureControlPlane getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlaneOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlaneOrBuilder.java new file mode 100644 index 0000000..70de895 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureControlPlaneOrBuilder.java @@ -0,0 +1,563 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureControlPlaneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureControlPlane) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Required. The Kubernetes version to run on control plane replicas
+   * (e.g. `1.19.10-gke.1000`).
+   * You can list all supported versions on a given Google Cloud region by
+   * calling
+   * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig].
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Optional. The ARM ID of the default subnet for the control plane. The control plane
+   * VMs are deployed in this subnet, unless
+   * `AzureControlPlane.replica_placements` is specified. This subnet will also
+   * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+   * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+   * be used as default for
+   * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetId. + */ + java.lang.String getSubnetId(); + /** + * + * + *
+   * Optional. The ARM ID of the default subnet for the control plane. The control plane
+   * VMs are deployed in this subnet, unless
+   * `AzureControlPlane.replica_placements` is specified. This subnet will also
+   * be used as default for `AzureControlPlane.endpoint_subnet_id` if
+   * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will
+   * be used as default for
+   * `AzureClusterNetworking.service_load_balancer_subnet_id`.
+   * Example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.Network/virtualNetworks/<vnet-id>/subnets/default`.
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetId. + */ + com.google.protobuf.ByteString getSubnetIdBytes(); + + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * For available VM sizes, see
+   * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + java.lang.String getVmSize(); + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * For available VM sizes, see
+   * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + com.google.protobuf.ByteString getVmSizeBytes(); + + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + boolean hasSshConfig(); + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig(); + /** + * + * + *
+   * Required. SSH configuration for how to access the underlying control plane
+   * machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + boolean hasRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * control plane replica.
+   * When unspecified, it defaults to 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mainVolume field is set. + */ + boolean hasMainVolume(); + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mainVolume. + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getMainVolume(); + /** + * + * + *
+   * Optional. Configuration related to the main volume provisioned for each
+   * control plane replica.
+   * The main volume is in charge of storing all of the cluster's etcd state.
+   * When unspecified, it defaults to a 8-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getMainVolumeOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseEncryption field is set. + */ + boolean hasDatabaseEncryption(); + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseEncryption. + */ + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDatabaseEncryption(); + /** + * + * + *
+   * Optional. Configuration related to application-layer secrets encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder + getDatabaseEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + boolean hasProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + boolean hasConfigEncryption(); + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption(); + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder getConfigEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsTags(java.lang.String key); + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getTagsMap(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying control plane Azure resources.
+   * 
+ * + * map<string, string> tags = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getTagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getReplicaPlacementsList(); + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.ReplicaPlacement getReplicaPlacements(int index); + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getReplicaPlacementsCount(); + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getReplicaPlacementsOrBuilderList(); + /** + * + * + *
+   * Optional. Configuration for where to place the control plane replicas.
+   * Up to three replica placement instances can be specified. If
+   * replica_placements is set, the replica placement instances will be applied
+   * to the three control plane replicas as evenly as possible.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder getReplicaPlacementsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+   * When unspecified, it defaults to AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+   * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endpointSubnetId. + */ + java.lang.String getEndpointSubnetId(); + /** + * + * + *
+   * Optional. The ARM ID of the subnet where the control plane load balancer is deployed.
+   * When unspecified, it defaults to AzureControlPlane.subnet_id.
+   * Example:
+   * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123"
+   * 
+ * + * string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for endpointSubnetId. + */ + com.google.protobuf.ByteString getEndpointSubnetIdBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryption.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryption.java new file mode 100644 index 0000000..bcb6a2e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryption.java @@ -0,0 +1,671 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to application-layer secrets encryption.
+ * Anthos clusters on Azure encrypts your Kubernetes data at rest
+ * in etcd using Azure Key Vault.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} + */ +public final class AzureDatabaseEncryption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + AzureDatabaseEncryptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureDatabaseEncryption.newBuilder() to construct. + private AzureDatabaseEncryption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureDatabaseEncryption() { + keyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureDatabaseEncryption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureDatabaseEncryption( + 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(); + + keyId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.class, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder.class); + } + + public static final int KEY_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object keyId_; + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * Encryption will always take the latest version of the key and hence
+   * specific version is not supported.
+   * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + @java.lang.Override + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * Encryption will always take the latest version of the key and hence
+   * specific version is not supported.
+   * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, keyId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, keyId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption other = + (com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) obj; + + if (!getKeyId().equals(other.getKeyId())) 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) + KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption 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; + } + /** + * + * + *
+   * Configuration related to application-layer secrets encryption.
+   * Anthos clusters on Azure encrypts your Kubernetes data at rest
+   * in etcd using Azure Key Vault.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.class, + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.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(); + keyId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption build() { + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption result = + new com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(this); + result.keyId_ = keyId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.getDefaultInstance()) + return this; + if (!other.getKeyId().isEmpty()) { + keyId_ = other.keyId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyId_ = ""; + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * Encryption will always take the latest version of the key and hence
+     * specific version is not supported.
+     * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * Encryption will always take the latest version of the key and hence
+     * specific version is not supported.
+     * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * Encryption will always take the latest version of the key and hence
+     * specific version is not supported.
+     * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * Encryption will always take the latest version of the key and hence
+     * specific version is not supported.
+     * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyId() { + + keyId_ = getDefaultInstance().getKeyId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+     * For example:
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+     * Encryption will always take the latest version of the key and hence
+     * specific version is not supported.
+     * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + private static final com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureDatabaseEncryption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureDatabaseEncryption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryptionOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryptionOrBuilder.java new file mode 100644 index 0000000..74fa6c0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDatabaseEncryptionOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureDatabaseEncryptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * Encryption will always take the latest version of the key and hence
+   * specific version is not supported.
+   * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + java.lang.String getKeyId(); + /** + * + * + *
+   * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data.
+   * For example:
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-id>/providers/Microsoft.KeyVault/vaults/<key-vault-id>/keys/<key-name>`
+   * Encryption will always take the latest version of the key and hence
+   * specific version is not supported.
+   * 
+ * + * string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + com.google.protobuf.ByteString getKeyIdBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplate.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplate.java new file mode 100644 index 0000000..edf9bec --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplate.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration for Azure Disks.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureDiskTemplate} + */ +public final class AzureDiskTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureDiskTemplate) + AzureDiskTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureDiskTemplate.newBuilder() to construct. + private AzureDiskTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureDiskTemplate() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureDiskTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureDiskTemplate( + 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: + { + sizeGib_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.class, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder.class); + } + + public static final int SIZE_GIB_FIELD_NUMBER = 1; + private int sizeGib_; + /** + * + * + *
+   * Optional. The size of the disk, in GiBs.
+   * When unspecified, a default value is provided. See the specific reference
+   * in the parent resource.
+   * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + @java.lang.Override + public int getSizeGib() { + return sizeGib_; + } + + 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 (sizeGib_ != 0) { + output.writeInt32(1, sizeGib_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sizeGib_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sizeGib_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureDiskTemplate)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate other = + (com.google.cloud.gkemulticloud.v1.AzureDiskTemplate) obj; + + if (getSizeGib() != other.getSizeGib()) 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) + SIZE_GIB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGib(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate 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; + } + /** + * + * + *
+   * Configuration for Azure Disks.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureDiskTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureDiskTemplate) + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.class, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.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(); + sizeGib_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate build() { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate result = + new com.google.cloud.gkemulticloud.v1.AzureDiskTemplate(this); + result.sizeGib_ = sizeGib_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureDiskTemplate) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureDiskTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance()) + return this; + if (other.getSizeGib() != 0) { + setSizeGib(other.getSizeGib()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureDiskTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sizeGib_; + /** + * + * + *
+     * Optional. The size of the disk, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + @java.lang.Override + public int getSizeGib() { + return sizeGib_; + } + /** + * + * + *
+     * Optional. The size of the disk, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sizeGib to set. + * @return This builder for chaining. + */ + public Builder setSizeGib(int value) { + + sizeGib_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The size of the disk, in GiBs.
+     * When unspecified, a default value is provided. See the specific reference
+     * in the parent resource.
+     * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSizeGib() { + + sizeGib_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureDiskTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureDiskTemplate) + private static final com.google.cloud.gkemulticloud.v1.AzureDiskTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureDiskTemplate(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureDiskTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureDiskTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplateOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplateOrBuilder.java new file mode 100644 index 0000000..9d4fdeb --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureDiskTemplateOrBuilder.java @@ -0,0 +1,40 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureDiskTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureDiskTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The size of the disk, in GiBs.
+   * When unspecified, a default value is provided. See the specific reference
+   * in the parent resource.
+   * 
+ * + * int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sizeGib. + */ + int getSizeGib(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfo.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfo.java new file mode 100644 index 0000000..d23a194 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfo.java @@ -0,0 +1,639 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Information about a supported Kubernetes version.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} + */ +public final class AzureK8sVersionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + AzureK8sVersionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureK8sVersionInfo.newBuilder() to construct. + private AzureK8sVersionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureK8sVersionInfo() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureK8sVersionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureK8sVersionInfo( + 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(); + + version_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.class, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+   * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+   * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+   * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+   * 
+ * + * string version = 1; + * + * @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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.cloud.gkemulticloud.v1.AzureK8sVersionInfo)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo other = + (com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) obj; + + 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo 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; + } + /** + * + * + *
+   * Information about a supported Kubernetes version.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.class, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.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(); + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo build() { + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo result = + new com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(this); + 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.cloud.gkemulticloud.v1.AzureK8sVersionInfo) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.getDefaultInstance()) + return this; + 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.cloud.gkemulticloud.v1.AzureK8sVersionInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+     * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+     * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+     * 
+ * + * string version = 1; + * + * @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; + } + } + /** + * + * + *
+     * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+     * 
+ * + * string version = 1; + * + * @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; + } + /** + * + * + *
+     * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+     * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+     * 
+ * + * string version = 1; + * + * @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.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + private static final com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureK8sVersionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureK8sVersionInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfoOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfoOrBuilder.java new file mode 100644 index 0000000..61b1b23 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureK8sVersionInfoOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureK8sVersionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * A supported Kubernetes version (for example, `1.19.10-gke.1000`)
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfig.java new file mode 100644 index 0000000..de75c6f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfig.java @@ -0,0 +1,3321 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Parameters that describe the configuration of all node machines
+ * on a given node pool.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodeConfig} + */ +public final class AzureNodeConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureNodeConfig) + AzureNodeConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureNodeConfig.newBuilder() to construct. + private AzureNodeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureNodeConfig() { + vmSize_ = ""; + imageType_ = ""; + taints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureNodeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureNodeConfig( + 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(); + + vmSize_ = s; + break; + } + case 18: + { + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder subBuilder = null; + if (rootVolume_ != null) { + subBuilder = rootVolume_.toBuilder(); + } + rootVolume_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rootVolume_); + rootVolume_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = + com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tags_.getMutableMap().put(tags__.getKey(), tags__.getValue()); + break; + } + case 58: + { + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder subBuilder = null; + if (sshConfig_ != null) { + subBuilder = sshConfig_.toBuilder(); + } + sshConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sshConfig_); + sshConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageType_ = s; + break; + } + case 74: + { + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder subBuilder = null; + if (proxyConfig_ != null) { + subBuilder = proxyConfig_.toBuilder(); + } + proxyConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proxyConfig_); + proxyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + taints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + taints_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.NodeTaint.parser(), extensionRegistry)); + break; + } + case 90: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 98: + { + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder subBuilder = null; + if (configEncryption_ != null) { + subBuilder = configEncryption_.toBuilder(); + } + configEncryption_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configEncryption_); + configEncryption_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + taints_ = java.util.Collections.unmodifiableList(taints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTags(); + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.class, + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder.class); + } + + public static final int VM_SIZE_FIELD_NUMBER = 1; + private volatile java.lang.Object vmSize_; + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * See [Supported VM
+   * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + @java.lang.Override + public java.lang.String getVmSize() { + java.lang.Object ref = vmSize_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmSize_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * See [Supported VM
+   * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmSizeBytes() { + java.lang.Object ref = vmSize_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_VOLUME_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate rootVolume_; + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + @java.lang.Override + public boolean hasRootVolume() { + return rootVolume_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume() { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder() { + return getRootVolume(); + } + + public static final int TAGS_FIELD_NUMBER = 3; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IMAGE_TYPE_FIELD_NUMBER = 8; + private volatile java.lang.Object imageType_; + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + @java.lang.Override + public java.lang.String getImageType() { + java.lang.Object ref = imageType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageTypeBytes() { + java.lang.Object ref = imageType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSH_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.gkemulticloud.v1.AzureSshConfig sshConfig_; + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + @java.lang.Override + public boolean hasSshConfig() { + return sshConfig_ != null; + } + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig() { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder() { + return getSshConfig(); + } + + public static final int PROXY_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.gkemulticloud.v1.AzureProxyConfig proxyConfig_; + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + @java.lang.Override + public boolean hasProxyConfig() { + return proxyConfig_ != null; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig() { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder() { + return getProxyConfig(); + } + + public static final int CONFIG_ENCRYPTION_FIELD_NUMBER = 12; + private com.google.cloud.gkemulticloud.v1.AzureConfigEncryption configEncryption_; + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + @java.lang.Override + public boolean hasConfigEncryption() { + return configEncryption_ != null; + } + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + return getConfigEncryption(); + } + + public static final int TAINTS_FIELD_NUMBER = 10; + private java.util.List taints_; + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getTaintsList() { + return taints_; + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getTaintsOrBuilderList() { + return taints_; + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getTaintsCount() { + return taints_.size(); + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index) { + return taints_.get(index); + } + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index) { + return taints_.get(index); + } + + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmSize_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmSize_); + } + if (rootVolume_ != null) { + output.writeMessage(2, getRootVolume()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 3); + if (sshConfig_ != null) { + output.writeMessage(7, getSshConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, imageType_); + } + if (proxyConfig_ != null) { + output.writeMessage(9, getProxyConfig()); + } + for (int i = 0; i < taints_.size(); i++) { + output.writeMessage(10, taints_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + if (configEncryption_ != null) { + output.writeMessage(12, getConfigEncryption()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmSize_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmSize_); + } + if (rootVolume_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRootVolume()); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, tags__); + } + if (sshConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSshConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, imageType_); + } + if (proxyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getProxyConfig()); + } + for (int i = 0; i < taints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, taints_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + if (configEncryption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getConfigEncryption()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureNodeConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureNodeConfig other = + (com.google.cloud.gkemulticloud.v1.AzureNodeConfig) obj; + + if (!getVmSize().equals(other.getVmSize())) return false; + if (hasRootVolume() != other.hasRootVolume()) return false; + if (hasRootVolume()) { + if (!getRootVolume().equals(other.getRootVolume())) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; + if (!getImageType().equals(other.getImageType())) return false; + if (hasSshConfig() != other.hasSshConfig()) return false; + if (hasSshConfig()) { + if (!getSshConfig().equals(other.getSshConfig())) return false; + } + if (hasProxyConfig() != other.hasProxyConfig()) return false; + if (hasProxyConfig()) { + if (!getProxyConfig().equals(other.getProxyConfig())) return false; + } + if (hasConfigEncryption() != other.hasConfigEncryption()) return false; + if (hasConfigEncryption()) { + if (!getConfigEncryption().equals(other.getConfigEncryption())) return false; + } + if (!getTaintsList().equals(other.getTaintsList())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + VM_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getVmSize().hashCode(); + if (hasRootVolume()) { + hash = (37 * hash) + ROOT_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getRootVolume().hashCode(); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } + hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getImageType().hashCode(); + if (hasSshConfig()) { + hash = (37 * hash) + SSH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSshConfig().hashCode(); + } + if (hasProxyConfig()) { + hash = (37 * hash) + PROXY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProxyConfig().hashCode(); + } + if (hasConfigEncryption()) { + hash = (37 * hash) + CONFIG_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + getConfigEncryption().hashCode(); + } + if (getTaintsCount() > 0) { + hash = (37 * hash) + TAINTS_FIELD_NUMBER; + hash = (53 * hash) + getTaintsList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureNodeConfig 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; + } + /** + * + * + *
+   * Parameters that describe the configuration of all node machines
+   * on a given node pool.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodeConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureNodeConfig) + com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTags(); + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableTags(); + case 11: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.class, + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureNodeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaintsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + vmSize_ = ""; + + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + internalGetMutableTags().clear(); + imageType_ = ""; + + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + if (taintsBuilder_ == null) { + taints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + taintsBuilder_.clear(); + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureNodeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig build() { + com.google.cloud.gkemulticloud.v1.AzureNodeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureNodeConfig result = + new com.google.cloud.gkemulticloud.v1.AzureNodeConfig(this); + int from_bitField0_ = bitField0_; + result.vmSize_ = vmSize_; + if (rootVolumeBuilder_ == null) { + result.rootVolume_ = rootVolume_; + } else { + result.rootVolume_ = rootVolumeBuilder_.build(); + } + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + result.imageType_ = imageType_; + if (sshConfigBuilder_ == null) { + result.sshConfig_ = sshConfig_; + } else { + result.sshConfig_ = sshConfigBuilder_.build(); + } + if (proxyConfigBuilder_ == null) { + result.proxyConfig_ = proxyConfig_; + } else { + result.proxyConfig_ = proxyConfigBuilder_.build(); + } + if (configEncryptionBuilder_ == null) { + result.configEncryption_ = configEncryption_; + } else { + result.configEncryption_ = configEncryptionBuilder_.build(); + } + if (taintsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + taints_ = java.util.Collections.unmodifiableList(taints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.taints_ = taints_; + } else { + result.taints_ = taintsBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.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.cloud.gkemulticloud.v1.AzureNodeConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureNodeConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureNodeConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureNodeConfig.getDefaultInstance()) + return this; + if (!other.getVmSize().isEmpty()) { + vmSize_ = other.vmSize_; + onChanged(); + } + if (other.hasRootVolume()) { + mergeRootVolume(other.getRootVolume()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + if (!other.getImageType().isEmpty()) { + imageType_ = other.imageType_; + onChanged(); + } + if (other.hasSshConfig()) { + mergeSshConfig(other.getSshConfig()); + } + if (other.hasProxyConfig()) { + mergeProxyConfig(other.getProxyConfig()); + } + if (other.hasConfigEncryption()) { + mergeConfigEncryption(other.getConfigEncryption()); + } + if (taintsBuilder_ == null) { + if (!other.taints_.isEmpty()) { + if (taints_.isEmpty()) { + taints_ = other.taints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTaintsIsMutable(); + taints_.addAll(other.taints_); + } + onChanged(); + } + } else { + if (!other.taints_.isEmpty()) { + if (taintsBuilder_.isEmpty()) { + taintsBuilder_.dispose(); + taintsBuilder_ = null; + taints_ = other.taints_; + bitField0_ = (bitField0_ & ~0x00000002); + taintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaintsFieldBuilder() + : null; + } else { + taintsBuilder_.addAllMessages(other.taints_); + } + } + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureNodeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureNodeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object vmSize_ = ""; + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * See [Supported VM
+     * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + public java.lang.String getVmSize() { + java.lang.Object ref = vmSize_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmSize_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * See [Supported VM
+     * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + public com.google.protobuf.ByteString getVmSizeBytes() { + java.lang.Object ref = vmSize_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmSize_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * See [Supported VM
+     * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vmSize to set. + * @return This builder for chaining. + */ + public Builder setVmSize(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * See [Supported VM
+     * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVmSize() { + + vmSize_ = getDefaultInstance().getVmSize(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+     * See [Supported VM
+     * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+     * When unspecified, it defaults to `Standard_DS2_v2`.
+     * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for vmSize to set. + * @return This builder for chaining. + */ + public Builder setVmSizeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmSize_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureDiskTemplate rootVolume_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + rootVolumeBuilder_; + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + public boolean hasRootVolume() { + return rootVolumeBuilder_ != null || rootVolume_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume() { + if (rootVolumeBuilder_ == null) { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } else { + return rootVolumeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (rootVolumeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rootVolume_ = value; + onChanged(); + } else { + rootVolumeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRootVolume( + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder builderForValue) { + if (rootVolumeBuilder_ == null) { + rootVolume_ = builderForValue.build(); + onChanged(); + } else { + rootVolumeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRootVolume(com.google.cloud.gkemulticloud.v1.AzureDiskTemplate value) { + if (rootVolumeBuilder_ == null) { + if (rootVolume_ != null) { + rootVolume_ = + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.newBuilder(rootVolume_) + .mergeFrom(value) + .buildPartial(); + } else { + rootVolume_ = value; + } + onChanged(); + } else { + rootVolumeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRootVolume() { + if (rootVolumeBuilder_ == null) { + rootVolume_ = null; + onChanged(); + } else { + rootVolume_ = null; + rootVolumeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder getRootVolumeBuilder() { + + onChanged(); + return getRootVolumeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder() { + if (rootVolumeBuilder_ != null) { + return rootVolumeBuilder_.getMessageOrBuilder(); + } else { + return rootVolume_ == null + ? com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.getDefaultInstance() + : rootVolume_; + } + } + /** + * + * + *
+     * Optional. Configuration related to the root volume provisioned for each
+     * node pool machine.
+     * When unspecified, it defaults to a 32-GiB Azure Disk.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder> + getRootVolumeFieldBuilder() { + if (rootVolumeBuilder_ == null) { + rootVolumeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate.Builder, + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder>( + getRootVolume(), getParentForChildren(), isClean()); + rootVolume_ = null; + } + return rootVolumeBuilder_; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + onChanged(); + ; + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + internalGetMutableTags().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + return internalGetMutableTags().getMutableMap(); + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableTags().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. A set of tags to apply to all underlying Azure resources for this node
+     * pool. This currently only includes Virtual Machine Scale Sets.
+     * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+     * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+     * 255 Unicode characters.
+     * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object imageType_ = ""; + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + public java.lang.String getImageType() { + java.lang.Object ref = imageType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + public com.google.protobuf.ByteString getImageTypeBytes() { + java.lang.Object ref = imageType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The imageType to set. + * @return This builder for chaining. + */ + public Builder setImageType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImageType() { + + imageType_ = getDefaultInstance().getImageType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The OS image type to use on node pool instances.
+     * Can have a value of `ubuntu`, or `windows` if the cluster enables
+     * the Windows node pool preview feature.
+     * When unspecified, it defaults to `ubuntu`.
+     * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for imageType to set. + * @return This builder for chaining. + */ + public Builder setImageTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureSshConfig sshConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder> + sshConfigBuilder_; + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + public boolean hasSshConfig() { + return sshConfigBuilder_ != null || sshConfig_ != null; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig() { + if (sshConfigBuilder_ == null) { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } else { + return sshConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSshConfig(com.google.cloud.gkemulticloud.v1.AzureSshConfig value) { + if (sshConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sshConfig_ = value; + onChanged(); + } else { + sshConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSshConfig( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder builderForValue) { + if (sshConfigBuilder_ == null) { + sshConfig_ = builderForValue.build(); + onChanged(); + } else { + sshConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSshConfig(com.google.cloud.gkemulticloud.v1.AzureSshConfig value) { + if (sshConfigBuilder_ == null) { + if (sshConfig_ != null) { + sshConfig_ = + com.google.cloud.gkemulticloud.v1.AzureSshConfig.newBuilder(sshConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sshConfig_ = value; + } + onChanged(); + } else { + sshConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSshConfig() { + if (sshConfigBuilder_ == null) { + sshConfig_ = null; + onChanged(); + } else { + sshConfig_ = null; + sshConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder getSshConfigBuilder() { + + onChanged(); + return getSshConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder() { + if (sshConfigBuilder_ != null) { + return sshConfigBuilder_.getMessageOrBuilder(); + } else { + return sshConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance() + : sshConfig_; + } + } + /** + * + * + *
+     * Required. SSH configuration for how to access the node pool machines.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder> + getSshConfigFieldBuilder() { + if (sshConfigBuilder_ == null) { + sshConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureSshConfig, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder>( + getSshConfig(), getParentForChildren(), isClean()); + sshConfig_ = null; + } + return sshConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureProxyConfig proxyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder> + proxyConfigBuilder_; + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + public boolean hasProxyConfig() { + return proxyConfigBuilder_ != null || proxyConfig_ != null; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig() { + if (proxyConfigBuilder_ == null) { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } else { + return proxyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig(com.google.cloud.gkemulticloud.v1.AzureProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proxyConfig_ = value; + onChanged(); + } else { + proxyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProxyConfig( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder builderForValue) { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = builderForValue.build(); + onChanged(); + } else { + proxyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProxyConfig(com.google.cloud.gkemulticloud.v1.AzureProxyConfig value) { + if (proxyConfigBuilder_ == null) { + if (proxyConfig_ != null) { + proxyConfig_ = + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.newBuilder(proxyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + proxyConfig_ = value; + } + onChanged(); + } else { + proxyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProxyConfig() { + if (proxyConfigBuilder_ == null) { + proxyConfig_ = null; + onChanged(); + } else { + proxyConfig_ = null; + proxyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder getProxyConfigBuilder() { + + onChanged(); + return getProxyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder() { + if (proxyConfigBuilder_ != null) { + return proxyConfigBuilder_.getMessageOrBuilder(); + } else { + return proxyConfig_ == null + ? com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance() + : proxyConfig_; + } + } + /** + * + * + *
+     * Optional. Proxy configuration for outbound HTTP(S) traffic.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder> + getProxyConfigFieldBuilder() { + if (proxyConfigBuilder_ == null) { + proxyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureProxyConfig, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder>( + getProxyConfig(), getParentForChildren(), isClean()); + proxyConfig_ = null; + } + return proxyConfigBuilder_; + } + + private com.google.cloud.gkemulticloud.v1.AzureConfigEncryption configEncryption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder> + configEncryptionBuilder_; + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + public boolean hasConfigEncryption() { + return configEncryptionBuilder_ != null || configEncryption_ != null; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() { + if (configEncryptionBuilder_ == null) { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } else { + return configEncryptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configEncryption_ = value; + onChanged(); + } else { + configEncryptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder builderForValue) { + if (configEncryptionBuilder_ == null) { + configEncryption_ = builderForValue.build(); + onChanged(); + } else { + configEncryptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConfigEncryption( + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption value) { + if (configEncryptionBuilder_ == null) { + if (configEncryption_ != null) { + configEncryption_ = + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.newBuilder(configEncryption_) + .mergeFrom(value) + .buildPartial(); + } else { + configEncryption_ = value; + } + onChanged(); + } else { + configEncryptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConfigEncryption() { + if (configEncryptionBuilder_ == null) { + configEncryption_ = null; + onChanged(); + } else { + configEncryption_ = null; + configEncryptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder + getConfigEncryptionBuilder() { + + onChanged(); + return getConfigEncryptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder + getConfigEncryptionOrBuilder() { + if (configEncryptionBuilder_ != null) { + return configEncryptionBuilder_.getMessageOrBuilder(); + } else { + return configEncryption_ == null + ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() + : configEncryption_; + } + } + /** + * + * + *
+     * Optional. Configuration related to vm config encryption.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder> + getConfigEncryptionFieldBuilder() { + if (configEncryptionBuilder_ == null) { + configEncryptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder, + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder>( + getConfigEncryption(), getParentForChildren(), isClean()); + configEncryption_ = null; + } + return configEncryptionBuilder_; + } + + private java.util.List taints_ = + java.util.Collections.emptyList(); + + private void ensureTaintsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + taints_ = new java.util.ArrayList(taints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder> + taintsBuilder_; + + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getTaintsList() { + if (taintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(taints_); + } else { + return taintsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getTaintsCount() { + if (taintsBuilder_ == null) { + return taints_.size(); + } else { + return taintsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index) { + if (taintsBuilder_ == null) { + return taints_.get(index); + } else { + return taintsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTaints(int index, com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.set(index, value); + onChanged(); + } else { + taintsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTaints( + int index, com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.set(index, builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.add(value); + onChanged(); + } else { + taintsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(int index, com.google.cloud.gkemulticloud.v1.NodeTaint value) { + if (taintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaintsIsMutable(); + taints_.add(index, value); + onChanged(); + } else { + taintsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints(com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.add(builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addTaints( + int index, com.google.cloud.gkemulticloud.v1.NodeTaint.Builder builderForValue) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.add(index, builderForValue.build()); + onChanged(); + } else { + taintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllTaints( + java.lang.Iterable values) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taints_); + onChanged(); + } else { + taintsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTaints() { + if (taintsBuilder_ == null) { + taints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + taintsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTaints(int index) { + if (taintsBuilder_ == null) { + ensureTaintsIsMutable(); + taints_.remove(index); + onChanged(); + } else { + taintsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder getTaintsBuilder(int index) { + return getTaintsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index) { + if (taintsBuilder_ == null) { + return taints_.get(index); + } else { + return taintsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTaintsOrBuilderList() { + if (taintsBuilder_ != null) { + return taintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taints_); + } + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder addTaintsBuilder() { + return getTaintsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gkemulticloud.v1.NodeTaint.Builder addTaintsBuilder(int index) { + return getTaintsFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The initial taints assigned to nodes of this node pool.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getTaintsBuilderList() { + return getTaintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder> + getTaintsFieldBuilder() { + if (taintsBuilder_ == null) { + taintsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.NodeTaint, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder, + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder>( + taints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + taints_ = null; + } + return taintsBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The initial labels assigned to nodes of this node pool. An object
+     * containing a list of "key": value pairs. Example: { "name": "wrench",
+     * "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().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.cloud.gkemulticloud.v1.AzureNodeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureNodeConfig) + private static final com.google.cloud.gkemulticloud.v1.AzureNodeConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureNodeConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureNodeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureNodeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfigOrBuilder.java new file mode 100644 index 0000000..ec726c5 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodeConfigOrBuilder.java @@ -0,0 +1,467 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureNodeConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureNodeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * See [Supported VM
+   * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vmSize. + */ + java.lang.String getVmSize(); + /** + * + * + *
+   * Optional. The Azure VM size name. Example: `Standard_DS2_v2`.
+   * See [Supported VM
+   * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options.
+   * When unspecified, it defaults to `Standard_DS2_v2`.
+   * 
+ * + * string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vmSize. + */ + com.google.protobuf.ByteString getVmSizeBytes(); + + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rootVolume field is set. + */ + boolean hasRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootVolume. + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplate getRootVolume(); + /** + * + * + *
+   * Optional. Configuration related to the root volume provisioned for each
+   * node pool machine.
+   * When unspecified, it defaults to a 32-GiB Azure Disk.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureDiskTemplateOrBuilder getRootVolumeOrBuilder(); + + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsTags(java.lang.String key); + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getTagsMap(); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. A set of tags to apply to all underlying Azure resources for this node
+   * pool. This currently only includes Virtual Machine Scale Sets.
+   * Specify at most 50 pairs containing alphanumerics, spaces, and symbols
+   * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
+   * 255 Unicode characters.
+   * 
+ * + * map<string, string> tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getTagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageType. + */ + java.lang.String getImageType(); + /** + * + * + *
+   * Optional. The OS image type to use on node pool instances.
+   * Can have a value of `ubuntu`, or `windows` if the cluster enables
+   * the Windows node pool preview feature.
+   * When unspecified, it defaults to `ubuntu`.
+   * 
+ * + * string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageType. + */ + com.google.protobuf.ByteString getImageTypeBytes(); + + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sshConfig field is set. + */ + boolean hasSshConfig(); + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sshConfig. + */ + com.google.cloud.gkemulticloud.v1.AzureSshConfig getSshConfig(); + /** + * + * + *
+   * Required. SSH configuration for how to access the node pool machines.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder getSshConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the proxyConfig field is set. + */ + boolean hasProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The proxyConfig. + */ + com.google.cloud.gkemulticloud.v1.AzureProxyConfig getProxyConfig(); + /** + * + * + *
+   * Optional. Proxy configuration for outbound HTTP(S) traffic.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder getProxyConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the configEncryption field is set. + */ + boolean hasConfigEncryption(); + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configEncryption. + */ + com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption(); + /** + * + * + *
+   * Optional. Configuration related to vm config encryption.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureConfigEncryptionOrBuilder getConfigEncryptionOrBuilder(); + + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getTaintsList(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.NodeTaint getTaints(int index); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTaintsCount(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getTaintsOrBuilderList(); + /** + * + * + *
+   * Optional. The initial taints assigned to nodes of this node pool.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder getTaintsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The initial labels assigned to nodes of this node pool. An object
+   * containing a list of "key": value pairs. Example: { "name": "wrench",
+   * "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePool.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePool.java new file mode 100644 index 0000000..2ccce88 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePool.java @@ -0,0 +1,4046 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * An Anthos node pool running on Azure.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodePool} + */ +public final class AzureNodePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureNodePool) + AzureNodePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureNodePool.newBuilder() to construct. + private AzureNodePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureNodePool() { + name_ = ""; + version_ = ""; + subnetId_ = ""; + state_ = 0; + uid_ = ""; + etag_ = ""; + azureAvailabilityZone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureNodePool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureNodePool( + 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(); + + version_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetId_ = s; + break; + } + case 34: + { + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder subBuilder = null; + if (autoscaling_ != null) { + subBuilder = autoscaling_.toBuilder(); + } + autoscaling_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(autoscaling_); + autoscaling_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 72: + { + reconciling_ = input.readBool(); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 106: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 170: + { + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder subBuilder = null; + if (maxPodsConstraint_ != null) { + subBuilder = maxPodsConstraint_.toBuilder(); + } + maxPodsConstraint_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxPodsConstraint_); + maxPodsConstraint_ = subBuilder.buildPartial(); + } + + break; + } + case 178: + { + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureAvailabilityZone_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 13: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodePool.class, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder.class); + } + + /** + * + * + *
+   * The lifecycle state of the node pool.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.AzureNodePool.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the node pool is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the node pool has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The RECONCILING state indicates that the node pool is being reconciled.
+     * 
+ * + * RECONCILING = 3; + */ + RECONCILING(3), + /** + * + * + *
+     * The STOPPING state indicates the node pool is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The ERROR state indicates the node pool is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * The DEGRADED state indicates the node pool requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + DEGRADED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the node pool is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the node pool has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The RECONCILING state indicates that the node pool is being reconciled.
+     * 
+ * + * RECONCILING = 3; + */ + public static final int RECONCILING_VALUE = 3; + /** + * + * + *
+     * The STOPPING state indicates the node pool is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The ERROR state indicates the node pool is in a broken unrecoverable
+     * state.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The DEGRADED state indicates the node pool requires user action to
+     * restore full functionality.
+     * 
+ * + * DEGRADED = 6; + */ + public static final int DEGRADED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return RUNNING; + case 3: + return RECONCILING; + case 4: + return STOPPING; + case 5: + return ERROR; + case 6: + return DEGRADED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureNodePool.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.AzureNodePool.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * 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_; + /** + * + * + *
+   * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int CONFIG_FIELD_NUMBER = 22; + private com.google.cloud.gkemulticloud.v1.AzureNodeConfig config_; + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig getConfig() { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodeConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + public static final int SUBNET_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object subnetId_; + /** + * + * + *
+   * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+   * subnet under the virtual network in the cluster configuration.
+   * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + @java.lang.Override + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+   * subnet under the virtual network in the cluster configuration.
+   * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOSCALING_FIELD_NUMBER = 4; + private com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling_; + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + @java.lang.Override + public boolean hasAutoscaling() { + return autoscaling_ != null; + } + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getAutoscaling() { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder + getAutoscalingOrBuilder() { + return getAutoscaling(); + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_; + /** + * + * + *
+   * Output only. The current state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AzureNodePool.State result = + com.google.cloud.gkemulticloud.v1.AzureNodePool.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.State.UNRECOGNIZED + : result; + } + + public static final int UID_FIELD_NUMBER = 8; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONCILING_FIELD_NUMBER = 9; + private boolean reconciling_; + /** + * + * + *
+   * Output only. If set, there are currently pending changes to the node
+   * pool.
+   * 
+ * + * bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 12; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 13; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MAX_PODS_CONSTRAINT_FIELD_NUMBER = 21; + private com.google.cloud.gkemulticloud.v1.MaxPodsConstraint maxPodsConstraint_; + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + @java.lang.Override + public boolean hasMaxPodsConstraint() { + return maxPodsConstraint_ != null; + } + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint() { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder + getMaxPodsConstraintOrBuilder() { + return getMaxPodsConstraint(); + } + + public static final int AZURE_AVAILABILITY_ZONE_FIELD_NUMBER = 23; + private volatile java.lang.Object azureAvailabilityZone_; + /** + * + * + *
+   * Optional. The Azure availability zone of the nodes in this nodepool.
+   * When unspecified, it defaults to `1`.
+   * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The azureAvailabilityZone. + */ + @java.lang.Override + public java.lang.String getAzureAvailabilityZone() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureAvailabilityZone_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Azure availability zone of the nodes in this nodepool.
+   * When unspecified, it defaults to `1`.
+   * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for azureAvailabilityZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureAvailabilityZoneBytes() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureAvailabilityZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subnetId_); + } + if (autoscaling_ != null) { + output.writeMessage(4, getAutoscaling()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AzureNodePool.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, uid_); + } + if (reconciling_ != false) { + output.writeBool(9, reconciling_); + } + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 13); + if (maxPodsConstraint_ != null) { + output.writeMessage(21, getMaxPodsConstraint()); + } + if (config_ != null) { + output.writeMessage(22, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureAvailabilityZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, azureAvailabilityZone_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subnetId_); + } + if (autoscaling_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAutoscaling()); + } + if (state_ + != com.google.cloud.gkemulticloud.v1.AzureNodePool.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, uid_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, reconciling_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, annotations__); + } + if (maxPodsConstraint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getMaxPodsConstraint()); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureAvailabilityZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, azureAvailabilityZone_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureNodePool)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureNodePool other = + (com.google.cloud.gkemulticloud.v1.AzureNodePool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getSubnetId().equals(other.getSubnetId())) return false; + if (hasAutoscaling() != other.hasAutoscaling()) return false; + if (hasAutoscaling()) { + if (!getAutoscaling().equals(other.getAutoscaling())) return false; + } + if (state_ != other.state_) return false; + if (!getUid().equals(other.getUid())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasMaxPodsConstraint() != other.hasMaxPodsConstraint()) return false; + if (hasMaxPodsConstraint()) { + if (!getMaxPodsConstraint().equals(other.getMaxPodsConstraint())) return false; + } + if (!getAzureAvailabilityZone().equals(other.getAzureAvailabilityZone())) 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(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubnetId().hashCode(); + if (hasAutoscaling()) { + hash = (37 * hash) + AUTOSCALING_FIELD_NUMBER; + hash = (53 * hash) + getAutoscaling().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasMaxPodsConstraint()) { + hash = (37 * hash) + MAX_PODS_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getMaxPodsConstraint().hashCode(); + } + hash = (37 * hash) + AZURE_AVAILABILITY_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getAzureAvailabilityZone().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureNodePool 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 Anthos node pool running on Azure.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodePool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureNodePool) + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 13: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 13: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodePool.class, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureNodePool.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_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + subnetId_ = ""; + + if (autoscalingBuilder_ == null) { + autoscaling_ = null; + } else { + autoscaling_ = null; + autoscalingBuilder_ = null; + } + state_ = 0; + + uid_ = ""; + + reconciling_ = false; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableAnnotations().clear(); + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = null; + } else { + maxPodsConstraint_ = null; + maxPodsConstraintBuilder_ = null; + } + azureAvailabilityZone_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool build() { + com.google.cloud.gkemulticloud.v1.AzureNodePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureNodePool result = + new com.google.cloud.gkemulticloud.v1.AzureNodePool(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.version_ = version_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + result.subnetId_ = subnetId_; + if (autoscalingBuilder_ == null) { + result.autoscaling_ = autoscaling_; + } else { + result.autoscaling_ = autoscalingBuilder_.build(); + } + result.state_ = state_; + result.uid_ = uid_; + result.reconciling_ = reconciling_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + if (maxPodsConstraintBuilder_ == null) { + result.maxPodsConstraint_ = maxPodsConstraint_; + } else { + result.maxPodsConstraint_ = maxPodsConstraintBuilder_.build(); + } + result.azureAvailabilityZone_ = azureAvailabilityZone_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureNodePool) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureNodePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureNodePool other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getSubnetId().isEmpty()) { + subnetId_ = other.subnetId_; + onChanged(); + } + if (other.hasAutoscaling()) { + mergeAutoscaling(other.getAutoscaling()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + if (other.hasMaxPodsConstraint()) { + mergeMaxPodsConstraint(other.getMaxPodsConstraint()); + } + if (!other.getAzureAvailabilityZone().isEmpty()) { + azureAvailabilityZone_ = other.azureAvailabilityZone_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureNodePool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AzureNodePool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this resource.
+     * Node pool names are formatted as
+     * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * For more details on Google Cloud resource names,
+     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private com.google.cloud.gkemulticloud.v1.AzureNodeConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodeConfig, + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodeConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig(com.google.cloud.gkemulticloud.v1.AzureNodeConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig( + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfig(com.google.cloud.gkemulticloud.v1.AzureNodeConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.newBuilder(config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodeConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Required. The node configuration of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodeConfig, + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodeConfig, + com.google.cloud.gkemulticloud.v1.AzureNodeConfig.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object subnetId_ = ""; + /** + * + * + *
+     * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+     * subnet under the virtual network in the cluster configuration.
+     * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+     * subnet under the virtual network in the cluster configuration.
+     * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+     * subnet under the virtual network in the cluster configuration.
+     * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+     * subnet under the virtual network in the cluster configuration.
+     * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetId() { + + subnetId_ = getDefaultInstance().getSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+     * subnet under the virtual network in the cluster configuration.
+     * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder> + autoscalingBuilder_; + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + public boolean hasAutoscaling() { + return autoscalingBuilder_ != null || autoscaling_ != null; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getAutoscaling() { + if (autoscalingBuilder_ == null) { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } else { + return autoscalingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscaling( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling value) { + if (autoscalingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscaling_ = value; + onChanged(); + } else { + autoscalingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscaling( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder builderForValue) { + if (autoscalingBuilder_ == null) { + autoscaling_ = builderForValue.build(); + onChanged(); + } else { + autoscalingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoscaling( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling value) { + if (autoscalingBuilder_ == null) { + if (autoscaling_ != null) { + autoscaling_ = + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.newBuilder(autoscaling_) + .mergeFrom(value) + .buildPartial(); + } else { + autoscaling_ = value; + } + onChanged(); + } else { + autoscalingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoscaling() { + if (autoscalingBuilder_ == null) { + autoscaling_ = null; + onChanged(); + } else { + autoscaling_ = null; + autoscalingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder + getAutoscalingBuilder() { + + onChanged(); + return getAutoscalingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder + getAutoscalingOrBuilder() { + if (autoscalingBuilder_ != null) { + return autoscalingBuilder_.getMessageOrBuilder(); + } else { + return autoscaling_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.getDefaultInstance() + : autoscaling_; + } + } + /** + * + * + *
+     * Required. Autoscaler configuration for this node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder> + getAutoscalingFieldBuilder() { + if (autoscalingBuilder_ == null) { + autoscalingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder>( + getAutoscaling(), getParentForChildren(), isClean()); + autoscaling_ = null; + } + return autoscalingBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.AzureNodePool.State result = + com.google.cloud.gkemulticloud.v1.AzureNodePool.State.valueOf(state_); + return result == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gkemulticloud.v1.AzureNodePool.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A globally unique identifier for the node pool.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private boolean reconciling_; + /** + * + * + *
+     * Output only. If set, there are currently pending changes to the node
+     * pool.
+     * 
+ * + * bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + /** + * + * + *
+     * Output only. If set, there are currently pending changes to the node
+     * pool.
+     * 
+ * + * bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If set, there are currently pending changes to the node
+     * pool.
+     * 
+ * + * bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + + reconciling_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this node pool was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Allows clients to perform consistent read-modify-writes
+     * through optimistic concurrency control.
+     * Can be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Annotations on the node pool.
+     * This field has the same restrictions as Kubernetes annotations.
+     * The total size of all keys and values combined is limited to 256k.
+     * Keys can have 2 segments: prefix (optional) and name (required),
+     * separated by a slash (/).
+     * Prefix must be a DNS subdomain.
+     * Name must be 63 characters or less, begin and end with alphanumerics,
+     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+     * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.gkemulticloud.v1.MaxPodsConstraint maxPodsConstraint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder> + maxPodsConstraintBuilder_; + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + public boolean hasMaxPodsConstraint() { + return maxPodsConstraintBuilder_ != null || maxPodsConstraint_ != null; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint() { + if (maxPodsConstraintBuilder_ == null) { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } else { + return maxPodsConstraintBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaxPodsConstraint(com.google.cloud.gkemulticloud.v1.MaxPodsConstraint value) { + if (maxPodsConstraintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxPodsConstraint_ = value; + onChanged(); + } else { + maxPodsConstraintBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaxPodsConstraint( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder builderForValue) { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = builderForValue.build(); + onChanged(); + } else { + maxPodsConstraintBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMaxPodsConstraint( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint value) { + if (maxPodsConstraintBuilder_ == null) { + if (maxPodsConstraint_ != null) { + maxPodsConstraint_ = + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.newBuilder(maxPodsConstraint_) + .mergeFrom(value) + .buildPartial(); + } else { + maxPodsConstraint_ = value; + } + onChanged(); + } else { + maxPodsConstraintBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMaxPodsConstraint() { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraint_ = null; + onChanged(); + } else { + maxPodsConstraint_ = null; + maxPodsConstraintBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder + getMaxPodsConstraintBuilder() { + + onChanged(); + return getMaxPodsConstraintFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder + getMaxPodsConstraintOrBuilder() { + if (maxPodsConstraintBuilder_ != null) { + return maxPodsConstraintBuilder_.getMessageOrBuilder(); + } else { + return maxPodsConstraint_ == null + ? com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance() + : maxPodsConstraint_; + } + } + /** + * + * + *
+     * Required. The constraint on the maximum number of pods that can be run
+     * simultaneously on a node in the node pool.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder> + getMaxPodsConstraintFieldBuilder() { + if (maxPodsConstraintBuilder_ == null) { + maxPodsConstraintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder>( + getMaxPodsConstraint(), getParentForChildren(), isClean()); + maxPodsConstraint_ = null; + } + return maxPodsConstraintBuilder_; + } + + private java.lang.Object azureAvailabilityZone_ = ""; + /** + * + * + *
+     * Optional. The Azure availability zone of the nodes in this nodepool.
+     * When unspecified, it defaults to `1`.
+     * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The azureAvailabilityZone. + */ + public java.lang.String getAzureAvailabilityZone() { + java.lang.Object ref = azureAvailabilityZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureAvailabilityZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Azure availability zone of the nodes in this nodepool.
+     * When unspecified, it defaults to `1`.
+     * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for azureAvailabilityZone. + */ + public com.google.protobuf.ByteString getAzureAvailabilityZoneBytes() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureAvailabilityZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Azure availability zone of the nodes in this nodepool.
+     * When unspecified, it defaults to `1`.
+     * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The azureAvailabilityZone to set. + * @return This builder for chaining. + */ + public Builder setAzureAvailabilityZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureAvailabilityZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure availability zone of the nodes in this nodepool.
+     * When unspecified, it defaults to `1`.
+     * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAzureAvailabilityZone() { + + azureAvailabilityZone_ = getDefaultInstance().getAzureAvailabilityZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Azure availability zone of the nodes in this nodepool.
+     * When unspecified, it defaults to `1`.
+     * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for azureAvailabilityZone to set. + * @return This builder for chaining. + */ + public Builder setAzureAvailabilityZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureAvailabilityZone_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureNodePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureNodePool) + private static final com.google.cloud.gkemulticloud.v1.AzureNodePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureNodePool(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureNodePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureNodePool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscaling.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscaling.java new file mode 100644 index 0000000..68bfc29 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscaling.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration related to Kubernetes cluster autoscaler.
+ * The Kubernetes cluster autoscaler will automatically adjust the
+ * size of the node pool based on the cluster load.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} + */ +public final class AzureNodePoolAutoscaling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + AzureNodePoolAutoscalingOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureNodePoolAutoscaling.newBuilder() to construct. + private AzureNodePoolAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureNodePoolAutoscaling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureNodePoolAutoscaling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureNodePoolAutoscaling( + 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: + { + minNodeCount_ = input.readInt32(); + break; + } + case 16: + { + maxNodeCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.class, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder.class); + } + + public static final int MIN_NODE_COUNT_FIELD_NUMBER = 1; + private int minNodeCount_; + /** + * + * + *
+   * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+   * 1 and less than or equal to max_node_count.
+   * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + + public static final int MAX_NODE_COUNT_FIELD_NUMBER = 2; + private int maxNodeCount_; + /** + * + * + *
+   * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+   * min_node_count and less than or equal to 50.
+   * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + + 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 (minNodeCount_ != 0) { + output.writeInt32(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + output.writeInt32(2, maxNodeCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minNodeCount_); + } + if (maxNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxNodeCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling other = + (com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) obj; + + if (getMinNodeCount() != other.getMinNodeCount()) return false; + if (getMaxNodeCount() != other.getMaxNodeCount()) 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) + MIN_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinNodeCount(); + hash = (37 * hash) + MAX_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxNodeCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling 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; + } + /** + * + * + *
+   * Configuration related to Kubernetes cluster autoscaler.
+   * The Kubernetes cluster autoscaler will automatically adjust the
+   * size of the node pool based on the cluster load.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.class, + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.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(); + minNodeCount_ = 0; + + maxNodeCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling build() { + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling result = + new com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(this); + result.minNodeCount_ = minNodeCount_; + result.maxNodeCount_ = maxNodeCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.getDefaultInstance()) + return this; + if (other.getMinNodeCount() != 0) { + setMinNodeCount(other.getMinNodeCount()); + } + if (other.getMaxNodeCount() != 0) { + setMaxNodeCount(other.getMaxNodeCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int minNodeCount_; + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + @java.lang.Override + public int getMinNodeCount() { + return minNodeCount_; + } + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMinNodeCount(int value) { + + minNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+     * 1 and less than or equal to max_node_count.
+     * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinNodeCount() { + + minNodeCount_ = 0; + onChanged(); + return this; + } + + private int maxNodeCount_; + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + @java.lang.Override + public int getMaxNodeCount() { + return maxNodeCount_; + } + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMaxNodeCount(int value) { + + maxNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+     * min_node_count and less than or equal to 50.
+     * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxNodeCount() { + + maxNodeCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + private static final com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureNodePoolAutoscaling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureNodePoolAutoscaling(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscalingOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscalingOrBuilder.java new file mode 100644 index 0000000..a0481fc --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolAutoscalingOrBuilder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureNodePoolAutoscalingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Minimum number of nodes in the node pool. Must be greater than or equal to
+   * 1 and less than or equal to max_node_count.
+   * 
+ * + * int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minNodeCount. + */ + int getMinNodeCount(); + + /** + * + * + *
+   * Required. Maximum number of nodes in the node pool. Must be greater than or equal to
+   * min_node_count and less than or equal to 50.
+   * 
+ * + * int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxNodeCount. + */ + int getMaxNodeCount(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolName.java new file mode 100644 index 0000000..02a35fe --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AzureNodePoolName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AZURE_CLUSTER_AZURE_NODE_POOL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String azureCluster; + private final String azureNodePool; + + @Deprecated + protected AzureNodePoolName() { + project = null; + location = null; + azureCluster = null; + azureNodePool = null; + } + + private AzureNodePoolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + azureCluster = Preconditions.checkNotNull(builder.getAzureCluster()); + azureNodePool = Preconditions.checkNotNull(builder.getAzureNodePool()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureCluster() { + return azureCluster; + } + + public String getAzureNodePool() { + return azureNodePool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AzureNodePoolName of( + String project, String location, String azureCluster, String azureNodePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureCluster(azureCluster) + .setAzureNodePool(azureNodePool) + .build(); + } + + public static String format( + String project, String location, String azureCluster, String azureNodePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAzureCluster(azureCluster) + .setAzureNodePool(azureNodePool) + .build() + .toString(); + } + + public static AzureNodePoolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AZURE_CLUSTER_AZURE_NODE_POOL.validatedMatch( + formattedString, "AzureNodePoolName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("azure_cluster"), + matchMap.get("azure_node_pool")); + } + + 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 (AzureNodePoolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AZURE_CLUSTER_AZURE_NODE_POOL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (azureCluster != null) { + fieldMapBuilder.put("azure_cluster", azureCluster); + } + if (azureNodePool != null) { + fieldMapBuilder.put("azure_node_pool", azureNodePool); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AZURE_CLUSTER_AZURE_NODE_POOL.instantiate( + "project", + project, + "location", + location, + "azure_cluster", + azureCluster, + "azure_node_pool", + azureNodePool); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AzureNodePoolName that = ((AzureNodePoolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.azureCluster, that.azureCluster) + && Objects.equals(this.azureNodePool, that.azureNodePool); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(azureCluster); + h *= 1000003; + h ^= Objects.hashCode(azureNodePool); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}. + */ + public static class Builder { + private String project; + private String location; + private String azureCluster; + private String azureNodePool; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAzureCluster() { + return azureCluster; + } + + public String getAzureNodePool() { + return azureNodePool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAzureCluster(String azureCluster) { + this.azureCluster = azureCluster; + return this; + } + + public Builder setAzureNodePool(String azureNodePool) { + this.azureNodePool = azureNodePool; + return this; + } + + private Builder(AzureNodePoolName azureNodePoolName) { + this.project = azureNodePoolName.project; + this.location = azureNodePoolName.location; + this.azureCluster = azureNodePoolName.azureCluster; + this.azureNodePool = azureNodePoolName.azureNodePool; + } + + public AzureNodePoolName build() { + return new AzureNodePoolName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolOrBuilder.java new file mode 100644 index 0000000..6133d4f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureNodePoolOrBuilder.java @@ -0,0 +1,537 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureNodePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureNodePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this resource.
+   * Node pool names are formatted as
+   * `projects/<project-number>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * For more details on Google Cloud resource names,
+   * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + com.google.cloud.gkemulticloud.v1.AzureNodeConfig getConfig(); + /** + * + * + *
+   * Required. The node configuration of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureNodeConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+   * subnet under the virtual network in the cluster configuration.
+   * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + java.lang.String getSubnetId(); + /** + * + * + *
+   * Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a
+   * subnet under the virtual network in the cluster configuration.
+   * 
+ * + * string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + com.google.protobuf.ByteString getSubnetIdBytes(); + + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoscaling field is set. + */ + boolean hasAutoscaling(); + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscaling. + */ + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling getAutoscaling(); + /** + * + * + *
+   * Required. Autoscaler configuration for this node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscalingOrBuilder getAutoscalingOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gkemulticloud.v1.AzureNodePool.State getState(); + + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. A globally unique identifier for the node pool.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. If set, there are currently pending changes to the node
+   * pool.
+   * 
+ * + * bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this node pool was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Allows clients to perform consistent read-modify-writes
+   * through optimistic concurrency control.
+   * Can be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Annotations on the node pool.
+   * This field has the same restrictions as Kubernetes annotations.
+   * The total size of all keys and values combined is limited to 256k.
+   * Keys can have 2 segments: prefix (optional) and name (required),
+   * separated by a slash (/).
+   * Prefix must be a DNS subdomain.
+   * Name must be 63 characters or less, begin and end with alphanumerics,
+   * with dashes (-), underscores (_), dots (.), and alphanumerics between.
+   * 
+ * + * map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the maxPodsConstraint field is set. + */ + boolean hasMaxPodsConstraint(); + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxPodsConstraint. + */ + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getMaxPodsConstraint(); + /** + * + * + *
+   * Required. The constraint on the maximum number of pods that can be run
+   * simultaneously on a node in the node pool.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder getMaxPodsConstraintOrBuilder(); + + /** + * + * + *
+   * Optional. The Azure availability zone of the nodes in this nodepool.
+   * When unspecified, it defaults to `1`.
+   * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The azureAvailabilityZone. + */ + java.lang.String getAzureAvailabilityZone(); + /** + * + * + *
+   * Optional. The Azure availability zone of the nodes in this nodepool.
+   * When unspecified, it defaults to `1`.
+   * 
+ * + * string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for azureAvailabilityZone. + */ + com.google.protobuf.ByteString getAzureAvailabilityZoneBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfig.java new file mode 100644 index 0000000..7a7274a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfig.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Details of a proxy config stored in Azure Key Vault.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureProxyConfig} + */ +public final class AzureProxyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureProxyConfig) + AzureProxyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureProxyConfig.newBuilder() to construct. + private AzureProxyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureProxyConfig() { + resourceGroupId_ = ""; + secretId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureProxyConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureProxyConfig( + 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(); + + resourceGroupId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + secretId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.class, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder.class); + } + + public static final int RESOURCE_GROUP_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object resourceGroupId_; + /** + * + * + *
+   * The ARM ID the of the resource group containing proxy keyvault.
+   * Resource group ids are formatted as
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+   * 
+ * + * string resource_group_id = 1; + * + * @return The resourceGroupId. + */ + @java.lang.Override + public java.lang.String getResourceGroupId() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * The ARM ID the of the resource group containing proxy keyvault.
+   * Resource group ids are formatted as
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+   * 
+ * + * string resource_group_id = 1; + * + * @return The bytes for resourceGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceGroupIdBytes() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object secretId_; + /** + * + * + *
+   * The URL the of the proxy setting secret with its version.
+   * Secret ids are formatted as
+   * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+   * 
+ * + * string secret_id = 2; + * + * @return The secretId. + */ + @java.lang.Override + public java.lang.String getSecretId() { + java.lang.Object ref = secretId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretId_ = s; + return s; + } + } + /** + * + * + *
+   * The URL the of the proxy setting secret with its version.
+   * Secret ids are formatted as
+   * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+   * 
+ * + * string secret_id = 2; + * + * @return The bytes for secretId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretIdBytes() { + java.lang.Object ref = secretId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secretId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceGroupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secretId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secretId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureProxyConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureProxyConfig other = + (com.google.cloud.gkemulticloud.v1.AzureProxyConfig) obj; + + if (!getResourceGroupId().equals(other.getResourceGroupId())) return false; + if (!getSecretId().equals(other.getSecretId())) 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) + RESOURCE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceGroupId().hashCode(); + hash = (37 * hash) + SECRET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSecretId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureProxyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a proxy config stored in Azure Key Vault.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureProxyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureProxyConfig) + com.google.cloud.gkemulticloud.v1.AzureProxyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.class, + com.google.cloud.gkemulticloud.v1.AzureProxyConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureProxyConfig.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(); + resourceGroupId_ = ""; + + secretId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig build() { + com.google.cloud.gkemulticloud.v1.AzureProxyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureProxyConfig result = + new com.google.cloud.gkemulticloud.v1.AzureProxyConfig(this); + result.resourceGroupId_ = resourceGroupId_; + result.secretId_ = secretId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureProxyConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureProxyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureProxyConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureProxyConfig.getDefaultInstance()) + return this; + if (!other.getResourceGroupId().isEmpty()) { + resourceGroupId_ = other.resourceGroupId_; + onChanged(); + } + if (!other.getSecretId().isEmpty()) { + secretId_ = other.secretId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureProxyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureProxyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resourceGroupId_ = ""; + /** + * + * + *
+     * The ARM ID the of the resource group containing proxy keyvault.
+     * Resource group ids are formatted as
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+     * 
+ * + * string resource_group_id = 1; + * + * @return The resourceGroupId. + */ + public java.lang.String getResourceGroupId() { + java.lang.Object ref = resourceGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ARM ID the of the resource group containing proxy keyvault.
+     * Resource group ids are formatted as
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+     * 
+ * + * string resource_group_id = 1; + * + * @return The bytes for resourceGroupId. + */ + public com.google.protobuf.ByteString getResourceGroupIdBytes() { + java.lang.Object ref = resourceGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ARM ID the of the resource group containing proxy keyvault.
+     * Resource group ids are formatted as
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+     * 
+ * + * string resource_group_id = 1; + * + * @param value The resourceGroupId to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ARM ID the of the resource group containing proxy keyvault.
+     * Resource group ids are formatted as
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+     * 
+ * + * string resource_group_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearResourceGroupId() { + + resourceGroupId_ = getDefaultInstance().getResourceGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ARM ID the of the resource group containing proxy keyvault.
+     * Resource group ids are formatted as
+     * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+     * 
+ * + * string resource_group_id = 1; + * + * @param value The bytes for resourceGroupId to set. + * @return This builder for chaining. + */ + public Builder setResourceGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceGroupId_ = value; + onChanged(); + return this; + } + + private java.lang.Object secretId_ = ""; + /** + * + * + *
+     * The URL the of the proxy setting secret with its version.
+     * Secret ids are formatted as
+     * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+     * 
+ * + * string secret_id = 2; + * + * @return The secretId. + */ + public java.lang.String getSecretId() { + java.lang.Object ref = secretId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URL the of the proxy setting secret with its version.
+     * Secret ids are formatted as
+     * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+     * 
+ * + * string secret_id = 2; + * + * @return The bytes for secretId. + */ + public com.google.protobuf.ByteString getSecretIdBytes() { + java.lang.Object ref = secretId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URL the of the proxy setting secret with its version.
+     * Secret ids are formatted as
+     * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+     * 
+ * + * string secret_id = 2; + * + * @param value The secretId to set. + * @return This builder for chaining. + */ + public Builder setSecretId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secretId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URL the of the proxy setting secret with its version.
+     * Secret ids are formatted as
+     * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+     * 
+ * + * string secret_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearSecretId() { + + secretId_ = getDefaultInstance().getSecretId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URL the of the proxy setting secret with its version.
+     * Secret ids are formatted as
+     * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+     * 
+ * + * string secret_id = 2; + * + * @param value The bytes for secretId to set. + * @return This builder for chaining. + */ + public Builder setSecretIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secretId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureProxyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureProxyConfig) + private static final com.google.cloud.gkemulticloud.v1.AzureProxyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureProxyConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureProxyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureProxyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureProxyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureProxyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfigOrBuilder.java new file mode 100644 index 0000000..1741896 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureProxyConfigOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureProxyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureProxyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ARM ID the of the resource group containing proxy keyvault.
+   * Resource group ids are formatted as
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+   * 
+ * + * string resource_group_id = 1; + * + * @return The resourceGroupId. + */ + java.lang.String getResourceGroupId(); + /** + * + * + *
+   * The ARM ID the of the resource group containing proxy keyvault.
+   * Resource group ids are formatted as
+   * `/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>`.
+   * 
+ * + * string resource_group_id = 1; + * + * @return The bytes for resourceGroupId. + */ + com.google.protobuf.ByteString getResourceGroupIdBytes(); + + /** + * + * + *
+   * The URL the of the proxy setting secret with its version.
+   * Secret ids are formatted as
+   * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+   * 
+ * + * string secret_id = 2; + * + * @return The secretId. + */ + java.lang.String getSecretId(); + /** + * + * + *
+   * The URL the of the proxy setting secret with its version.
+   * Secret ids are formatted as
+   * `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>`.
+   * 
+ * + * string secret_id = 2; + * + * @return The bytes for secretId. + */ + com.google.protobuf.ByteString getSecretIdBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureResourcesProto.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureResourcesProto.java new file mode 100644 index 0000000..542959c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureResourcesProto.java @@ -0,0 +1,573 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public final class AzureResourcesProto { + private AzureResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureClient_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/gkemulticloud/v1/azure_re" + + "sources.proto\022\035google.cloud.gkemulticlou" + + "d.v1\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\0324google/cloud/g" + + "kemulticloud/v1/common_resources.proto\032\037" + + "google/protobuf/timestamp.proto\"\325\n\n\014Azur" + + "eCluster\022\014\n\004name\030\001 \001(\t\022\030\n\013description\030\002 " + + "\001(\tB\003\340A\001\022\031\n\014azure_region\030\003 \001(\tB\003\340A\002\022\036\n\021r" + + "esource_group_id\030\021 \001(\tB\003\340A\002\022\031\n\014azure_cli" + + "ent\030\020 \001(\tB\003\340A\002\022N\n\nnetworking\030\004 \001(\01325.goo" + + "gle.cloud.gkemulticloud.v1.AzureClusterN" + + "etworkingB\003\340A\002\022L\n\rcontrol_plane\030\005 \001(\01320." + + "google.cloud.gkemulticloud.v1.AzureContr" + + "olPlaneB\003\340A\002\022M\n\rauthorization\030\006 \001(\01321.go" + + "ogle.cloud.gkemulticloud.v1.AzureAuthori" + + "zationB\003\340A\002\022E\n\005state\030\007 \001(\01621.google.clou" + + "d.gkemulticloud.v1.AzureCluster.StateB\003\340" + + "A\003\022\025\n\010endpoint\030\010 \001(\tB\003\340A\003\022\020\n\003uid\030\t \001(\tB\003" + + "\340A\003\022\030\n\013reconciling\030\n \001(\010B\003\340A\003\0224\n\013create_" + + "time\030\013 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\014 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022\014\n\004etag\030\r \001(\t\022V\n\013annot" + + "ations\030\016 \003(\0132<.google.cloud.gkemulticlou" + + "d.v1.AzureCluster.AnnotationsEntryB\003\340A\001\022" + + "\\\n\030workload_identity_config\030\022 \001(\01325.goog" + + "le.cloud.gkemulticloud.v1.WorkloadIdenti" + + "tyConfigB\003\340A\003\022#\n\026cluster_ca_certificate\030" + + "\023 \001(\tB\003\340A\003\0228\n\005fleet\030\024 \001(\0132$.google.cloud" + + ".gkemulticloud.v1.FleetB\003\340A\001\022T\n\021managed_" + + "resources\030\025 \001(\01324.google.cloud.gkemultic" + + "loud.v1.AzureClusterResourcesB\003\340A\003\022I\n\016lo" + + "gging_config\030\027 \001(\0132,.google.cloud.gkemul" + + "ticloud.v1.LoggingConfigB\003\340A\001\0322\n\020Annotat" + + "ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\"u\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014PRO" + + "VISIONING\020\001\022\013\n\007RUNNING\020\002\022\017\n\013RECONCILING\020" + + "\003\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005\022\014\n\010DEGRADED\020\006" + + ":u\352Ar\n)gkemulticloud.googleapis.com/Azur" + + "eCluster\022Eprojects/{project}/locations/{" + + "location}/azureClusters/{azure_cluster}\"" + + "\267\001\n\026AzureClusterNetworking\022\037\n\022virtual_ne" + + "twork_id\030\001 \001(\tB\003\340A\002\022$\n\027pod_address_cidr_" + + "blocks\030\002 \003(\tB\003\340A\002\022(\n\033service_address_cid" + + "r_blocks\030\003 \003(\tB\003\340A\002\022,\n\037service_load_bala" + + "ncer_subnet_id\030\005 \001(\tB\003\340A\001\"\242\006\n\021AzureContr" + + "olPlane\022\024\n\007version\030\001 \001(\tB\003\340A\002\022\026\n\tsubnet_" + + "id\030\002 \001(\tB\003\340A\001\022\024\n\007vm_size\030\003 \001(\tB\003\340A\001\022F\n\ns" + + "sh_config\030\013 \001(\0132-.google.cloud.gkemultic" + + "loud.v1.AzureSshConfigB\003\340A\002\022J\n\013root_volu" + + "me\030\004 \001(\01320.google.cloud.gkemulticloud.v1" + + ".AzureDiskTemplateB\003\340A\001\022J\n\013main_volume\030\005" + + " \001(\01320.google.cloud.gkemulticloud.v1.Azu" + + "reDiskTemplateB\003\340A\001\022X\n\023database_encrypti" + + "on\030\n \001(\01326.google.cloud.gkemulticloud.v1" + + ".AzureDatabaseEncryptionB\003\340A\001\022J\n\014proxy_c" + + "onfig\030\014 \001(\0132/.google.cloud.gkemulticloud" + + ".v1.AzureProxyConfigB\003\340A\001\022T\n\021config_encr" + + "yption\030\016 \001(\01324.google.cloud.gkemulticlou" + + "d.v1.AzureConfigEncryptionB\003\340A\001\022M\n\004tags\030" + + "\007 \003(\0132:.google.cloud.gkemulticloud.v1.Az" + + "ureControlPlane.TagsEntryB\003\340A\001\022P\n\022replic" + + "a_placements\030\r \003(\0132/.google.cloud.gkemul" + + "ticloud.v1.ReplicaPlacementB\003\340A\001\022\037\n\022endp" + + "oint_subnet_id\030\017 \001(\tB\003\340A\001\032+\n\tTagsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"P\n\020Replic" + + "aPlacement\022\026\n\tsubnet_id\030\001 \001(\tB\003\340A\002\022$\n\027az" + + "ure_availability_zone\030\002 \001(\tB\003\340A\002\"@\n\020Azur" + + "eProxyConfig\022\031\n\021resource_group_id\030\001 \001(\t\022" + + "\021\n\tsecret_id\030\002 \001(\t\".\n\027AzureDatabaseEncry" + + "ption\022\023\n\006key_id\030\003 \001(\tB\003\340A\002\"E\n\025AzureConfi" + + "gEncryption\022\023\n\006key_id\030\002 \001(\tB\003\340A\002\022\027\n\npubl" + + "ic_key\030\003 \001(\tB\003\340A\001\"*\n\021AzureDiskTemplate\022\025" + + "\n\010size_gib\030\001 \001(\005B\003\340A\001\"\265\003\n\013AzureClient\022\014\n" + + "\004name\030\001 \001(\t\022\026\n\ttenant_id\030\002 \001(\tB\003\340A\002\022\033\n\016a" + + "pplication_id\030\003 \001(\tB\003\340A\002\022U\n\013annotations\030" + + "\010 \003(\0132;.google.cloud.gkemulticloud.v1.Az" + + "ureClient.AnnotationsEntryB\003\340A\001\022\034\n\017pem_c" + + "ertificate\030\007 \001(\tB\003\340A\003\022\020\n\003uid\030\005 \001(\tB\003\340A\003\022" + + "4\n\013create_time\030\006 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0322\n\020AnnotationsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:r\352Ao\n(gkemulti" + + "cloud.googleapis.com/AzureClient\022Cprojec" + + "ts/{project}/locations/{location}/azureC" + + "lients/{azure_client}\"_\n\022AzureAuthorizat" + + "ion\022I\n\013admin_users\030\001 \003(\0132/.google.cloud." + + "gkemulticloud.v1.AzureClusterUserB\003\340A\002\")" + + "\n\020AzureClusterUser\022\025\n\010username\030\001 \001(\tB\003\340A" + + "\002\"\352\007\n\rAzureNodePool\022\014\n\004name\030\001 \001(\t\022\024\n\007ver" + + "sion\030\002 \001(\tB\003\340A\002\022C\n\006config\030\026 \001(\0132..google" + + ".cloud.gkemulticloud.v1.AzureNodeConfigB" + + "\003\340A\002\022\026\n\tsubnet_id\030\003 \001(\tB\003\340A\002\022Q\n\013autoscal" + + "ing\030\004 \001(\01327.google.cloud.gkemulticloud.v" + + "1.AzureNodePoolAutoscalingB\003\340A\002\022F\n\005state" + + "\030\006 \001(\01622.google.cloud.gkemulticloud.v1.A" + + "zureNodePool.StateB\003\340A\003\022\020\n\003uid\030\010 \001(\tB\003\340A" + + "\003\022\030\n\013reconciling\030\t \001(\010B\003\340A\003\0224\n\013create_ti" + + "me\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\0224\n\013update_time\030\013 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022\014\n\004etag\030\014 \001(\t\022W\n\013annotat" + + "ions\030\r \003(\0132=.google.cloud.gkemulticloud." + + "v1.AzureNodePool.AnnotationsEntryB\003\340A\001\022R" + + "\n\023max_pods_constraint\030\025 \001(\01320.google.clo" + + "ud.gkemulticloud.v1.MaxPodsConstraintB\003\340" + + "A\002\022$\n\027azure_availability_zone\030\027 \001(\tB\003\340A\001" + + "\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"u\n\005State\022\025\n\021STATE_UNSPECIFI" + + "ED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNING\020\002\022\017\n\013R" + + "ECONCILING\020\003\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005\022\014\n" + + "\010DEGRADED\020\006:\230\001\352A\224\001\n*gkemulticloud.google" + + "apis.com/AzureNodePool\022fprojects/{projec" + + "t}/locations/{location}/azureClusters/{a" + + "zure_cluster}/azureNodePools/{azure_node" + + "_pool}\"\257\005\n\017AzureNodeConfig\022\024\n\007vm_size\030\001 " + + "\001(\tB\003\340A\001\022J\n\013root_volume\030\002 \001(\01320.google.c" + + "loud.gkemulticloud.v1.AzureDiskTemplateB" + + "\003\340A\001\022K\n\004tags\030\003 \003(\01328.google.cloud.gkemul" + + "ticloud.v1.AzureNodeConfig.TagsEntryB\003\340A" + + "\001\022\027\n\nimage_type\030\010 \001(\tB\003\340A\001\022F\n\nssh_config" + + "\030\007 \001(\0132-.google.cloud.gkemulticloud.v1.A" + + "zureSshConfigB\003\340A\002\022J\n\014proxy_config\030\t \001(\013" + + "2/.google.cloud.gkemulticloud.v1.AzurePr" + + "oxyConfigB\003\340A\001\022T\n\021config_encryption\030\014 \001(" + + "\01324.google.cloud.gkemulticloud.v1.AzureC" + + "onfigEncryptionB\003\340A\001\022=\n\006taints\030\n \003(\0132(.g" + + "oogle.cloud.gkemulticloud.v1.NodeTaintB\003" + + "\340A\001\022O\n\006labels\030\013 \003(\0132:.google.cloud.gkemu" + + "lticloud.v1.AzureNodeConfig.LabelsEntryB" + + "\003\340A\001\032+\n\tTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"T\n\030AzureNodePoolAutosca" + + "ling\022\033\n\016min_node_count\030\001 \001(\005B\003\340A\002\022\033\n\016max" + + "_node_count\030\002 \001(\005B\003\340A\002\"\376\001\n\021AzureServerCo" + + "nfig\022\014\n\004name\030\001 \001(\t\022J\n\016valid_versions\030\002 \003" + + "(\01322.google.cloud.gkemulticloud.v1.Azure" + + "K8sVersionInfo\022\037\n\027supported_azure_region" + + "s\030\003 \003(\t:n\352Ak\n.gkemulticloud.googleapis.c" + + "om/AzureServerConfig\0229projects/{project}" + + "/locations/{location}/azureServerConfig\"" + + "&\n\023AzureK8sVersionInfo\022\017\n\007version\030\001 \001(\t\"" + + "-\n\016AzureSshConfig\022\033\n\016authorized_key\030\001 \001(" + + "\tB\003\340A\002\"y\n\025AzureClusterResources\022&\n\031netwo" + + "rk_security_group_id\030\001 \001(\tB\003\340A\003\0228\n+contr" + + "ol_plane_application_security_group_id\030\002" + + " \001(\tB\003\340A\003B\351\001\n!com.google.cloud.gkemultic" + + "loud.v1B\023AzureResourcesProtoP\001ZJgoogle.g" + + "olang.org/genproto/googleapis/cloud/gkem" + + "ulticloud/v1;gkemulticloud\252\002\035Google.Clou" + + "d.GkeMultiCloud.V1\312\002\035Google\\Cloud\\GkeMul" + + "tiCloud\\V1\352\002 Google::Cloud::GkeMultiClou" + + "d::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.gkemulticloud.v1.CommonResourcesProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor, + new java.lang.String[] { + "Name", + "Description", + "AzureRegion", + "ResourceGroupId", + "AzureClient", + "Networking", + "ControlPlane", + "Authorization", + "State", + "Endpoint", + "Uid", + "Reconciling", + "CreateTime", + "UpdateTime", + "Etag", + "Annotations", + "WorkloadIdentityConfig", + "ClusterCaCertificate", + "Fleet", + "ManagedResources", + "LoggingConfig", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureCluster_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureClusterNetworking_descriptor, + new java.lang.String[] { + "VirtualNetworkId", + "PodAddressCidrBlocks", + "ServiceAddressCidrBlocks", + "ServiceLoadBalancerSubnetId", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor, + new java.lang.String[] { + "Version", + "SubnetId", + "VmSize", + "SshConfig", + "RootVolume", + "MainVolume", + "DatabaseEncryption", + "ProxyConfig", + "ConfigEncryption", + "Tags", + "ReplicaPlacements", + "EndpointSubnetId", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureControlPlane_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor, + new java.lang.String[] { + "SubnetId", "AzureAvailabilityZone", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureProxyConfig_descriptor, + new java.lang.String[] { + "ResourceGroupId", "SecretId", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureDatabaseEncryption_descriptor, + new java.lang.String[] { + "KeyId", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureConfigEncryption_descriptor, + new java.lang.String[] { + "KeyId", "PublicKey", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureDiskTemplate_descriptor, + new java.lang.String[] { + "SizeGib", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gkemulticloud_v1_AzureClient_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor, + new java.lang.String[] { + "Name", + "TenantId", + "ApplicationId", + "Annotations", + "PemCertificate", + "Uid", + "CreateTime", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureClient_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureClient_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureAuthorization_descriptor, + new java.lang.String[] { + "AdminUsers", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureClusterUser_descriptor, + new java.lang.String[] { + "Username", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor, + new java.lang.String[] { + "Name", + "Version", + "Config", + "SubnetId", + "Autoscaling", + "State", + "Uid", + "Reconciling", + "CreateTime", + "UpdateTime", + "Etag", + "Annotations", + "MaxPodsConstraint", + "AzureAvailabilityZone", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodePool_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor, + new java.lang.String[] { + "VmSize", + "RootVolume", + "Tags", + "ImageType", + "SshConfig", + "ProxyConfig", + "ConfigEncryption", + "Taints", + "Labels", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_descriptor = + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodeConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureNodePoolAutoscaling_descriptor, + new java.lang.String[] { + "MinNodeCount", "MaxNodeCount", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor, + new java.lang.String[] { + "Name", "ValidVersions", "SupportedAzureRegions", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureK8sVersionInfo_descriptor, + new java.lang.String[] { + "Version", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor, + new java.lang.String[] { + "AuthorizedKey", + }); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_AzureClusterResources_descriptor, + new java.lang.String[] { + "NetworkSecurityGroupId", "ControlPlaneApplicationSecurityGroupId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.gkemulticloud.v1.CommonResourcesProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfig.java new file mode 100644 index 0000000..2de30bc --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfig.java @@ -0,0 +1,1457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * AzureServerConfig contains information about a Google Cloud location, such as
+ * supported Azure regions and Kubernetes versions.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureServerConfig} + */ +public final class AzureServerConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureServerConfig) + AzureServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureServerConfig.newBuilder() to construct. + private AzureServerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureServerConfig() { + name_ = ""; + validVersions_ = java.util.Collections.emptyList(); + supportedAzureRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureServerConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureServerConfig( + 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)) { + validVersions_ = + new java.util.ArrayList< + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo>(); + mutable_bitField0_ |= 0x00000001; + } + validVersions_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.parser(), + extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + supportedAzureRegions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + supportedAzureRegions_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + validVersions_ = java.util.Collections.unmodifiableList(validVersions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + supportedAzureRegions_ = supportedAzureRegions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureServerConfig.class, + com.google.cloud.gkemulticloud.v1.AzureServerConfig.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The `AzureServerConfig` resource name.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The `AzureServerConfig` resource name.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * 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 VALID_VERSIONS_FIELD_NUMBER = 2; + private java.util.List validVersions_; + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public java.util.List + getValidVersionsList() { + return validVersions_; + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public java.util.List + getValidVersionsOrBuilderList() { + return validVersions_; + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public int getValidVersionsCount() { + return validVersions_.size(); + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getValidVersions(int index) { + return validVersions_.get(index); + } + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder getValidVersionsOrBuilder( + int index) { + return validVersions_.get(index); + } + + public static final int SUPPORTED_AZURE_REGIONS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList supportedAzureRegions_; + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return A list containing the supportedAzureRegions. + */ + public com.google.protobuf.ProtocolStringList getSupportedAzureRegionsList() { + return supportedAzureRegions_; + } + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return The count of supportedAzureRegions. + */ + public int getSupportedAzureRegionsCount() { + return supportedAzureRegions_.size(); + } + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAzureRegions at the given index. + */ + public java.lang.String getSupportedAzureRegions(int index) { + return supportedAzureRegions_.get(index); + } + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAzureRegions at the given index. + */ + public com.google.protobuf.ByteString getSupportedAzureRegionsBytes(int index) { + return supportedAzureRegions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < validVersions_.size(); i++) { + output.writeMessage(2, validVersions_.get(i)); + } + for (int i = 0; i < supportedAzureRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, supportedAzureRegions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < validVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, validVersions_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < supportedAzureRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedAzureRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedAzureRegionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureServerConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureServerConfig other = + (com.google.cloud.gkemulticloud.v1.AzureServerConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValidVersionsList().equals(other.getValidVersionsList())) return false; + if (!getSupportedAzureRegionsList().equals(other.getSupportedAzureRegionsList())) 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 (getValidVersionsCount() > 0) { + hash = (37 * hash) + VALID_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getValidVersionsList().hashCode(); + } + if (getSupportedAzureRegionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_AZURE_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedAzureRegionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureServerConfig 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; + } + /** + * + * + *
+   * AzureServerConfig contains information about a Google Cloud location, such as
+   * supported Azure regions and Kubernetes versions.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureServerConfig) + com.google.cloud.gkemulticloud.v1.AzureServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureServerConfig.class, + com.google.cloud.gkemulticloud.v1.AzureServerConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureServerConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValidVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (validVersionsBuilder_ == null) { + validVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + validVersionsBuilder_.clear(); + } + supportedAzureRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureServerConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureServerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureServerConfig build() { + com.google.cloud.gkemulticloud.v1.AzureServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureServerConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureServerConfig result = + new com.google.cloud.gkemulticloud.v1.AzureServerConfig(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (validVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validVersions_ = java.util.Collections.unmodifiableList(validVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validVersions_ = validVersions_; + } else { + result.validVersions_ = validVersionsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + supportedAzureRegions_ = supportedAzureRegions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.supportedAzureRegions_ = supportedAzureRegions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureServerConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureServerConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureServerConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (validVersionsBuilder_ == null) { + if (!other.validVersions_.isEmpty()) { + if (validVersions_.isEmpty()) { + validVersions_ = other.validVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidVersionsIsMutable(); + validVersions_.addAll(other.validVersions_); + } + onChanged(); + } + } else { + if (!other.validVersions_.isEmpty()) { + if (validVersionsBuilder_.isEmpty()) { + validVersionsBuilder_.dispose(); + validVersionsBuilder_ = null; + validVersions_ = other.validVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + validVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValidVersionsFieldBuilder() + : null; + } else { + validVersionsBuilder_.addAllMessages(other.validVersions_); + } + } + } + if (!other.supportedAzureRegions_.isEmpty()) { + if (supportedAzureRegions_.isEmpty()) { + supportedAzureRegions_ = other.supportedAzureRegions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSupportedAzureRegionsIsMutable(); + supportedAzureRegions_.addAll(other.supportedAzureRegions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureServerConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.AzureServerConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The `AzureServerConfig` resource name.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `AzureServerConfig` resource name.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `AzureServerConfig` resource name.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `AzureServerConfig` resource name.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `AzureServerConfig` resource name.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-number>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * 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 validVersions_ = + java.util.Collections.emptyList(); + + private void ensureValidVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validVersions_ = + new java.util.ArrayList( + validVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder> + validVersionsBuilder_; + + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsList() { + if (validVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(validVersions_); + } else { + return validVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public int getValidVersionsCount() { + if (validVersionsBuilder_ == null) { + return validVersions_.size(); + } else { + return validVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getValidVersions(int index) { + if (validVersionsBuilder_ == null) { + return validVersions_.get(index); + } else { + return validVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder setValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.set(index, value); + onChanged(); + } else { + validVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder setValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions(com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.add(value); + onChanged(); + } else { + validVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo value) { + if (validVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidVersionsIsMutable(); + validVersions_.add(index, value); + onChanged(); + } else { + validVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.add(builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder addValidVersions( + int index, com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder builderForValue) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + validVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder addAllValidVersions( + java.lang.Iterable + values) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, validVersions_); + onChanged(); + } else { + validVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder clearValidVersions() { + if (validVersionsBuilder_ == null) { + validVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public Builder removeValidVersions(int index) { + if (validVersionsBuilder_ == null) { + ensureValidVersionsIsMutable(); + validVersions_.remove(index); + onChanged(); + } else { + validVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder getValidVersionsBuilder( + int index) { + return getValidVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder getValidVersionsOrBuilder( + int index) { + if (validVersionsBuilder_ == null) { + return validVersions_.get(index); + } else { + return validVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsOrBuilderList() { + if (validVersionsBuilder_ != null) { + return validVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validVersions_); + } + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder addValidVersionsBuilder() { + return getValidVersionsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder addValidVersionsBuilder( + int index) { + return getValidVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of valid Kubernetes versions.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + public java.util.List + getValidVersionsBuilderList() { + return getValidVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder> + getValidVersionsFieldBuilder() { + if (validVersionsBuilder_ == null) { + validVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.Builder, + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder>( + validVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validVersions_ = null; + } + return validVersionsBuilder_; + } + + private com.google.protobuf.LazyStringList supportedAzureRegions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedAzureRegionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + supportedAzureRegions_ = + new com.google.protobuf.LazyStringArrayList(supportedAzureRegions_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return A list containing the supportedAzureRegions. + */ + public com.google.protobuf.ProtocolStringList getSupportedAzureRegionsList() { + return supportedAzureRegions_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return The count of supportedAzureRegions. + */ + public int getSupportedAzureRegionsCount() { + return supportedAzureRegions_.size(); + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAzureRegions at the given index. + */ + public java.lang.String getSupportedAzureRegions(int index) { + return supportedAzureRegions_.get(index); + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAzureRegions at the given index. + */ + public com.google.protobuf.ByteString getSupportedAzureRegionsBytes(int index) { + return supportedAzureRegions_.getByteString(index); + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index to set the value at. + * @param value The supportedAzureRegions to set. + * @return This builder for chaining. + */ + public Builder setSupportedAzureRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAzureRegionsIsMutable(); + supportedAzureRegions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param value The supportedAzureRegions to add. + * @return This builder for chaining. + */ + public Builder addSupportedAzureRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAzureRegionsIsMutable(); + supportedAzureRegions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param values The supportedAzureRegions to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedAzureRegions(java.lang.Iterable values) { + ensureSupportedAzureRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedAzureRegions_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportedAzureRegions() { + supportedAzureRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of supported Azure regions.
+     * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param value The bytes of the supportedAzureRegions to add. + * @return This builder for chaining. + */ + public Builder addSupportedAzureRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedAzureRegionsIsMutable(); + supportedAzureRegions_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureServerConfig) + private static final com.google.cloud.gkemulticloud.v1.AzureServerConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureServerConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureServerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureServerConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureServerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigName.java new file mode 100644 index 0000000..5f43a4c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigName.java @@ -0,0 +1,193 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.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 AzureServerConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/azureServerConfig"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected AzureServerConfigName() { + project = null; + location = null; + } + + private AzureServerConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AzureServerConfigName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static AzureServerConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "AzureServerConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AzureServerConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AzureServerConfigName that = ((AzureServerConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}/azureServerConfig. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(AzureServerConfigName azureServerConfigName) { + this.project = azureServerConfigName.project; + this.location = azureServerConfigName.location; + } + + public AzureServerConfigName build() { + return new AzureServerConfigName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigOrBuilder.java new file mode 100644 index 0000000..23ee941 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServerConfigOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `AzureServerConfig` resource name.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The `AzureServerConfig` resource name.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-number>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + java.util.List getValidVersionsList(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo getValidVersions(int index); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + int getValidVersionsCount(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + java.util.List + getValidVersionsOrBuilderList(); + /** + * + * + *
+   * List of valid Kubernetes versions.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; + */ + com.google.cloud.gkemulticloud.v1.AzureK8sVersionInfoOrBuilder getValidVersionsOrBuilder( + int index); + + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return A list containing the supportedAzureRegions. + */ + java.util.List getSupportedAzureRegionsList(); + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @return The count of supportedAzureRegions. + */ + int getSupportedAzureRegionsCount(); + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the element to return. + * @return The supportedAzureRegions at the given index. + */ + java.lang.String getSupportedAzureRegions(int index); + /** + * + * + *
+   * The list of supported Azure regions.
+   * 
+ * + * repeated string supported_azure_regions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedAzureRegions at the given index. + */ + com.google.protobuf.ByteString getSupportedAzureRegionsBytes(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java new file mode 100644 index 0000000..93b6745 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java @@ -0,0 +1,497 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public final class AzureServiceProto { + private AzureServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/gkemulticloud/v1/azure_se" + + "rvice.proto\022\035google.cloud.gkemulticloud." + + "v1\032\034google/api/annotations.proto\032\027google" + + "/api/client.proto\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\0323g" + + "oogle/cloud/gkemulticloud/v1/azure_resou" + + "rces.proto\032#google/longrunning/operation" + + "s.proto\032 google/protobuf/field_mask.prot" + + "o\032\037google/protobuf/timestamp.proto\"\335\001\n\031C" + + "reateAzureClusterRequest\022A\n\006parent\030\001 \001(\t" + + "B1\340A\002\372A+\022)gkemulticloud.googleapis.com/A" + + "zureCluster\022G\n\razure_cluster\030\002 \001(\0132+.goo" + + "gle.cloud.gkemulticloud.v1.AzureClusterB" + + "\003\340A\002\022\035\n\020azure_cluster_id\030\003 \001(\tB\003\340A\002\022\025\n\rv" + + "alidate_only\030\004 \001(\010\"\261\001\n\031UpdateAzureCluste" + + "rRequest\022G\n\razure_cluster\030\001 \001(\0132+.google" + + ".cloud.gkemulticloud.v1.AzureClusterB\003\340A" + + "\002\022\025\n\rvalidate_only\030\002 \001(\010\0224\n\013update_mask\030" + + "\004 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"Y" + + "\n\026GetAzureClusterRequest\022?\n\004name\030\001 \001(\tB1" + + "\340A\002\372A+\n)gkemulticloud.googleapis.com/Azu" + + "reCluster\"\204\001\n\030ListAzureClustersRequest\022A" + + "\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)gkemulticloud.go" + + "ogleapis.com/AzureCluster\022\021\n\tpage_size\030\002" + + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"y\n\031ListAzureClu" + + "stersResponse\022C\n\016azure_clusters\030\001 \003(\0132+." + + "google.cloud.gkemulticloud.v1.AzureClust" + + "er\022\027\n\017next_page_token\030\002 \001(\t\"\230\001\n\031DeleteAz" + + "ureClusterRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")gkemulticloud.googleapis.com/AzureClust" + + "er\022\025\n\rallow_missing\030\002 \001(\010\022\025\n\rvalidate_on" + + "ly\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"\344\001\n\032CreateAzureNo" + + "dePoolRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*g" + + "kemulticloud.googleapis.com/AzureNodePoo" + + "l\022J\n\017azure_node_pool\030\002 \001(\0132,.google.clou" + + "d.gkemulticloud.v1.AzureNodePoolB\003\340A\002\022\037\n" + + "\022azure_node_pool_id\030\003 \001(\tB\003\340A\002\022\025\n\rvalida" + + "te_only\030\004 \001(\010\"\265\001\n\032UpdateAzureNodePoolReq" + + "uest\022J\n\017azure_node_pool\030\001 \001(\0132,.google.c" + + "loud.gkemulticloud.v1.AzureNodePoolB\003\340A\002" + + "\022\025\n\rvalidate_only\030\002 \001(\010\0224\n\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"[\n" + + "\027GetAzureNodePoolRequest\022@\n\004name\030\001 \001(\tB2" + + "\340A\002\372A,\n*gkemulticloud.googleapis.com/Azu" + + "reNodePool\"\206\001\n\031ListAzureNodePoolsRequest" + + "\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*gkemulticloud." + + "googleapis.com/AzureNodePool\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"}\n\032ListAzure" + + "NodePoolsResponse\022F\n\020azure_node_pools\030\001 " + + "\003(\0132,.google.cloud.gkemulticloud.v1.Azur" + + "eNodePool\022\027\n\017next_page_token\030\002 \001(\t\"\232\001\n\032D" + + "eleteAzureNodePoolRequest\022@\n\004name\030\001 \001(\tB" + + "2\340A\002\372A,\n*gkemulticloud.googleapis.com/Az" + + "ureNodePool\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n\ral" + + "low_missing\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"c\n\033GetAz" + + "ureServerConfigRequest\022D\n\004name\030\001 \001(\tB6\340A" + + "\002\372A0\n.gkemulticloud.googleapis.com/Azure" + + "ServerConfig\"\330\001\n\030CreateAzureClientReques" + + "t\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(gkemulticloud" + + ".googleapis.com/AzureClient\022E\n\014azure_cli" + + "ent\030\002 \001(\0132*.google.cloud.gkemulticloud.v" + + "1.AzureClientB\003\340A\002\022\034\n\017azure_client_id\030\004 " + + "\001(\tB\003\340A\002\022\025\n\rvalidate_only\030\003 \001(\010\"W\n\025GetAz" + + "ureClientRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(" + + "gkemulticloud.googleapis.com/AzureClient" + + "\"\202\001\n\027ListAzureClientsRequest\022@\n\006parent\030\001" + + " \001(\tB0\340A\002\372A*\022(gkemulticloud.googleapis.c" + + "om/AzureClient\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\"v\n\030ListAzureClientsRespons" + + "e\022A\n\razure_clients\030\001 \003(\0132*.google.cloud." + + "gkemulticloud.v1.AzureClient\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"\210\001\n\030DeleteAzureClientReque" + + "st\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(gkemulticloud." + + "googleapis.com/AzureClient\022\025\n\rallow_miss" + + "ing\030\002 \001(\010\022\025\n\rvalidate_only\030\003 \001(\010\"k\n\037Gene" + + "rateAzureAccessTokenRequest\022H\n\razure_clu" + + "ster\030\001 \001(\tB1\340A\002\372A+\n)gkemulticloud.google" + + "apis.com/AzureCluster\"w\n GenerateAzureAc" + + "cessTokenResponse\022\031\n\014access_token\030\001 \001(\tB" + + "\003\340A\003\0228\n\017expiration_time\030\002 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\0032\335\035\n\rAzureClusters" + + "\022\375\001\n\021CreateAzureClient\0227.google.cloud.gk" + + "emulticloud.v1.CreateAzureClientRequest\032" + + "\035.google.longrunning.Operation\"\217\001\202\323\344\223\002@\"" + + "0/v1/{parent=projects/*/locations/*}/azu" + + "reClients:\014azure_client\332A#parent,azure_c" + + "lient,azure_client_id\312A \n\013AzureClient\022\021O" + + "perationMetadata\022\263\001\n\016GetAzureClient\0224.go" + + "ogle.cloud.gkemulticloud.v1.GetAzureClie" + + "ntRequest\032*.google.cloud.gkemulticloud.v" + + "1.AzureClient\"?\202\323\344\223\0022\0220/v1/{name=project" + + "s/*/locations/*/azureClients/*}\332A\004name\022\306" + + "\001\n\020ListAzureClients\0226.google.cloud.gkemu" + + "lticloud.v1.ListAzureClientsRequest\0327.go" + + "ogle.cloud.gkemulticloud.v1.ListAzureCli" + + "entsResponse\"A\202\323\344\223\0022\0220/v1/{parent=projec" + + "ts/*/locations/*}/azureClients\332A\006parent\022" + + "\331\001\n\021DeleteAzureClient\0227.google.cloud.gke" + + "multicloud.v1.DeleteAzureClientRequest\032\035" + + ".google.longrunning.Operation\"l\202\323\344\223\0022*0/" + + "v1/{name=projects/*/locations/*/azureCli" + + "ents/*}\332A\004name\312A*\n\025google.protobuf.Empty" + + "\022\021OperationMetadata\022\204\002\n\022CreateAzureClust" + + "er\0228.google.cloud.gkemulticloud.v1.Creat" + + "eAzureClusterRequest\032\035.google.longrunnin" + + "g.Operation\"\224\001\202\323\344\223\002B\"1/v1/{parent=projec" + + "ts/*/locations/*}/azureClusters:\razure_c" + + "luster\332A%parent,azure_cluster,azure_clus" + + "ter_id\312A!\n\014AzureCluster\022\021OperationMetada" + + "ta\022\206\002\n\022UpdateAzureCluster\0228.google.cloud" + + ".gkemulticloud.v1.UpdateAzureClusterRequ" + + "est\032\035.google.longrunning.Operation\"\226\001\202\323\344" + + "\223\002P2?/v1/{azure_cluster.name=projects/*/" + + "locations/*/azureClusters/*}:\razure_clus" + + "ter\332A\031azure_cluster,update_mask\312A!\n\014Azur" + + "eCluster\022\021OperationMetadata\022\267\001\n\017GetAzure" + + "Cluster\0225.google.cloud.gkemulticloud.v1." + + "GetAzureClusterRequest\032+.google.cloud.gk" + + "emulticloud.v1.AzureCluster\"@\202\323\344\223\0023\0221/v1" + + "/{name=projects/*/locations/*/azureClust" + + "ers/*}\332A\004name\022\312\001\n\021ListAzureClusters\0227.go" + + "ogle.cloud.gkemulticloud.v1.ListAzureClu" + + "stersRequest\0328.google.cloud.gkemulticlou" + + "d.v1.ListAzureClustersResponse\"B\202\323\344\223\0023\0221" + + "/v1/{parent=projects/*/locations/*}/azur" + + "eClusters\332A\006parent\022\334\001\n\022DeleteAzureCluste" + + "r\0228.google.cloud.gkemulticloud.v1.Delete" + + "AzureClusterRequest\032\035.google.longrunning" + + ".Operation\"m\202\323\344\223\0023*1/v1/{name=projects/*" + + "/locations/*/azureClusters/*}\332A\004name\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadat" + + "a\022\370\001\n\030GenerateAzureAccessToken\022>.google." + + "cloud.gkemulticloud.v1.GenerateAzureAcce" + + "ssTokenRequest\032?.google.cloud.gkemulticl" + + "oud.v1.GenerateAzureAccessTokenResponse\"" + + "[\202\323\344\223\002U\022S/v1/{azure_cluster=projects/*/l" + + "ocations/*/azureClusters/*}:generateAzur" + + "eAccessToken\022\236\002\n\023CreateAzureNodePool\0229.g" + + "oogle.cloud.gkemulticloud.v1.CreateAzure" + + "NodePoolRequest\032\035.google.longrunning.Ope" + + "ration\"\254\001\202\323\344\223\002U\"B/v1/{parent=projects/*/" + + "locations/*/azureClusters/*}/azureNodePo" + + "ols:\017azure_node_pool\332A)parent,azure_node" + + "_pool,azure_node_pool_id\312A\"\n\rAzureNodePo" + + "ol\022\021OperationMetadata\022\240\002\n\023UpdateAzureNod" + + "ePool\0229.google.cloud.gkemulticloud.v1.Up" + + "dateAzureNodePoolRequest\032\035.google.longru" + + "nning.Operation\"\256\001\202\323\344\223\002e2R/v1/{azure_nod" + + "e_pool.name=projects/*/locations/*/azure" + + "Clusters/*/azureNodePools/*}:\017azure_node" + + "_pool\332A\033azure_node_pool,update_mask\312A\"\n\r" + + "AzureNodePool\022\021OperationMetadata\022\313\001\n\020Get" + + "AzureNodePool\0226.google.cloud.gkemulticlo" + + "ud.v1.GetAzureNodePoolRequest\032,.google.c" + + "loud.gkemulticloud.v1.AzureNodePool\"Q\202\323\344" + + "\223\002D\022B/v1/{name=projects/*/locations/*/az" + + "ureClusters/*/azureNodePools/*}\332A\004name\022\336" + + "\001\n\022ListAzureNodePools\0228.google.cloud.gke" + + "multicloud.v1.ListAzureNodePoolsRequest\032" + + "9.google.cloud.gkemulticloud.v1.ListAzur" + + "eNodePoolsResponse\"S\202\323\344\223\002D\022B/v1/{parent=" + + "projects/*/locations/*/azureClusters/*}/" + + "azureNodePools\332A\006parent\022\357\001\n\023DeleteAzureN" + + "odePool\0229.google.cloud.gkemulticloud.v1." + + "DeleteAzureNodePoolRequest\032\035.google.long" + + "running.Operation\"~\202\323\344\223\002D*B/v1/{name=pro" + + "jects/*/locations/*/azureClusters/*/azur" + + "eNodePools/*}\332A\004name\312A*\n\025google.protobuf" + + ".Empty\022\021OperationMetadata\022\310\001\n\024GetAzureSe" + + "rverConfig\022:.google.cloud.gkemulticloud." + + "v1.GetAzureServerConfigRequest\0320.google." + + "cloud.gkemulticloud.v1.AzureServerConfig" + + "\"B\202\323\344\223\0025\0223/v1/{name=projects/*/locations" + + "/*/azureServerConfig}\332A\004name\032P\312A\034gkemult" + + "icloud.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformB\347\001\n!com.g" + + "oogle.cloud.gkemulticloud.v1B\021AzureServi" + + "ceProtoP\001ZJgoogle.golang.org/genproto/go" + + "ogleapis/cloud/gkemulticloud/v1;gkemulti" + + "cloud\252\002\035Google.Cloud.GkeMultiCloud.V1\312\002\035" + + "Google\\Cloud\\GkeMultiCloud\\V1\352\002 Google::" + + "Cloud::GkeMultiCloud::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.gkemulticloud.v1.AzureResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor, + new java.lang.String[] { + "Parent", "AzureCluster", "AzureClusterId", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor, + new java.lang.String[] { + "AzureCluster", "ValidateOnly", "UpdateMask", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor, + new java.lang.String[] { + "AzureClusters", "NextPageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor, + new java.lang.String[] { + "Name", "AllowMissing", "ValidateOnly", "Etag", + }); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor, + new java.lang.String[] { + "Parent", "AzureNodePool", "AzureNodePoolId", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor, + new java.lang.String[] { + "AzureNodePool", "ValidateOnly", "UpdateMask", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor, + new java.lang.String[] { + "AzureNodePools", "NextPageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor, + new java.lang.String[] { + "Name", "ValidateOnly", "AllowMissing", "Etag", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor, + new java.lang.String[] { + "Parent", "AzureClient", "AzureClientId", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor, + new java.lang.String[] { + "AzureClients", "NextPageToken", + }); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor, + new java.lang.String[] { + "Name", "AllowMissing", "ValidateOnly", + }); + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor, + new java.lang.String[] { + "AzureCluster", + }); + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor, + new java.lang.String[] { + "AccessToken", "ExpirationTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.gkemulticloud.v1.AzureResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfig.java new file mode 100644 index 0000000..8da3164 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfig.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * SSH configuration for Azure resources.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureSshConfig} + */ +public final class AzureSshConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.AzureSshConfig) + AzureSshConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureSshConfig.newBuilder() to construct. + private AzureSshConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureSshConfig() { + authorizedKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureSshConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureSshConfig( + 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(); + + authorizedKey_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.class, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder.class); + } + + public static final int AUTHORIZED_KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object authorizedKey_; + /** + * + * + *
+   * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+   * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+   * page.
+   * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authorizedKey. + */ + @java.lang.Override + public java.lang.String getAuthorizedKey() { + java.lang.Object ref = authorizedKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizedKey_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+   * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+   * page.
+   * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authorizedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorizedKeyBytes() { + java.lang.Object ref = authorizedKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizedKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, authorizedKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, authorizedKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.AzureSshConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.AzureSshConfig other = + (com.google.cloud.gkemulticloud.v1.AzureSshConfig) obj; + + if (!getAuthorizedKey().equals(other.getAuthorizedKey())) 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) + AUTHORIZED_KEY_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizedKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.AzureSshConfig 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; + } + /** + * + * + *
+   * SSH configuration for Azure resources.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.AzureSshConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.AzureSshConfig) + com.google.cloud.gkemulticloud.v1.AzureSshConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.AzureSshConfig.class, + com.google.cloud.gkemulticloud.v1.AzureSshConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.AzureSshConfig.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(); + authorizedKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_AzureSshConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig build() { + com.google.cloud.gkemulticloud.v1.AzureSshConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.AzureSshConfig result = + new com.google.cloud.gkemulticloud.v1.AzureSshConfig(this); + result.authorizedKey_ = authorizedKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.AzureSshConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.AzureSshConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.AzureSshConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.AzureSshConfig.getDefaultInstance()) + return this; + if (!other.getAuthorizedKey().isEmpty()) { + authorizedKey_ = other.authorizedKey_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.AzureSshConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.AzureSshConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object authorizedKey_ = ""; + /** + * + * + *
+     * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+     * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+     * page.
+     * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authorizedKey. + */ + public java.lang.String getAuthorizedKey() { + java.lang.Object ref = authorizedKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizedKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+     * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+     * page.
+     * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authorizedKey. + */ + public com.google.protobuf.ByteString getAuthorizedKeyBytes() { + java.lang.Object ref = authorizedKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizedKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+     * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+     * page.
+     * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The authorizedKey to set. + * @return This builder for chaining. + */ + public Builder setAuthorizedKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authorizedKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+     * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+     * page.
+     * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAuthorizedKey() { + + authorizedKey_ = getDefaultInstance().getAuthorizedKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+     * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+     * page.
+     * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for authorizedKey to set. + * @return This builder for chaining. + */ + public Builder setAuthorizedKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authorizedKey_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.AzureSshConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.AzureSshConfig) + private static final com.google.cloud.gkemulticloud.v1.AzureSshConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.AzureSshConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.AzureSshConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureSshConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureSshConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureSshConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfigOrBuilder.java new file mode 100644 index 0000000..4948caf --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureSshConfigOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface AzureSshConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.AzureSshConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+   * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+   * page.
+   * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authorizedKey. + */ + java.lang.String getAuthorizedKey(); + /** + * + * + *
+   * Required. The SSH public key data for VMs managed by Anthos. This accepts the
+   * authorized_keys file format used in OpenSSH according to the sshd(8) manual
+   * page.
+   * 
+ * + * string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authorizedKey. + */ + com.google.protobuf.ByteString getAuthorizedKeyBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CommonResourcesProto.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CommonResourcesProto.java new file mode 100644 index 0000000..872a1d8 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CommonResourcesProto.java @@ -0,0 +1,174 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public final class CommonResourcesProto { + private CommonResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_NodeTaint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_Fleet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/gkemulticloud/v1/common_r" + + "esources.proto\022\035google.cloud.gkemulticlo" + + "ud.v1\032\037google/api/field_behavior.proto\032\037" + + "google/protobuf/timestamp.proto\"^\n\026Workl" + + "oadIdentityConfig\022\022\n\nissuer_uri\030\001 \001(\t\022\025\n" + + "\rworkload_pool\030\002 \001(\t\022\031\n\021identity_provide" + + "r\030\003 \001(\t\"3\n\021MaxPodsConstraint\022\036\n\021max_pods" + + "_per_node\030\001 \001(\003B\003\340A\002\"\310\001\n\021OperationMetada" + + "ta\0224\n\013create_time\030\001 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022\023\n\006target\030\003 " + + "\001(\tB\003\340A\003\022\032\n\rstatus_detail\030\004 \001(\tB\003\340A\003\022\031\n\014" + + "error_detail\030\005 \001(\tB\003\340A\003\"\322\001\n\tNodeTaint\022\020\n" + + "\003key\030\001 \001(\tB\003\340A\002\022\022\n\005value\030\002 \001(\tB\003\340A\002\022D\n\006e" + + "ffect\030\003 \001(\0162/.google.cloud.gkemulticloud" + + ".v1.NodeTaint.EffectB\003\340A\002\"Y\n\006Effect\022\026\n\022E" + + "FFECT_UNSPECIFIED\020\000\022\017\n\013NO_SCHEDULE\020\001\022\026\n\022" + + "PREFER_NO_SCHEDULE\020\002\022\016\n\nNO_EXECUTE\020\003\"6\n\005" + + "Fleet\022\024\n\007project\030\001 \001(\tB\003\340A\002\022\027\n\nmembershi" + + "p\030\002 \001(\tB\003\340A\003\"`\n\rLoggingConfig\022O\n\020compone" + + "nt_config\030\001 \001(\01325.google.cloud.gkemultic" + + "loud.v1.LoggingComponentConfig\"\302\001\n\026Loggi" + + "ngComponentConfig\022Z\n\021enable_components\030\001" + + " \003(\0162?.google.cloud.gkemulticloud.v1.Log" + + "gingComponentConfig.Component\"L\n\tCompone" + + "nt\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\025\n\021SYSTEM_" + + "COMPONENTS\020\001\022\r\n\tWORKLOADS\020\002B\352\001\n!com.goog" + + "le.cloud.gkemulticloud.v1B\024CommonResourc" + + "esProtoP\001ZJgoogle.golang.org/genproto/go" + + "ogleapis/cloud/gkemulticloud/v1;gkemulti" + + "cloud\252\002\035Google.Cloud.GkeMultiCloud.V1\312\002\035" + + "Google\\Cloud\\GkeMultiCloud\\V1\352\002 Google::" + + "Cloud::GkeMultiCloud::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor, + new java.lang.String[] { + "IssuerUri", "WorkloadPool", "IdentityProvider", + }); + internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor, + new java.lang.String[] { + "MaxPodsPerNode", + }); + internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "EndTime", "Target", "StatusDetail", "ErrorDetail", + }); + internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gkemulticloud_v1_NodeTaint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor, + new java.lang.String[] { + "Key", "Value", "Effect", + }); + internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gkemulticloud_v1_Fleet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor, + new java.lang.String[] { + "Project", "Membership", + }); + internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor, + new java.lang.String[] { + "ComponentConfig", + }); + internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor, + new java.lang.String[] { + "EnableComponents", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequest.java new file mode 100644 index 0000000..4feb40a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequest.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.CreateAwsCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} + */ +public final class CreateAwsClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + CreateAwsClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAwsClusterRequest.newBuilder() to construct. + private CreateAwsClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAwsClusterRequest() { + parent_ = ""; + awsClusterId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAwsClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAwsClusterRequest( + 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.cloud.gkemulticloud.v1.AwsCluster.Builder subBuilder = null; + if (awsCluster_ != null) { + subBuilder = awsCluster_.toBuilder(); + } + awsCluster_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsCluster_); + awsCluster_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + awsClusterId_ = s; + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AWS_CLUSTER_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AwsCluster awsCluster_; + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + @java.lang.Override + public boolean hasAwsCluster() { + return awsCluster_ != null; + } + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster() { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder() { + return getAwsCluster(); + } + + public static final int AWS_CLUSTER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object awsClusterId_; + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsClusterId. + */ + @java.lang.Override + public java.lang.String getAwsClusterId() { + java.lang.Object ref = awsClusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsClusterId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsClusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAwsClusterIdBytes() { + java.lang.Object ref = awsClusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually create the cluster.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (awsCluster_ != null) { + output.writeMessage(2, getAwsCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsClusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, awsClusterId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (awsCluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAwsCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsClusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, awsClusterId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest other = + (com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAwsCluster() != other.hasAwsCluster()) return false; + if (hasAwsCluster()) { + if (!getAwsCluster().equals(other.getAwsCluster())) return false; + } + if (!getAwsClusterId().equals(other.getAwsClusterId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasAwsCluster()) { + hash = (37 * hash) + AWS_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAwsCluster().hashCode(); + } + hash = (37 * hash) + AWS_CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getAwsClusterId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest 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 `AwsClusters.CreateAwsCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.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 (awsClusterBuilder_ == null) { + awsCluster_ = null; + } else { + awsCluster_ = null; + awsClusterBuilder_ = null; + } + awsClusterId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest build() { + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest result = + new com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(this); + result.parent_ = parent_; + if (awsClusterBuilder_ == null) { + result.awsCluster_ = awsCluster_; + } else { + result.awsCluster_ = awsClusterBuilder_.build(); + } + result.awsClusterId_ = awsClusterId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAwsCluster()) { + mergeAwsCluster(other.getAwsCluster()); + } + if (!other.getAwsClusterId().isEmpty()) { + awsClusterId_ = other.awsClusterId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsCluster awsCluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + awsClusterBuilder_; + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + public boolean hasAwsCluster() { + return awsClusterBuilder_ != null || awsCluster_ != null; + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster() { + if (awsClusterBuilder_ == null) { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } else { + return awsClusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsCluster(com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsCluster_ = value; + onChanged(); + } else { + awsClusterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsCluster( + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder builderForValue) { + if (awsClusterBuilder_ == null) { + awsCluster_ = builderForValue.build(); + onChanged(); + } else { + awsClusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAwsCluster(com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClusterBuilder_ == null) { + if (awsCluster_ != null) { + awsCluster_ = + com.google.cloud.gkemulticloud.v1.AwsCluster.newBuilder(awsCluster_) + .mergeFrom(value) + .buildPartial(); + } else { + awsCluster_ = value; + } + onChanged(); + } else { + awsClusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAwsCluster() { + if (awsClusterBuilder_ == null) { + awsCluster_ = null; + onChanged(); + } else { + awsCluster_ = null; + awsClusterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster.Builder getAwsClusterBuilder() { + + onChanged(); + return getAwsClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder() { + if (awsClusterBuilder_ != null) { + return awsClusterBuilder_.getMessageOrBuilder(); + } else { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } + } + /** + * + * + *
+     * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + getAwsClusterFieldBuilder() { + if (awsClusterBuilder_ == null) { + awsClusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder>( + getAwsCluster(), getParentForChildren(), isClean()); + awsCluster_ = null; + } + return awsClusterBuilder_; + } + + private java.lang.Object awsClusterId_ = ""; + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsClusterId. + */ + public java.lang.String getAwsClusterId() { + java.lang.Object ref = awsClusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsClusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsClusterId. + */ + public com.google.protobuf.ByteString getAwsClusterIdBytes() { + java.lang.Object ref = awsClusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The awsClusterId to set. + * @return This builder for chaining. + */ + public Builder setAwsClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + awsClusterId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAwsClusterId() { + + awsClusterId_ = getDefaultInstance().getAwsClusterId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for awsClusterId to set. + * @return This builder for chaining. + */ + public Builder setAwsClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + awsClusterId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAwsClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAwsClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequestOrBuilder.java new file mode 100644 index 0000000..5f11304 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsClusterRequestOrBuilder.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface CreateAwsClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + boolean hasAwsCluster(); + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster(); + /** + * + * + *
+   * Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder(); + + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsClusterId. + */ + java.lang.String getAwsClusterId(); + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsClusterId. + */ + com.google.protobuf.ByteString getAwsClusterIdBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually create the cluster.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequest.java new file mode 100644 index 0000000..8ff86aa --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequest.java @@ -0,0 +1,1291 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AwsClusters.CreateAwsNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} + */ +public final class CreateAwsNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + CreateAwsNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAwsNodePoolRequest.newBuilder() to construct. + private CreateAwsNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAwsNodePoolRequest() { + parent_ = ""; + awsNodePoolId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAwsNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAwsNodePoolRequest( + 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.cloud.gkemulticloud.v1.AwsNodePool.Builder subBuilder = null; + if (awsNodePool_ != null) { + subBuilder = awsNodePool_.toBuilder(); + } + awsNodePool_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsNodePool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsNodePool_); + awsNodePool_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + awsNodePoolId_ = s; + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AWS_NODE_POOL_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AwsNodePool awsNodePool_; + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + @java.lang.Override + public boolean hasAwsNodePool() { + return awsNodePool_ != null; + } + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool() { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder() { + return getAwsNodePool(); + } + + public static final int AWS_NODE_POOL_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object awsNodePoolId_; + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsNodePoolId. + */ + @java.lang.Override + public java.lang.String getAwsNodePoolId() { + java.lang.Object ref = awsNodePoolId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsNodePoolId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsNodePoolId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAwsNodePoolIdBytes() { + java.lang.Object ref = awsNodePoolId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsNodePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually create the node
+   * pool.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (awsNodePool_ != null) { + output.writeMessage(2, getAwsNodePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsNodePoolId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, awsNodePoolId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (awsNodePool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAwsNodePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsNodePoolId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, awsNodePoolId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAwsNodePool() != other.hasAwsNodePool()) return false; + if (hasAwsNodePool()) { + if (!getAwsNodePool().equals(other.getAwsNodePool())) return false; + } + if (!getAwsNodePoolId().equals(other.getAwsNodePoolId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasAwsNodePool()) { + hash = (37 * hash) + AWS_NODE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getAwsNodePool().hashCode(); + } + hash = (37 * hash) + AWS_NODE_POOL_ID_FIELD_NUMBER; + hash = (53 * hash) + getAwsNodePoolId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest 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 `AwsClusters.CreateAwsNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.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 (awsNodePoolBuilder_ == null) { + awsNodePool_ = null; + } else { + awsNodePool_ = null; + awsNodePoolBuilder_ = null; + } + awsNodePoolId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(this); + result.parent_ = parent_; + if (awsNodePoolBuilder_ == null) { + result.awsNodePool_ = awsNodePool_; + } else { + result.awsNodePool_ = awsNodePoolBuilder_.build(); + } + result.awsNodePoolId_ = awsNodePoolId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAwsNodePool()) { + mergeAwsNodePool(other.getAwsNodePool()); + } + if (!other.getAwsNodePoolId().isEmpty()) { + awsNodePoolId_ = other.awsNodePoolId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsNodePool awsNodePool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + awsNodePoolBuilder_; + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + public boolean hasAwsNodePool() { + return awsNodePoolBuilder_ != null || awsNodePool_ != null; + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool() { + if (awsNodePoolBuilder_ == null) { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } else { + return awsNodePoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsNodePool(com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsNodePool_ = value; + onChanged(); + } else { + awsNodePoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsNodePool( + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder builderForValue) { + if (awsNodePoolBuilder_ == null) { + awsNodePool_ = builderForValue.build(); + onChanged(); + } else { + awsNodePoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAwsNodePool(com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolBuilder_ == null) { + if (awsNodePool_ != null) { + awsNodePool_ = + com.google.cloud.gkemulticloud.v1.AwsNodePool.newBuilder(awsNodePool_) + .mergeFrom(value) + .buildPartial(); + } else { + awsNodePool_ = value; + } + onChanged(); + } else { + awsNodePoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAwsNodePool() { + if (awsNodePoolBuilder_ == null) { + awsNodePool_ = null; + onChanged(); + } else { + awsNodePool_ = null; + awsNodePoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder getAwsNodePoolBuilder() { + + onChanged(); + return getAwsNodePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder() { + if (awsNodePoolBuilder_ != null) { + return awsNodePoolBuilder_.getMessageOrBuilder(); + } else { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } + } + /** + * + * + *
+     * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + getAwsNodePoolFieldBuilder() { + if (awsNodePoolBuilder_ == null) { + awsNodePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder>( + getAwsNodePool(), getParentForChildren(), isClean()); + awsNodePool_ = null; + } + return awsNodePoolBuilder_; + } + + private java.lang.Object awsNodePoolId_ = ""; + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsNodePoolId. + */ + public java.lang.String getAwsNodePoolId() { + java.lang.Object ref = awsNodePoolId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsNodePoolId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsNodePoolId. + */ + public com.google.protobuf.ByteString getAwsNodePoolIdBytes() { + java.lang.Object ref = awsNodePoolId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsNodePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The awsNodePoolId to set. + * @return This builder for chaining. + */ + public Builder setAwsNodePoolId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + awsNodePoolId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAwsNodePoolId() { + + awsNodePoolId_ = getDefaultInstance().getAwsNodePoolId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for awsNodePoolId to set. + * @return This builder for chaining. + */ + public Builder setAwsNodePoolIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + awsNodePoolId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAwsNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAwsNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..228adf1 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAwsNodePoolRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface CreateAwsNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + boolean hasAwsNodePool(); + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool(); + /** + * + * + *
+   * Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder(); + + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The awsNodePoolId. + */ + java.lang.String getAwsNodePoolId(); + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for awsNodePoolId. + */ + com.google.protobuf.ByteString getAwsNodePoolIdBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually create the node
+   * pool.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequest.java new file mode 100644 index 0000000..f245e74 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequest.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.CreateAzureClient` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureClientRequest} + */ +public final class CreateAzureClientRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.CreateAzureClientRequest) + CreateAzureClientRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAzureClientRequest.newBuilder() to construct. + private CreateAzureClientRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAzureClientRequest() { + parent_ = ""; + azureClientId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAzureClientRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAzureClientRequest( + 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.cloud.gkemulticloud.v1.AzureClient.Builder subBuilder = null; + if (azureClient_ != null) { + subBuilder = azureClient_.toBuilder(); + } + azureClient_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureClient.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureClient_); + azureClient_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + validateOnly_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureClientId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_CLIENT_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AzureClient azureClient_; + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureClient field is set. + */ + @java.lang.Override + public boolean hasAzureClient() { + return azureClient_ != null; + } + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureClient. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient getAzureClient() { + return azureClient_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance() + : azureClient_; + } + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientOrBuilder() { + return getAzureClient(); + } + + public static final int AZURE_CLIENT_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object azureClientId_; + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClientId. + */ + @java.lang.Override + public java.lang.String getAzureClientId() { + java.lang.Object ref = azureClientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClientId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureClientIdBytes() { + java.lang.Object ref = azureClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually create the client.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (azureClient_ != null) { + output.writeMessage(2, getAzureClient()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClientId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, azureClientId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (azureClient_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAzureClient()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClientId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, azureClientId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest other = + (com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAzureClient() != other.hasAzureClient()) return false; + if (hasAzureClient()) { + if (!getAzureClient().equals(other.getAzureClient())) return false; + } + if (!getAzureClientId().equals(other.getAzureClientId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasAzureClient()) { + hash = (37 * hash) + AZURE_CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getAzureClient().hashCode(); + } + hash = (37 * hash) + AZURE_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAzureClientId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest 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 `AzureClusters.CreateAzureClient` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureClientRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.CreateAzureClientRequest) + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.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 (azureClientBuilder_ == null) { + azureClient_ = null; + } else { + azureClient_ = null; + azureClientBuilder_ = null; + } + azureClientId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClientRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest build() { + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest result = + new com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest(this); + result.parent_ = parent_; + if (azureClientBuilder_ == null) { + result.azureClient_ = azureClient_; + } else { + result.azureClient_ = azureClientBuilder_.build(); + } + result.azureClientId_ = azureClientId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAzureClient()) { + mergeAzureClient(other.getAzureClient()); + } + if (!other.getAzureClientId().isEmpty()) { + azureClientId_ = other.azureClientId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureClient azureClient_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder> + azureClientBuilder_; + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureClient field is set. + */ + public boolean hasAzureClient() { + return azureClientBuilder_ != null || azureClient_ != null; + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureClient. + */ + public com.google.cloud.gkemulticloud.v1.AzureClient getAzureClient() { + if (azureClientBuilder_ == null) { + return azureClient_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance() + : azureClient_; + } else { + return azureClientBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureClient(com.google.cloud.gkemulticloud.v1.AzureClient value) { + if (azureClientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureClient_ = value; + onChanged(); + } else { + azureClientBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureClient( + com.google.cloud.gkemulticloud.v1.AzureClient.Builder builderForValue) { + if (azureClientBuilder_ == null) { + azureClient_ = builderForValue.build(); + onChanged(); + } else { + azureClientBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAzureClient(com.google.cloud.gkemulticloud.v1.AzureClient value) { + if (azureClientBuilder_ == null) { + if (azureClient_ != null) { + azureClient_ = + com.google.cloud.gkemulticloud.v1.AzureClient.newBuilder(azureClient_) + .mergeFrom(value) + .buildPartial(); + } else { + azureClient_ = value; + } + onChanged(); + } else { + azureClientBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAzureClient() { + if (azureClientBuilder_ == null) { + azureClient_ = null; + onChanged(); + } else { + azureClient_ = null; + azureClientBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClient.Builder getAzureClientBuilder() { + + onChanged(); + return getAzureClientFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientOrBuilder() { + if (azureClientBuilder_ != null) { + return azureClientBuilder_.getMessageOrBuilder(); + } else { + return azureClient_ == null + ? com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance() + : azureClient_; + } + } + /** + * + * + *
+     * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder> + getAzureClientFieldBuilder() { + if (azureClientBuilder_ == null) { + azureClientBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder>( + getAzureClient(), getParentForChildren(), isClean()); + azureClient_ = null; + } + return azureClientBuilder_; + } + + private java.lang.Object azureClientId_ = ""; + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClientId. + */ + public java.lang.String getAzureClientId() { + java.lang.Object ref = azureClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClientId. + */ + public com.google.protobuf.ByteString getAzureClientIdBytes() { + java.lang.Object ref = azureClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureClientId to set. + * @return This builder for chaining. + */ + public Builder setAzureClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureClientId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureClientId() { + + azureClientId_ = getDefaultInstance().getAzureClientId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureClientId to set. + * @return This builder for chaining. + */ + public Builder setAzureClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureClientId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually create the client.
+     * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the client.
+     * 
+ * + * bool validate_only = 3; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the client.
+     * 
+ * + * bool validate_only = 3; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.CreateAzureClientRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.CreateAzureClientRequest) + private static final com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAzureClientRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAzureClientRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequestOrBuilder.java new file mode 100644 index 0000000..49e91ab --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClientRequestOrBuilder.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface CreateAzureClientRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.CreateAzureClientRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureClient field is set. + */ + boolean hasAzureClient(); + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureClient. + */ + com.google.cloud.gkemulticloud.v1.AzureClient getAzureClient(); + /** + * + * + *
+   * Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientOrBuilder(); + + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClientId. + */ + java.lang.String getAzureClientId(); + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClientId. + */ + com.google.protobuf.ByteString getAzureClientIdBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually create the client.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequest.java new file mode 100644 index 0000000..7b17ad1 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequest.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.CreateAzureCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureClusterRequest} + */ +public final class CreateAzureClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) + CreateAzureClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAzureClusterRequest.newBuilder() to construct. + private CreateAzureClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAzureClusterRequest() { + parent_ = ""; + azureClusterId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAzureClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAzureClusterRequest( + 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.cloud.gkemulticloud.v1.AzureCluster.Builder subBuilder = null; + if (azureCluster_ != null) { + subBuilder = azureCluster_.toBuilder(); + } + azureCluster_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureCluster_); + azureCluster_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureClusterId_ = s; + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_CLUSTER_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AzureCluster azureCluster_; + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + @java.lang.Override + public boolean hasAzureCluster() { + return azureCluster_ != null; + } + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster() { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder() { + return getAzureCluster(); + } + + public static final int AZURE_CLUSTER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object azureClusterId_; + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClusterId. + */ + @java.lang.Override + public java.lang.String getAzureClusterId() { + java.lang.Object ref = azureClusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClusterId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureClusterIdBytes() { + java.lang.Object ref = azureClusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually create the cluster.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (azureCluster_ != null) { + output.writeMessage(2, getAzureCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, azureClusterId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (azureCluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAzureCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureClusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, azureClusterId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest other = + (com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAzureCluster() != other.hasAzureCluster()) return false; + if (hasAzureCluster()) { + if (!getAzureCluster().equals(other.getAzureCluster())) return false; + } + if (!getAzureClusterId().equals(other.getAzureClusterId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasAzureCluster()) { + hash = (37 * hash) + AZURE_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAzureCluster().hashCode(); + } + hash = (37 * hash) + AZURE_CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getAzureClusterId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest 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 `AzureClusters.CreateAzureCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.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 (azureClusterBuilder_ == null) { + azureCluster_ = null; + } else { + azureCluster_ = null; + azureClusterBuilder_ = null; + } + azureClusterId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest build() { + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest result = + new com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest(this); + result.parent_ = parent_; + if (azureClusterBuilder_ == null) { + result.azureCluster_ = azureCluster_; + } else { + result.azureCluster_ = azureClusterBuilder_.build(); + } + result.azureClusterId_ = azureClusterId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAzureCluster()) { + mergeAzureCluster(other.getAzureCluster()); + } + if (!other.getAzureClusterId().isEmpty()) { + azureClusterId_ = other.azureClusterId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+     * will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureCluster azureCluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + azureClusterBuilder_; + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + public boolean hasAzureCluster() { + return azureClusterBuilder_ != null || azureCluster_ != null; + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster() { + if (azureClusterBuilder_ == null) { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } else { + return azureClusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureCluster(com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureCluster_ = value; + onChanged(); + } else { + azureClusterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureCluster( + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder builderForValue) { + if (azureClusterBuilder_ == null) { + azureCluster_ = builderForValue.build(); + onChanged(); + } else { + azureClusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAzureCluster(com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClusterBuilder_ == null) { + if (azureCluster_ != null) { + azureCluster_ = + com.google.cloud.gkemulticloud.v1.AzureCluster.newBuilder(azureCluster_) + .mergeFrom(value) + .buildPartial(); + } else { + azureCluster_ = value; + } + onChanged(); + } else { + azureClusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAzureCluster() { + if (azureClusterBuilder_ == null) { + azureCluster_ = null; + onChanged(); + } else { + azureCluster_ = null; + azureClusterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster.Builder getAzureClusterBuilder() { + + onChanged(); + return getAzureClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder() { + if (azureClusterBuilder_ != null) { + return azureClusterBuilder_.getMessageOrBuilder(); + } else { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } + } + /** + * + * + *
+     * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + getAzureClusterFieldBuilder() { + if (azureClusterBuilder_ == null) { + azureClusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder>( + getAzureCluster(), getParentForChildren(), isClean()); + azureCluster_ = null; + } + return azureClusterBuilder_; + } + + private java.lang.Object azureClusterId_ = ""; + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClusterId. + */ + public java.lang.String getAzureClusterId() { + java.lang.Object ref = azureClusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureClusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClusterId. + */ + public com.google.protobuf.ByteString getAzureClusterIdBytes() { + java.lang.Object ref = azureClusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureClusterId to set. + * @return This builder for chaining. + */ + public Builder setAzureClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureClusterId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureClusterId() { + + azureClusterId_ = getDefaultInstance().getAzureClusterId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureClusterId to set. + * @return This builder for chaining. + */ + public Builder setAzureClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureClusterId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the cluster.
+     * 
+ * + * bool validate_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAzureClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAzureClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequestOrBuilder.java new file mode 100644 index 0000000..1a908c0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureClusterRequestOrBuilder.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface CreateAzureClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.CreateAzureClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
+   * will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + boolean hasAzureCluster(); + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster(); + /** + * + * + *
+   * Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder(); + + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureClusterId. + */ + java.lang.String getAzureClusterId(); + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureClusterId. + */ + com.google.protobuf.ByteString getAzureClusterIdBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually create the cluster.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequest.java new file mode 100644 index 0000000..45fee12 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequest.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AzureClusters.CreateAzureNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest} + */ +public final class CreateAzureNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) + CreateAzureNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAzureNodePoolRequest.newBuilder() to construct. + private CreateAzureNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAzureNodePoolRequest() { + parent_ = ""; + azureNodePoolId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAzureNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAzureNodePoolRequest( + 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.cloud.gkemulticloud.v1.AzureNodePool.Builder subBuilder = null; + if (azureNodePool_ != null) { + subBuilder = azureNodePool_.toBuilder(); + } + azureNodePool_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureNodePool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureNodePool_); + azureNodePool_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureNodePoolId_ = s; + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_NODE_POOL_FIELD_NUMBER = 2; + private com.google.cloud.gkemulticloud.v1.AzureNodePool azureNodePool_; + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + @java.lang.Override + public boolean hasAzureNodePool() { + return azureNodePool_ != null; + } + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool() { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder() { + return getAzureNodePool(); + } + + public static final int AZURE_NODE_POOL_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object azureNodePoolId_; + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureNodePoolId. + */ + @java.lang.Override + public java.lang.String getAzureNodePoolId() { + java.lang.Object ref = azureNodePoolId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureNodePoolId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureNodePoolId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureNodePoolIdBytes() { + java.lang.Object ref = azureNodePoolId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureNodePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually create the node
+   * pool.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (azureNodePool_ != null) { + output.writeMessage(2, getAzureNodePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureNodePoolId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, azureNodePoolId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (azureNodePool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAzureNodePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureNodePoolId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, azureNodePoolId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAzureNodePool() != other.hasAzureNodePool()) return false; + if (hasAzureNodePool()) { + if (!getAzureNodePool().equals(other.getAzureNodePool())) return false; + } + if (!getAzureNodePoolId().equals(other.getAzureNodePoolId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasAzureNodePool()) { + hash = (37 * hash) + AZURE_NODE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getAzureNodePool().hashCode(); + } + hash = (37 * hash) + AZURE_NODE_POOL_ID_FIELD_NUMBER; + hash = (53 * hash) + getAzureNodePoolId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest 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 `AzureClusters.CreateAzureNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.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 (azureNodePoolBuilder_ == null) { + azureNodePool_ = null; + } else { + azureNodePool_ = null; + azureNodePoolBuilder_ = null; + } + azureNodePoolId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest(this); + result.parent_ = parent_; + if (azureNodePoolBuilder_ == null) { + result.azureNodePool_ = azureNodePool_; + } else { + result.azureNodePool_ = azureNodePoolBuilder_.build(); + } + result.azureNodePoolId_ = azureNodePoolId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAzureNodePool()) { + mergeAzureNodePool(other.getAzureNodePool()); + } + if (!other.getAzureNodePoolId().isEmpty()) { + azureNodePoolId_ = other.azureNodePoolId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureNodePool azureNodePool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + azureNodePoolBuilder_; + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + public boolean hasAzureNodePool() { + return azureNodePoolBuilder_ != null || azureNodePool_ != null; + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool() { + if (azureNodePoolBuilder_ == null) { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } else { + return azureNodePoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureNodePool(com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureNodePool_ = value; + onChanged(); + } else { + azureNodePoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureNodePool( + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder builderForValue) { + if (azureNodePoolBuilder_ == null) { + azureNodePool_ = builderForValue.build(); + onChanged(); + } else { + azureNodePoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAzureNodePool(com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolBuilder_ == null) { + if (azureNodePool_ != null) { + azureNodePool_ = + com.google.cloud.gkemulticloud.v1.AzureNodePool.newBuilder(azureNodePool_) + .mergeFrom(value) + .buildPartial(); + } else { + azureNodePool_ = value; + } + onChanged(); + } else { + azureNodePoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAzureNodePool() { + if (azureNodePoolBuilder_ == null) { + azureNodePool_ = null; + onChanged(); + } else { + azureNodePool_ = null; + azureNodePoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder getAzureNodePoolBuilder() { + + onChanged(); + return getAzureNodePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder() { + if (azureNodePoolBuilder_ != null) { + return azureNodePoolBuilder_.getMessageOrBuilder(); + } else { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } + } + /** + * + * + *
+     * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + getAzureNodePoolFieldBuilder() { + if (azureNodePoolBuilder_ == null) { + azureNodePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder>( + getAzureNodePool(), getParentForChildren(), isClean()); + azureNodePool_ = null; + } + return azureNodePoolBuilder_; + } + + private java.lang.Object azureNodePoolId_ = ""; + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureNodePoolId. + */ + public java.lang.String getAzureNodePoolId() { + java.lang.Object ref = azureNodePoolId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureNodePoolId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureNodePoolId. + */ + public com.google.protobuf.ByteString getAzureNodePoolIdBytes() { + java.lang.Object ref = azureNodePoolId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureNodePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureNodePoolId to set. + * @return This builder for chaining. + */ + public Builder setAzureNodePoolId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureNodePoolId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureNodePoolId() { + + azureNodePoolId_ = getDefaultInstance().getAzureNodePoolId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A client provided ID the resource. Must be unique within the parent
+     * resource.
+     * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+     * resource name formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+     * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureNodePoolId to set. + * @return This builder for chaining. + */ + public Builder setAzureNodePoolIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureNodePoolId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually create the node
+     * pool.
+     * 
+ * + * bool validate_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAzureNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAzureNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..fde4038 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/CreateAzureNodePoolRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface CreateAzureNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + boolean hasAzureNodePool(); + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool(); + /** + * + * + *
+   * Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder(); + + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureNodePoolId. + */ + java.lang.String getAzureNodePoolId(); + /** + * + * + *
+   * Required. A client provided ID the resource. Must be unique within the parent
+   * resource.
+   * The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
+   * resource name formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+   * 
+ * + * string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureNodePoolId. + */ + com.google.protobuf.ByteString getAzureNodePoolIdBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually create the node
+   * pool.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequest.java new file mode 100644 index 0000000..329ba9b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequest.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.DeleteAwsCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} + */ +public final class DeleteAwsClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + DeleteAwsClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAwsClusterRequest.newBuilder() to construct. + private DeleteAwsClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAwsClusterRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAwsClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAwsClusterRequest( + 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: + { + validateOnly_ = input.readBool(); + break; + } + case 24: + { + allowMissing_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest other = + (com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getEtag().equals(other.getEtag())) 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) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest 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 `AwsClusters.DeleteAwsCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.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_ = ""; + + validateOnly_ = false; + + allowMissing_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest build() { + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest result = + new com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(this); + result.name_ = name_; + result.validateOnly_ = validateOnly_; + result.allowMissing_ = allowMissing_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAwsClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAwsClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequestOrBuilder.java new file mode 100644 index 0000000..8ccdb49 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsClusterRequestOrBuilder.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/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface DeleteAwsClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequest.java new file mode 100644 index 0000000..9fa7d94 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequest.java @@ -0,0 +1,1077 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.DeleteNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} + */ +public final class DeleteAwsNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + DeleteAwsNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAwsNodePoolRequest.newBuilder() to construct. + private DeleteAwsNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAwsNodePoolRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAwsNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAwsNodePoolRequest( + 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: + { + validateOnly_ = input.readBool(); + break; + } + case 24: + { + allowMissing_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the node
+   * pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getEtag().equals(other.getEtag())) 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) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest 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 `AwsClusters.DeleteNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.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_ = ""; + + validateOnly_ = false; + + allowMissing_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(this); + result.name_ = name_; + result.validateOnly_ = validateOnly_; + result.allowMissing_ = allowMissing_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAwsNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAwsNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..6cd8cb3 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAwsNodePoolRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface DeleteAwsNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the node
+   * pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequest.java new file mode 100644 index 0000000..b7850ff --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequest.java @@ -0,0 +1,873 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.DeleteAzureClient` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureClientRequest} + */ +public final class DeleteAzureClientRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) + DeleteAzureClientRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAzureClientRequest.newBuilder() to construct. + private DeleteAzureClientRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAzureClientRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAzureClientRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAzureClientRequest( + 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: + { + allowMissing_ = input.readBool(); + break; + } + case 24: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest other = + (com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) 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) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest 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 `AzureClusters.DeleteAzureClient` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureClientRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.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_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClientRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest build() { + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest result = + new com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest(this); + result.name_ = name_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) + private static final com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAzureClientRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAzureClientRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequestOrBuilder.java new file mode 100644 index 0000000..754a1fe --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClientRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface DeleteAzureClientRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.DeleteAzureClientRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java new file mode 100644 index 0000000..3041cf0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `Clusters.DeleteAzureCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest} + */ +public final class DeleteAzureClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) + DeleteAzureClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAzureClusterRequest.newBuilder() to construct. + private DeleteAzureClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAzureClusterRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAzureClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAzureClusterRequest( + 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: + { + allowMissing_ = input.readBool(); + break; + } + case 24: + { + validateOnly_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest other = + (com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest 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 `Clusters.DeleteAzureCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.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_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest build() { + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest result = + new com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest(this); + result.name_ = name_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the resource.
+     * 
+ * + * bool validate_only = 3; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided etag does not match the current etag of the cluster,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAzureClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAzureClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java new file mode 100644 index 0000000..880bf51 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface DeleteAzureClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the resource.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided etag does not match the current etag of the cluster,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java new file mode 100644 index 0000000..7d6c422 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java @@ -0,0 +1,1080 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Delete message for `AzureClusters.DeleteNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest} + */ +public final class DeleteAzureNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) + DeleteAzureNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAzureNodePoolRequest.newBuilder() to construct. + private DeleteAzureNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAzureNodePoolRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAzureNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAzureNodePoolRequest( + 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: + { + validateOnly_ = input.readBool(); + break; + } + case 24: + { + allowMissing_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the node
+   * pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getEtag().equals(other.getEtag())) 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) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest 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; + } + /** + * + * + *
+   * Delete message for `AzureClusters.DeleteNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.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_ = ""; + + validateOnly_ = false; + + allowMissing_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest(this); + result.name_ = name_; + result.validateOnly_ = validateOnly_; + result.allowMissing_ = allowMissing_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually delete the node
+     * pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found,
+     * the request will succeed but no action will be taken on the server and a
+     * completed [Operation][google.longrunning.Operation] will be returned.
+     * Useful for idempotent deletion.
+     * 
+ * + * bool allow_missing = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+     * Allows clients to perform deletions through optimistic concurrency control.
+     * If the provided ETag does not match the current etag of the node pool,
+     * the request will fail and an ABORTED error will be returned.
+     * 
+ * + * string etag = 4; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAzureNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAzureNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..e3269e4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface DeleteAzureNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually delete the node
+   * pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found,
+   * the request will succeed but no action will be taken on the server and a
+   * completed [Operation][google.longrunning.Operation] will be returned.
+   * Useful for idempotent deletion.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
+   * Allows clients to perform deletions through optimistic concurrency control.
+   * If the provided ETag does not match the current etag of the node pool,
+   * the request will fail and an ABORTED error will be returned.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/Fleet.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/Fleet.java new file mode 100644 index 0000000..1234639 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/Fleet.java @@ -0,0 +1,854 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Fleet related configuration.
+ * Fleets are a Google Cloud concept for logically organizing clusters,
+ * letting you use and manage multi-cluster capabilities and apply
+ * consistent policies across your systems.
+ * See [Anthos
+ * Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for
+ * more details on Anthos multi-cluster capabilities using Fleets.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.Fleet} + */ +public final class Fleet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.Fleet) + FleetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Fleet.newBuilder() to construct. + private Fleet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Fleet() { + project_ = ""; + membership_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Fleet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Fleet( + 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(); + + project_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + membership_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_Fleet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.Fleet.class, + com.google.cloud.gkemulticloud.v1.Fleet.Builder.class); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + private volatile java.lang.Object project_; + /** + * + * + *
+   * Required. The name of the Fleet host project where this cluster will be registered.
+   * Project names are formatted as
+   * `projects/<project-number>`.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Fleet host project where this cluster will be registered.
+   * Project names are formatted as
+   * `projects/<project-number>`.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERSHIP_FIELD_NUMBER = 2; + private volatile java.lang.Object membership_; + /** + * + * + *
+   * Output only. The name of the managed Hub Membership resource associated to this cluster.
+   * Membership names are formatted as
+   * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+   * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The membership. + */ + @java.lang.Override + public java.lang.String getMembership() { + java.lang.Object ref = membership_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + membership_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the managed Hub Membership resource associated to this cluster.
+   * Membership names are formatted as
+   * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+   * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for membership. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMembershipBytes() { + java.lang.Object ref = membership_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + membership_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(membership_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, membership_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(membership_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, membership_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.Fleet)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.Fleet other = (com.google.cloud.gkemulticloud.v1.Fleet) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getMembership().equals(other.getMembership())) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + MEMBERSHIP_FIELD_NUMBER; + hash = (53 * hash) + getMembership().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.Fleet 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; + } + /** + * + * + *
+   * Fleet related configuration.
+   * Fleets are a Google Cloud concept for logically organizing clusters,
+   * letting you use and manage multi-cluster capabilities and apply
+   * consistent policies across your systems.
+   * See [Anthos
+   * Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for
+   * more details on Anthos multi-cluster capabilities using Fleets.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.Fleet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.Fleet) + com.google.cloud.gkemulticloud.v1.FleetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_Fleet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.Fleet.class, + com.google.cloud.gkemulticloud.v1.Fleet.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.Fleet.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(); + project_ = ""; + + membership_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_Fleet_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet build() { + com.google.cloud.gkemulticloud.v1.Fleet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet buildPartial() { + com.google.cloud.gkemulticloud.v1.Fleet result = + new com.google.cloud.gkemulticloud.v1.Fleet(this); + result.project_ = project_; + result.membership_ = membership_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.Fleet) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.Fleet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.Fleet other) { + if (other == com.google.cloud.gkemulticloud.v1.Fleet.getDefaultInstance()) return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (!other.getMembership().isEmpty()) { + membership_ = other.membership_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.Fleet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.Fleet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object project_ = ""; + /** + * + * + *
+     * Required. The name of the Fleet host project where this cluster will be registered.
+     * Project names are formatted as
+     * `projects/<project-number>`.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Fleet host project where this cluster will be registered.
+     * Project names are formatted as
+     * `projects/<project-number>`.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Fleet host project where this cluster will be registered.
+     * Project names are formatted as
+     * `projects/<project-number>`.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Fleet host project where this cluster will be registered.
+     * Project names are formatted as
+     * `projects/<project-number>`.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Fleet host project where this cluster will be registered.
+     * Project names are formatted as
+     * `projects/<project-number>`.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private java.lang.Object membership_ = ""; + /** + * + * + *
+     * Output only. The name of the managed Hub Membership resource associated to this cluster.
+     * Membership names are formatted as
+     * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+     * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The membership. + */ + public java.lang.String getMembership() { + java.lang.Object ref = membership_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + membership_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the managed Hub Membership resource associated to this cluster.
+     * Membership names are formatted as
+     * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+     * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for membership. + */ + public com.google.protobuf.ByteString getMembershipBytes() { + java.lang.Object ref = membership_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + membership_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the managed Hub Membership resource associated to this cluster.
+     * Membership names are formatted as
+     * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+     * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The membership to set. + * @return This builder for chaining. + */ + public Builder setMembership(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + membership_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the managed Hub Membership resource associated to this cluster.
+     * Membership names are formatted as
+     * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+     * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMembership() { + + membership_ = getDefaultInstance().getMembership(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the managed Hub Membership resource associated to this cluster.
+     * Membership names are formatted as
+     * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+     * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for membership to set. + * @return This builder for chaining. + */ + public Builder setMembershipBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + membership_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.Fleet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.Fleet) + private static final com.google.cloud.gkemulticloud.v1.Fleet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.Fleet(); + } + + public static com.google.cloud.gkemulticloud.v1.Fleet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Fleet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Fleet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.Fleet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/FleetOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/FleetOrBuilder.java new file mode 100644 index 0000000..fa25a8a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/FleetOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface FleetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.Fleet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Fleet host project where this cluster will be registered.
+   * Project names are formatted as
+   * `projects/<project-number>`.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Required. The name of the Fleet host project where this cluster will be registered.
+   * Project names are formatted as
+   * `projects/<project-number>`.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Output only. The name of the managed Hub Membership resource associated to this cluster.
+   * Membership names are formatted as
+   * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+   * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The membership. + */ + java.lang.String getMembership(); + /** + * + * + *
+   * Output only. The name of the managed Hub Membership resource associated to this cluster.
+   * Membership names are formatted as
+   * `projects/<project-number>/locations/global/membership/<cluster-id>`.
+   * 
+ * + * string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for membership. + */ + com.google.protobuf.ByteString getMembershipBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequest.java new file mode 100644 index 0000000..e0a14df --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequest.java @@ -0,0 +1,688 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.GenerateAwsAccessToken` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} + */ +public final class GenerateAwsAccessTokenRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + GenerateAwsAccessTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateAwsAccessTokenRequest.newBuilder() to construct. + private GenerateAwsAccessTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateAwsAccessTokenRequest() { + awsCluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateAwsAccessTokenRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateAwsAccessTokenRequest( + 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(); + + awsCluster_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.class, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.Builder.class); + } + + public static final int AWS_CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object awsCluster_; + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The awsCluster. + */ + @java.lang.Override + public java.lang.String getAwsCluster() { + java.lang.Object ref = awsCluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsCluster_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for awsCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAwsClusterBytes() { + java.lang.Object ref = awsCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsCluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, awsCluster_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsCluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, awsCluster_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest other = + (com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) obj; + + if (!getAwsCluster().equals(other.getAwsCluster())) 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) + AWS_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAwsCluster().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest 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 `AwsClusters.GenerateAwsAccessToken` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.class, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.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(); + awsCluster_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest build() { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest result = + new com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(this); + result.awsCluster_ = awsCluster_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.getDefaultInstance()) + return this; + if (!other.getAwsCluster().isEmpty()) { + awsCluster_ = other.awsCluster_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object awsCluster_ = ""; + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The awsCluster. + */ + public java.lang.String getAwsCluster() { + java.lang.Object ref = awsCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + awsCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for awsCluster. + */ + public com.google.protobuf.ByteString getAwsClusterBytes() { + java.lang.Object ref = awsCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + awsCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The awsCluster to set. + * @return This builder for chaining. + */ + public Builder setAwsCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + awsCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAwsCluster() { + + awsCluster_ = getDefaultInstance().getAwsCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for awsCluster to set. + * @return This builder for chaining. + */ + public Builder setAwsClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + awsCluster_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + private static final com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAwsAccessTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateAwsAccessTokenRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequestOrBuilder.java new file mode 100644 index 0000000..a04cdab --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GenerateAwsAccessTokenRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The awsCluster. + */ + java.lang.String getAwsCluster(); + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for awsCluster. + */ + com.google.protobuf.ByteString getAwsClusterBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponse.java new file mode 100644 index 0000000..7d87665 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponse.java @@ -0,0 +1,947 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AwsClusters.GenerateAwsAccessToken` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} + */ +public final class GenerateAwsAccessTokenResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + GenerateAwsAccessTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateAwsAccessTokenResponse.newBuilder() to construct. + private GenerateAwsAccessTokenResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateAwsAccessTokenResponse() { + accessToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateAwsAccessTokenResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateAwsAccessTokenResponse( + 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(); + + accessToken_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expirationTime_ != null) { + subBuilder = expirationTime_.toBuilder(); + } + expirationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expirationTime_); + expirationTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.class, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.Builder.class); + } + + public static final int ACCESS_TOKEN_FIELD_NUMBER = 1; + private volatile java.lang.Object accessToken_; + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + @java.lang.Override + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expirationTime_; + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return expirationTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return getExpirationTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessToken_); + } + if (expirationTime_ != null) { + output.writeMessage(2, getExpirationTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessToken_); + } + if (expirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpirationTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse other = + (com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) obj; + + if (!getAccessToken().equals(other.getAccessToken())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) 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) + ACCESS_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAccessToken().hashCode(); + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse 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 `AwsClusters.GenerateAwsAccessToken` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.class, + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.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(); + accessToken_ = ""; + + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAwsAccessTokenResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse build() { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse result = + new com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(this); + result.accessToken_ = accessToken_; + if (expirationTimeBuilder_ == null) { + result.expirationTime_ = expirationTime_; + } else { + result.expirationTime_ = expirationTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse other) { + if (other + == com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.getDefaultInstance()) + return this; + if (!other.getAccessToken().isEmpty()) { + accessToken_ = other.accessToken_; + onChanged(); + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accessToken_ = ""; + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAccessToken() { + + accessToken_ = getDefaultInstance().getAccessToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return expirationTimeBuilder_ != null || expirationTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + onChanged(); + } else { + expirationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + onChanged(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (expirationTime_ != null) { + expirationTime_ = + com.google.protobuf.Timestamp.newBuilder(expirationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + expirationTime_ = value; + } + onChanged(); + } else { + expirationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpirationTime() { + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + onChanged(); + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + private static final com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAwsAccessTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateAwsAccessTokenResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponseOrBuilder.java new file mode 100644 index 0000000..8f16c9a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAwsAccessTokenResponseOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GenerateAwsAccessTokenResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + java.lang.String getAccessToken(); + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + com.google.protobuf.ByteString getAccessTokenBytes(); + + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequest.java new file mode 100644 index 0000000..d4b82ae --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequest.java @@ -0,0 +1,691 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.GenerateAzureAccessToken` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest} + */ +public final class GenerateAzureAccessTokenRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + GenerateAzureAccessTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateAzureAccessTokenRequest.newBuilder() to construct. + private GenerateAzureAccessTokenRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateAzureAccessTokenRequest() { + azureCluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateAzureAccessTokenRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateAzureAccessTokenRequest( + 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(); + + azureCluster_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.class, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.Builder.class); + } + + public static final int AZURE_CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object azureCluster_; + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The azureCluster. + */ + @java.lang.Override + public java.lang.String getAzureCluster() { + java.lang.Object ref = azureCluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureCluster_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for azureCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureClusterBytes() { + java.lang.Object ref = azureCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureCluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, azureCluster_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureCluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, azureCluster_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest other = + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) obj; + + if (!getAzureCluster().equals(other.getAzureCluster())) 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) + AZURE_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAzureCluster().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest 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 `AzureClusters.GenerateAzureAccessToken` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.class, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.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(); + azureCluster_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest build() { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest result = + new com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest(this); + result.azureCluster_ = azureCluster_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest.getDefaultInstance()) + return this; + if (!other.getAzureCluster().isEmpty()) { + azureCluster_ = other.azureCluster_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object azureCluster_ = ""; + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The azureCluster. + */ + public java.lang.String getAzureCluster() { + java.lang.Object ref = azureCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for azureCluster. + */ + public com.google.protobuf.ByteString getAzureClusterBytes() { + java.lang.Object ref = azureCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The azureCluster to set. + * @return This builder for chaining. + */ + public Builder setAzureCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAzureCluster() { + + azureCluster_ = getDefaultInstance().getAzureCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for azureCluster to set. + * @return This builder for chaining. + */ + public Builder setAzureClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureCluster_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + private static final com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAzureAccessTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateAzureAccessTokenRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequestOrBuilder.java new file mode 100644 index 0000000..efa1558 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GenerateAzureAccessTokenRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The azureCluster. + */ + java.lang.String getAzureCluster(); + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for azureCluster. + */ + com.google.protobuf.ByteString getAzureClusterBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponse.java new file mode 100644 index 0000000..7a9797a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponse.java @@ -0,0 +1,951 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AzureClusters.GenerateAzureAccessToken` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse} + */ +public final class GenerateAzureAccessTokenResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + GenerateAzureAccessTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateAzureAccessTokenResponse.newBuilder() to construct. + private GenerateAzureAccessTokenResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateAzureAccessTokenResponse() { + accessToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateAzureAccessTokenResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateAzureAccessTokenResponse( + 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(); + + accessToken_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expirationTime_ != null) { + subBuilder = expirationTime_.toBuilder(); + } + expirationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expirationTime_); + expirationTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.class, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.Builder.class); + } + + public static final int ACCESS_TOKEN_FIELD_NUMBER = 1; + private volatile java.lang.Object accessToken_; + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + @java.lang.Override + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expirationTime_; + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return expirationTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return getExpirationTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessToken_); + } + if (expirationTime_ != null) { + output.writeMessage(2, getExpirationTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessToken_); + } + if (expirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpirationTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse other = + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) obj; + + if (!getAccessToken().equals(other.getAccessToken())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) 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) + ACCESS_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAccessToken().hashCode(); + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse 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 `AzureClusters.GenerateAzureAccessToken` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.class, + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.Builder.class); + } + + // Construct using + // com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse.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(); + accessToken_ = ""; + + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GenerateAzureAccessTokenResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse build() { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse result = + new com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse(this); + result.accessToken_ = accessToken_; + if (expirationTimeBuilder_ == null) { + result.expirationTime_ = expirationTime_; + } else { + result.expirationTime_ = expirationTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) { + return mergeFrom( + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse other) { + if (other + == com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + .getDefaultInstance()) return this; + if (!other.getAccessToken().isEmpty()) { + accessToken_ = other.accessToken_; + onChanged(); + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accessToken_ = ""; + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + public java.lang.String getAccessToken() { + java.lang.Object ref = accessToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + public com.google.protobuf.ByteString getAccessTokenBytes() { + java.lang.Object ref = accessToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAccessToken() { + + accessToken_ = getDefaultInstance().getAccessToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Access token to authenticate to k8s api-server.
+     * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for accessToken to set. + * @return This builder for chaining. + */ + public Builder setAccessTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return expirationTimeBuilder_ != null || expirationTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + onChanged(); + } else { + expirationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + onChanged(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (expirationTime_ != null) { + expirationTime_ = + com.google.protobuf.Timestamp.newBuilder(expirationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + expirationTime_ = value; + } + onChanged(); + } else { + expirationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpirationTime() { + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + onChanged(); + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp at which the token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + private static final com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAzureAccessTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateAzureAccessTokenResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponseOrBuilder.java new file mode 100644 index 0000000..cac940d --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GenerateAzureAccessTokenResponseOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GenerateAzureAccessTokenResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessToken. + */ + java.lang.String getAccessToken(); + /** + * + * + *
+   * Output only. Access token to authenticate to k8s api-server.
+   * 
+ * + * string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessToken. + */ + com.google.protobuf.ByteString getAccessTokenBytes(); + + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp at which the token will expire.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequest.java new file mode 100644 index 0000000..56c52c7 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.GetAwsCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsClusterRequest} + */ +public final class GetAwsClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + GetAwsClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAwsClusterRequest.newBuilder() to construct. + private GetAwsClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAwsClusterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAwsClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAwsClusterRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest other = + (com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest 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 `AwsClusters.GetAwsCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest build() { + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest result = + new com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAwsClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAwsClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequestOrBuilder.java new file mode 100644 index 0000000..a7cd216 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsClusterRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAwsClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequest.java new file mode 100644 index 0000000..a3776cf --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.GetAwsNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} + */ +public final class GetAwsNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + GetAwsNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAwsNodePoolRequest.newBuilder() to construct. + private GetAwsNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAwsNodePoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAwsNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAwsNodePoolRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest 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 `AwsClusters.GetAwsNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+     * `AwsNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAwsNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAwsNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..1f2fb73 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsNodePoolRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAwsNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe.
+   * `AwsNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequest.java new file mode 100644 index 0000000..5977351 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * GetAwsServerConfigRequest gets the server config of GKE cluster on AWS.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} + */ +public final class GetAwsServerConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + GetAwsServerConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAwsServerConfigRequest.newBuilder() to construct. + private GetAwsServerConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAwsServerConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAwsServerConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAwsServerConfigRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+   * `AwsServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+   * `AwsServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest other = + (com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest 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; + } + /** + * + * + *
+   * GetAwsServerConfigRequest gets the server config of GKE cluster on AWS.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.class, + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAwsServerConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest build() { + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest result = + new com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+     * `AwsServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+     * `AwsServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+     * `AwsServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+     * `AwsServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+     * `AwsServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAwsServerConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAwsServerConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequestOrBuilder.java new file mode 100644 index 0000000..cc6e8f9 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAwsServerConfigRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAwsServerConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+   * `AwsServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
+   * `AwsServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequest.java new file mode 100644 index 0000000..85fb872 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.GetAzureClient` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureClientRequest} + */ +public final class GetAzureClientRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAzureClientRequest) + GetAzureClientRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAzureClientRequest.newBuilder() to construct. + private GetAzureClientRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAzureClientRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAzureClientRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAzureClientRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAzureClientRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest other = + (com.google.cloud.gkemulticloud.v1.GetAzureClientRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest 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 `AzureClusters.GetAzureClient` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureClientRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAzureClientRequest) + com.google.cloud.gkemulticloud.v1.GetAzureClientRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClientRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClientRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClientRequest build() { + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClientRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest result = + new com.google.cloud.gkemulticloud.v1.GetAzureClientRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAzureClientRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAzureClientRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAzureClientRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAzureClientRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAzureClientRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAzureClientRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAzureClientRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAzureClientRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAzureClientRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAzureClientRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClientRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAzureClientRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAzureClientRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClientRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequestOrBuilder.java new file mode 100644 index 0000000..98fa0d3 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClientRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAzureClientRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAzureClientRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe.
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequest.java new file mode 100644 index 0000000..f84e331 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.GetAzureCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureClusterRequest} + */ +public final class GetAzureClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAzureClusterRequest) + GetAzureClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAzureClusterRequest.newBuilder() to construct. + private GetAzureClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAzureClusterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAzureClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAzureClusterRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest other = + (com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest 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 `AzureClusters.GetAzureCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAzureClusterRequest) + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest build() { + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest result = + new com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAzureClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAzureClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAzureClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAzureClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequestOrBuilder.java new file mode 100644 index 0000000..3900a63 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureClusterRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAzureClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAzureClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequest.java new file mode 100644 index 0000000..329d5a7 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequest.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.GetAzureNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest} + */ +public final class GetAzureNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) + GetAzureNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAzureNodePoolRequest.newBuilder() to construct. + private GetAzureNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAzureNodePoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAzureNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAzureNodePoolRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest 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 `AzureClusters.GetAzureNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+     * `AzureNodePool` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAzureNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAzureNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..ca77c4b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureNodePoolRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAzureNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
+   * `AzureNodePool` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequest.java new file mode 100644 index 0000000..57a7263 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequest.java @@ -0,0 +1,685 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * GetAzureServerConfigRequest gets the server config of GKE cluster on Azure.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest} + */ +public final class GetAzureServerConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + GetAzureServerConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAzureServerConfigRequest.newBuilder() to construct. + private GetAzureServerConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAzureServerConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAzureServerConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAzureServerConfigRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest other = + (com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest 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; + } + /** + * + * + *
+   * GetAzureServerConfigRequest gets the server config of GKE cluster on Azure.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.class, + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_GetAzureServerConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest build() { + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest result = + new com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+     * `AzureServerConfig` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureServerConfig`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + private static final com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAzureServerConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAzureServerConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequestOrBuilder.java new file mode 100644 index 0000000..06a9ba7 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureServerConfigRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface GetAzureServerConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
+   * `AzureServerConfig` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureServerConfig`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequest.java new file mode 100644 index 0000000..fffd438 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequest.java @@ -0,0 +1,977 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.ListAwsClusters` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsClustersRequest} + */ +public final class ListAwsClustersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + ListAwsClustersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAwsClustersRequest.newBuilder() to construct. + private ListAwsClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAwsClustersRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAwsClustersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAwsClustersRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.class, + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * 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_; + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest other = + (com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) 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.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest 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 `AwsClusters.ListAwsClusters` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsClustersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.class, + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.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.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest build() { + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest result = + new com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(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.cloud.gkemulticloud.v1.ListAwsClustersRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest.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.cloud.gkemulticloud.v1.ListAwsClustersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAwsClustersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + private static final com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAwsClustersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAwsClustersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequestOrBuilder.java new file mode 100644 index 0000000..f585722 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAwsClustersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponse.java new file mode 100644 index 0000000..d3750e8 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponse.java @@ -0,0 +1,1165 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AwsClusters.ListAwsClusters` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsClustersResponse} + */ +public final class ListAwsClustersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + ListAwsClustersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAwsClustersResponse.newBuilder() to construct. + private ListAwsClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAwsClustersResponse() { + awsClusters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAwsClustersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAwsClustersResponse( + 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)) { + awsClusters_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + awsClusters_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsCluster.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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + awsClusters_ = java.util.Collections.unmodifiableList(awsClusters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.class, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.Builder.class); + } + + public static final int AWS_CLUSTERS_FIELD_NUMBER = 1; + private java.util.List awsClusters_; + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + @java.lang.Override + public java.util.List getAwsClustersList() { + return awsClusters_; + } + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + @java.lang.Override + public java.util.List + getAwsClustersOrBuilderList() { + return awsClusters_; + } + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + @java.lang.Override + public int getAwsClustersCount() { + return awsClusters_.size(); + } + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsClusters(int index) { + return awsClusters_.get(index); + } + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClustersOrBuilder(int index) { + return awsClusters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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 < awsClusters_.size(); i++) { + output.writeMessage(1, awsClusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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 < awsClusters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, awsClusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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.cloud.gkemulticloud.v1.ListAwsClustersResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse other = + (com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse) obj; + + if (!getAwsClustersList().equals(other.getAwsClustersList())) 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 (getAwsClustersCount() > 0) { + hash = (37 * hash) + AWS_CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getAwsClustersList().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.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse 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 `AwsClusters.ListAwsClusters` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsClustersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.class, + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAwsClustersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (awsClustersBuilder_ == null) { + awsClusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + awsClustersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsClustersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse build() { + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse result = + new com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(this); + int from_bitField0_ = bitField0_; + if (awsClustersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + awsClusters_ = java.util.Collections.unmodifiableList(awsClusters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.awsClusters_ = awsClusters_; + } else { + result.awsClusters_ = awsClustersBuilder_.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.cloud.gkemulticloud.v1.ListAwsClustersResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse.getDefaultInstance()) + return this; + if (awsClustersBuilder_ == null) { + if (!other.awsClusters_.isEmpty()) { + if (awsClusters_.isEmpty()) { + awsClusters_ = other.awsClusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAwsClustersIsMutable(); + awsClusters_.addAll(other.awsClusters_); + } + onChanged(); + } + } else { + if (!other.awsClusters_.isEmpty()) { + if (awsClustersBuilder_.isEmpty()) { + awsClustersBuilder_.dispose(); + awsClustersBuilder_ = null; + awsClusters_ = other.awsClusters_; + bitField0_ = (bitField0_ & ~0x00000001); + awsClustersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAwsClustersFieldBuilder() + : null; + } else { + awsClustersBuilder_.addAllMessages(other.awsClusters_); + } + } + } + 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.cloud.gkemulticloud.v1.ListAwsClustersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List awsClusters_ = + java.util.Collections.emptyList(); + + private void ensureAwsClustersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + awsClusters_ = + new java.util.ArrayList(awsClusters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + awsClustersBuilder_; + + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public java.util.List getAwsClustersList() { + if (awsClustersBuilder_ == null) { + return java.util.Collections.unmodifiableList(awsClusters_); + } else { + return awsClustersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public int getAwsClustersCount() { + if (awsClustersBuilder_ == null) { + return awsClusters_.size(); + } else { + return awsClustersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsClusters(int index) { + if (awsClustersBuilder_ == null) { + return awsClusters_.get(index); + } else { + return awsClustersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder setAwsClusters(int index, com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsClustersIsMutable(); + awsClusters_.set(index, value); + onChanged(); + } else { + awsClustersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder setAwsClusters( + int index, com.google.cloud.gkemulticloud.v1.AwsCluster.Builder builderForValue) { + if (awsClustersBuilder_ == null) { + ensureAwsClustersIsMutable(); + awsClusters_.set(index, builderForValue.build()); + onChanged(); + } else { + awsClustersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder addAwsClusters(com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsClustersIsMutable(); + awsClusters_.add(value); + onChanged(); + } else { + awsClustersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder addAwsClusters(int index, com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsClustersIsMutable(); + awsClusters_.add(index, value); + onChanged(); + } else { + awsClustersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder addAwsClusters( + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder builderForValue) { + if (awsClustersBuilder_ == null) { + ensureAwsClustersIsMutable(); + awsClusters_.add(builderForValue.build()); + onChanged(); + } else { + awsClustersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder addAwsClusters( + int index, com.google.cloud.gkemulticloud.v1.AwsCluster.Builder builderForValue) { + if (awsClustersBuilder_ == null) { + ensureAwsClustersIsMutable(); + awsClusters_.add(index, builderForValue.build()); + onChanged(); + } else { + awsClustersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder addAllAwsClusters( + java.lang.Iterable values) { + if (awsClustersBuilder_ == null) { + ensureAwsClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, awsClusters_); + onChanged(); + } else { + awsClustersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder clearAwsClusters() { + if (awsClustersBuilder_ == null) { + awsClusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + awsClustersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public Builder removeAwsClusters(int index) { + if (awsClustersBuilder_ == null) { + ensureAwsClustersIsMutable(); + awsClusters_.remove(index); + onChanged(); + } else { + awsClustersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster.Builder getAwsClustersBuilder(int index) { + return getAwsClustersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClustersOrBuilder( + int index) { + if (awsClustersBuilder_ == null) { + return awsClusters_.get(index); + } else { + return awsClustersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public java.util.List + getAwsClustersOrBuilderList() { + if (awsClustersBuilder_ != null) { + return awsClustersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(awsClusters_); + } + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster.Builder addAwsClustersBuilder() { + return getAwsClustersFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster.Builder addAwsClustersBuilder(int index) { + return getAwsClustersFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + public java.util.List + getAwsClustersBuilderList() { + return getAwsClustersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + getAwsClustersFieldBuilder() { + if (awsClustersBuilder_ == null) { + awsClustersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder>( + awsClusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + awsClusters_ = null; + } + return awsClustersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAwsClustersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + private static final com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAwsClustersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAwsClustersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsClustersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponseOrBuilder.java new file mode 100644 index 0000000..20d9c5d --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsClustersResponseOrBuilder.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/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAwsClustersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + java.util.List getAwsClustersList(); + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + com.google.cloud.gkemulticloud.v1.AwsCluster getAwsClusters(int index); + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + int getAwsClustersCount(); + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + java.util.List + getAwsClustersOrBuilderList(); + /** + * + * + *
+   * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; + */ + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClustersOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequest.java new file mode 100644 index 0000000..63eb81b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequest.java @@ -0,0 +1,984 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.ListAwsNodePools` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} + */ +public final class ListAwsNodePoolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + ListAwsNodePoolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAwsNodePoolsRequest.newBuilder() to construct. + private ListAwsNodePoolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAwsNodePoolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAwsNodePoolsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAwsNodePoolsRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent `AwsCluster` which owns this collection of
+   * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent `AwsCluster` which owns this collection of
+   * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * 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_; + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest other = + (com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) 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.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest 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 `AwsClusters.ListAwsNodePools` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.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.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest build() { + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest result = + new com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(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.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.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.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent `AwsCluster` which owns this collection of
+     * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent `AwsCluster` which owns this collection of
+     * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent `AwsCluster` which owns this collection of
+     * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent `AwsCluster` which owns this collection of
+     * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent `AwsCluster` which owns this collection of
+     * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+     * `AwsCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + private static final com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAwsNodePoolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAwsNodePoolsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequestOrBuilder.java new file mode 100644 index 0000000..1176d75 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsRequestOrBuilder.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/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAwsNodePoolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent `AwsCluster` which owns this collection of
+   * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent `AwsCluster` which owns this collection of
+   * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
+   * `AwsCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponse.java new file mode 100644 index 0000000..ee2365d --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponse.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AwsClusters.ListAwsNodePools` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} + */ +public final class ListAwsNodePoolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + ListAwsNodePoolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAwsNodePoolsResponse.newBuilder() to construct. + private ListAwsNodePoolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAwsNodePoolsResponse() { + awsNodePools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAwsNodePoolsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAwsNodePoolsResponse( + 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)) { + awsNodePools_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + awsNodePools_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsNodePool.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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + awsNodePools_ = java.util.Collections.unmodifiableList(awsNodePools_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.Builder.class); + } + + public static final int AWS_NODE_POOLS_FIELD_NUMBER = 1; + private java.util.List awsNodePools_; + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + @java.lang.Override + public java.util.List getAwsNodePoolsList() { + return awsNodePools_; + } + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + @java.lang.Override + public java.util.List + getAwsNodePoolsOrBuilderList() { + return awsNodePools_; + } + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + @java.lang.Override + public int getAwsNodePoolsCount() { + return awsNodePools_.size(); + } + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePools(int index) { + return awsNodePools_.get(index); + } + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolsOrBuilder( + int index) { + return awsNodePools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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 < awsNodePools_.size(); i++) { + output.writeMessage(1, awsNodePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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 < awsNodePools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, awsNodePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse other = + (com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) obj; + + if (!getAwsNodePoolsList().equals(other.getAwsNodePoolsList())) 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 (getAwsNodePoolsCount() > 0) { + hash = (37 * hash) + AWS_NODE_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getAwsNodePoolsList().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.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse 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 `AwsClusters.ListAwsNodePools` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAwsNodePoolsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (awsNodePoolsBuilder_ == null) { + awsNodePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + awsNodePoolsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAwsNodePoolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse build() { + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse result = + new com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(this); + int from_bitField0_ = bitField0_; + if (awsNodePoolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + awsNodePools_ = java.util.Collections.unmodifiableList(awsNodePools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.awsNodePools_ = awsNodePools_; + } else { + result.awsNodePools_ = awsNodePoolsBuilder_.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.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.getDefaultInstance()) + return this; + if (awsNodePoolsBuilder_ == null) { + if (!other.awsNodePools_.isEmpty()) { + if (awsNodePools_.isEmpty()) { + awsNodePools_ = other.awsNodePools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAwsNodePoolsIsMutable(); + awsNodePools_.addAll(other.awsNodePools_); + } + onChanged(); + } + } else { + if (!other.awsNodePools_.isEmpty()) { + if (awsNodePoolsBuilder_.isEmpty()) { + awsNodePoolsBuilder_.dispose(); + awsNodePoolsBuilder_ = null; + awsNodePools_ = other.awsNodePools_; + bitField0_ = (bitField0_ & ~0x00000001); + awsNodePoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAwsNodePoolsFieldBuilder() + : null; + } else { + awsNodePoolsBuilder_.addAllMessages(other.awsNodePools_); + } + } + } + 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.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List awsNodePools_ = + java.util.Collections.emptyList(); + + private void ensureAwsNodePoolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + awsNodePools_ = + new java.util.ArrayList(awsNodePools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + awsNodePoolsBuilder_; + + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public java.util.List getAwsNodePoolsList() { + if (awsNodePoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(awsNodePools_); + } else { + return awsNodePoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public int getAwsNodePoolsCount() { + if (awsNodePoolsBuilder_ == null) { + return awsNodePools_.size(); + } else { + return awsNodePoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePools(int index) { + if (awsNodePoolsBuilder_ == null) { + return awsNodePools_.get(index); + } else { + return awsNodePoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder setAwsNodePools(int index, com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsNodePoolsIsMutable(); + awsNodePools_.set(index, value); + onChanged(); + } else { + awsNodePoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder setAwsNodePools( + int index, com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder builderForValue) { + if (awsNodePoolsBuilder_ == null) { + ensureAwsNodePoolsIsMutable(); + awsNodePools_.set(index, builderForValue.build()); + onChanged(); + } else { + awsNodePoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder addAwsNodePools(com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsNodePoolsIsMutable(); + awsNodePools_.add(value); + onChanged(); + } else { + awsNodePoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder addAwsNodePools(int index, com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAwsNodePoolsIsMutable(); + awsNodePools_.add(index, value); + onChanged(); + } else { + awsNodePoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder addAwsNodePools( + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder builderForValue) { + if (awsNodePoolsBuilder_ == null) { + ensureAwsNodePoolsIsMutable(); + awsNodePools_.add(builderForValue.build()); + onChanged(); + } else { + awsNodePoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder addAwsNodePools( + int index, com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder builderForValue) { + if (awsNodePoolsBuilder_ == null) { + ensureAwsNodePoolsIsMutable(); + awsNodePools_.add(index, builderForValue.build()); + onChanged(); + } else { + awsNodePoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder addAllAwsNodePools( + java.lang.Iterable values) { + if (awsNodePoolsBuilder_ == null) { + ensureAwsNodePoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, awsNodePools_); + onChanged(); + } else { + awsNodePoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder clearAwsNodePools() { + if (awsNodePoolsBuilder_ == null) { + awsNodePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + awsNodePoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public Builder removeAwsNodePools(int index) { + if (awsNodePoolsBuilder_ == null) { + ensureAwsNodePoolsIsMutable(); + awsNodePools_.remove(index); + onChanged(); + } else { + awsNodePoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder getAwsNodePoolsBuilder(int index) { + return getAwsNodePoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolsOrBuilder( + int index) { + if (awsNodePoolsBuilder_ == null) { + return awsNodePools_.get(index); + } else { + return awsNodePoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public java.util.List + getAwsNodePoolsOrBuilderList() { + if (awsNodePoolsBuilder_ != null) { + return awsNodePoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(awsNodePools_); + } + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder addAwsNodePoolsBuilder() { + return getAwsNodePoolsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder addAwsNodePoolsBuilder(int index) { + return getAwsNodePoolsFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + public java.util.List + getAwsNodePoolsBuilderList() { + return getAwsNodePoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + getAwsNodePoolsFieldBuilder() { + if (awsNodePoolsBuilder_ == null) { + awsNodePoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder>( + awsNodePools_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + awsNodePools_ = null; + } + return awsNodePoolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + private static final com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAwsNodePoolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAwsNodePoolsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponseOrBuilder.java new file mode 100644 index 0000000..b6767c3 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAwsNodePoolsResponseOrBuilder.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/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAwsNodePoolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + java.util.List getAwsNodePoolsList(); + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePools(int index); + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + int getAwsNodePoolsCount(); + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + java.util.List + getAwsNodePoolsOrBuilderList(); + /** + * + * + *
+   * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; + */ + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequest.java new file mode 100644 index 0000000..0d1d37a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequest.java @@ -0,0 +1,977 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.ListAzureClients` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClientsRequest} + */ +public final class ListAzureClientsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureClientsRequest) + ListAzureClientsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureClientsRequest.newBuilder() to construct. + private ListAzureClientsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureClientsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureClientsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureClientsRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * 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_; + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest other = + (com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest) 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.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest 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 `AzureClusters.ListAzureClients` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClientsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureClientsRequest) + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.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.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest build() { + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest result = + new com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest(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.cloud.gkemulticloud.v1.ListAzureClientsRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest.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.cloud.gkemulticloud.v1.ListAzureClientsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureClientsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureClientsRequest) + private static final com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureClientsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureClientsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequestOrBuilder.java new file mode 100644 index 0000000..712a49e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureClientsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureClientsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponse.java new file mode 100644 index 0000000..49fd621 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponse.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AzureClusters.ListAzureClients` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClientsResponse} + */ +public final class ListAzureClientsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureClientsResponse) + ListAzureClientsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureClientsResponse.newBuilder() to construct. + private ListAzureClientsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureClientsResponse() { + azureClients_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureClientsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureClientsResponse( + 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)) { + azureClients_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + azureClients_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureClient.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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + azureClients_ = java.util.Collections.unmodifiableList(azureClients_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.Builder.class); + } + + public static final int AZURE_CLIENTS_FIELD_NUMBER = 1; + private java.util.List azureClients_; + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + @java.lang.Override + public java.util.List getAzureClientsList() { + return azureClients_; + } + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + @java.lang.Override + public java.util.List + getAzureClientsOrBuilderList() { + return azureClients_; + } + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + @java.lang.Override + public int getAzureClientsCount() { + return azureClients_.size(); + } + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClient getAzureClients(int index) { + return azureClients_.get(index); + } + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientsOrBuilder( + int index) { + return azureClients_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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 < azureClients_.size(); i++) { + output.writeMessage(1, azureClients_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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 < azureClients_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, azureClients_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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.cloud.gkemulticloud.v1.ListAzureClientsResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse other = + (com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse) obj; + + if (!getAzureClientsList().equals(other.getAzureClientsList())) 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 (getAzureClientsCount() > 0) { + hash = (37 * hash) + AZURE_CLIENTS_FIELD_NUMBER; + hash = (53 * hash) + getAzureClientsList().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.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse 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 `AzureClusters.ListAzureClients` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClientsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureClientsResponse) + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAzureClientsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (azureClientsBuilder_ == null) { + azureClients_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + azureClientsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClientsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse build() { + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse result = + new com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse(this); + int from_bitField0_ = bitField0_; + if (azureClientsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + azureClients_ = java.util.Collections.unmodifiableList(azureClients_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.azureClients_ = azureClients_; + } else { + result.azureClients_ = azureClientsBuilder_.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.cloud.gkemulticloud.v1.ListAzureClientsResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse.getDefaultInstance()) + return this; + if (azureClientsBuilder_ == null) { + if (!other.azureClients_.isEmpty()) { + if (azureClients_.isEmpty()) { + azureClients_ = other.azureClients_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAzureClientsIsMutable(); + azureClients_.addAll(other.azureClients_); + } + onChanged(); + } + } else { + if (!other.azureClients_.isEmpty()) { + if (azureClientsBuilder_.isEmpty()) { + azureClientsBuilder_.dispose(); + azureClientsBuilder_ = null; + azureClients_ = other.azureClients_; + bitField0_ = (bitField0_ & ~0x00000001); + azureClientsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAzureClientsFieldBuilder() + : null; + } else { + azureClientsBuilder_.addAllMessages(other.azureClients_); + } + } + } + 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.cloud.gkemulticloud.v1.ListAzureClientsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List azureClients_ = + java.util.Collections.emptyList(); + + private void ensureAzureClientsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + azureClients_ = + new java.util.ArrayList(azureClients_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder> + azureClientsBuilder_; + + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public java.util.List getAzureClientsList() { + if (azureClientsBuilder_ == null) { + return java.util.Collections.unmodifiableList(azureClients_); + } else { + return azureClientsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public int getAzureClientsCount() { + if (azureClientsBuilder_ == null) { + return azureClients_.size(); + } else { + return azureClientsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClient getAzureClients(int index) { + if (azureClientsBuilder_ == null) { + return azureClients_.get(index); + } else { + return azureClientsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder setAzureClients(int index, com.google.cloud.gkemulticloud.v1.AzureClient value) { + if (azureClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClientsIsMutable(); + azureClients_.set(index, value); + onChanged(); + } else { + azureClientsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder setAzureClients( + int index, com.google.cloud.gkemulticloud.v1.AzureClient.Builder builderForValue) { + if (azureClientsBuilder_ == null) { + ensureAzureClientsIsMutable(); + azureClients_.set(index, builderForValue.build()); + onChanged(); + } else { + azureClientsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder addAzureClients(com.google.cloud.gkemulticloud.v1.AzureClient value) { + if (azureClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClientsIsMutable(); + azureClients_.add(value); + onChanged(); + } else { + azureClientsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder addAzureClients(int index, com.google.cloud.gkemulticloud.v1.AzureClient value) { + if (azureClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClientsIsMutable(); + azureClients_.add(index, value); + onChanged(); + } else { + azureClientsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder addAzureClients( + com.google.cloud.gkemulticloud.v1.AzureClient.Builder builderForValue) { + if (azureClientsBuilder_ == null) { + ensureAzureClientsIsMutable(); + azureClients_.add(builderForValue.build()); + onChanged(); + } else { + azureClientsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder addAzureClients( + int index, com.google.cloud.gkemulticloud.v1.AzureClient.Builder builderForValue) { + if (azureClientsBuilder_ == null) { + ensureAzureClientsIsMutable(); + azureClients_.add(index, builderForValue.build()); + onChanged(); + } else { + azureClientsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder addAllAzureClients( + java.lang.Iterable values) { + if (azureClientsBuilder_ == null) { + ensureAzureClientsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, azureClients_); + onChanged(); + } else { + azureClientsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder clearAzureClients() { + if (azureClientsBuilder_ == null) { + azureClients_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + azureClientsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public Builder removeAzureClients(int index) { + if (azureClientsBuilder_ == null) { + ensureAzureClientsIsMutable(); + azureClients_.remove(index); + onChanged(); + } else { + azureClientsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClient.Builder getAzureClientsBuilder(int index) { + return getAzureClientsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientsOrBuilder( + int index) { + if (azureClientsBuilder_ == null) { + return azureClients_.get(index); + } else { + return azureClientsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public java.util.List + getAzureClientsOrBuilderList() { + if (azureClientsBuilder_ != null) { + return azureClientsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(azureClients_); + } + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClient.Builder addAzureClientsBuilder() { + return getAzureClientsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClient.Builder addAzureClientsBuilder(int index) { + return getAzureClientsFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AzureClient.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + public java.util.List + getAzureClientsBuilderList() { + return getAzureClientsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder> + getAzureClientsFieldBuilder() { + if (azureClientsBuilder_ == null) { + azureClientsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureClient, + com.google.cloud.gkemulticloud.v1.AzureClient.Builder, + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder>( + azureClients_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + azureClients_ = null; + } + return azureClientsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureClientsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureClientsResponse) + private static final com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureClientsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureClientsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponseOrBuilder.java new file mode 100644 index 0000000..c1ae864 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClientsResponseOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureClientsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureClientsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + java.util.List getAzureClientsList(); + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureClient getAzureClients(int index); + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + int getAzureClientsCount(); + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + java.util.List + getAzureClientsOrBuilderList(); + /** + * + * + *
+   * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureClientOrBuilder getAzureClientsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequest.java new file mode 100644 index 0000000..ab0e74e --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequest.java @@ -0,0 +1,977 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.ListAzureClusters` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClustersRequest} + */ +public final class ListAzureClustersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureClustersRequest) + ListAzureClustersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureClustersRequest.newBuilder() to construct. + private ListAzureClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureClustersRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureClustersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureClustersRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * 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_; + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest other = + (com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest) 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.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest 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 `AzureClusters.ListAzureClusters` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClustersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureClustersRequest) + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.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.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest build() { + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest result = + new com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest(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.cloud.gkemulticloud.v1.ListAzureClustersRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest.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.cloud.gkemulticloud.v1.ListAzureClustersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location which owns this collection of
+     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+     * Location names are formatted as `projects/<project-id>/locations/<region>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on GCP resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureClustersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureClustersRequest) + private static final com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureClustersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureClustersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequestOrBuilder.java new file mode 100644 index 0000000..e71b0c0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureClustersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureClustersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location which owns this collection of
+   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
+   * Location names are formatted as `projects/<project-id>/locations/<region>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on GCP resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponse.java new file mode 100644 index 0000000..8ab210b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponse.java @@ -0,0 +1,1173 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AzureClusters.ListAzureClusters` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClustersResponse} + */ +public final class ListAzureClustersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureClustersResponse) + ListAzureClustersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureClustersResponse.newBuilder() to construct. + private ListAzureClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureClustersResponse() { + azureClusters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureClustersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureClustersResponse( + 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)) { + azureClusters_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + azureClusters_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureCluster.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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + azureClusters_ = java.util.Collections.unmodifiableList(azureClusters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.Builder.class); + } + + public static final int AZURE_CLUSTERS_FIELD_NUMBER = 1; + private java.util.List azureClusters_; + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + @java.lang.Override + public java.util.List getAzureClustersList() { + return azureClusters_; + } + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + @java.lang.Override + public java.util.List + getAzureClustersOrBuilderList() { + return azureClusters_; + } + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + @java.lang.Override + public int getAzureClustersCount() { + return azureClusters_.size(); + } + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureClusters(int index) { + return azureClusters_.get(index); + } + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClustersOrBuilder( + int index) { + return azureClusters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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 < azureClusters_.size(); i++) { + output.writeMessage(1, azureClusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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 < azureClusters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, azureClusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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.cloud.gkemulticloud.v1.ListAzureClustersResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse other = + (com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse) obj; + + if (!getAzureClustersList().equals(other.getAzureClustersList())) 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 (getAzureClustersCount() > 0) { + hash = (37 * hash) + AZURE_CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getAzureClustersList().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.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse 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 `AzureClusters.ListAzureClusters` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureClustersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureClustersResponse) + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAzureClustersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (azureClustersBuilder_ == null) { + azureClusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + azureClustersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureClustersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse build() { + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse result = + new com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse(this); + int from_bitField0_ = bitField0_; + if (azureClustersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + azureClusters_ = java.util.Collections.unmodifiableList(azureClusters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.azureClusters_ = azureClusters_; + } else { + result.azureClusters_ = azureClustersBuilder_.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.cloud.gkemulticloud.v1.ListAzureClustersResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse.getDefaultInstance()) + return this; + if (azureClustersBuilder_ == null) { + if (!other.azureClusters_.isEmpty()) { + if (azureClusters_.isEmpty()) { + azureClusters_ = other.azureClusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAzureClustersIsMutable(); + azureClusters_.addAll(other.azureClusters_); + } + onChanged(); + } + } else { + if (!other.azureClusters_.isEmpty()) { + if (azureClustersBuilder_.isEmpty()) { + azureClustersBuilder_.dispose(); + azureClustersBuilder_ = null; + azureClusters_ = other.azureClusters_; + bitField0_ = (bitField0_ & ~0x00000001); + azureClustersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAzureClustersFieldBuilder() + : null; + } else { + azureClustersBuilder_.addAllMessages(other.azureClusters_); + } + } + } + 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.cloud.gkemulticloud.v1.ListAzureClustersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List azureClusters_ = + java.util.Collections.emptyList(); + + private void ensureAzureClustersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + azureClusters_ = + new java.util.ArrayList(azureClusters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + azureClustersBuilder_; + + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public java.util.List getAzureClustersList() { + if (azureClustersBuilder_ == null) { + return java.util.Collections.unmodifiableList(azureClusters_); + } else { + return azureClustersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public int getAzureClustersCount() { + if (azureClustersBuilder_ == null) { + return azureClusters_.size(); + } else { + return azureClustersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureClusters(int index) { + if (azureClustersBuilder_ == null) { + return azureClusters_.get(index); + } else { + return azureClustersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder setAzureClusters( + int index, com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClustersIsMutable(); + azureClusters_.set(index, value); + onChanged(); + } else { + azureClustersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder setAzureClusters( + int index, com.google.cloud.gkemulticloud.v1.AzureCluster.Builder builderForValue) { + if (azureClustersBuilder_ == null) { + ensureAzureClustersIsMutable(); + azureClusters_.set(index, builderForValue.build()); + onChanged(); + } else { + azureClustersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder addAzureClusters(com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClustersIsMutable(); + azureClusters_.add(value); + onChanged(); + } else { + azureClustersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder addAzureClusters( + int index, com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureClustersIsMutable(); + azureClusters_.add(index, value); + onChanged(); + } else { + azureClustersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder addAzureClusters( + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder builderForValue) { + if (azureClustersBuilder_ == null) { + ensureAzureClustersIsMutable(); + azureClusters_.add(builderForValue.build()); + onChanged(); + } else { + azureClustersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder addAzureClusters( + int index, com.google.cloud.gkemulticloud.v1.AzureCluster.Builder builderForValue) { + if (azureClustersBuilder_ == null) { + ensureAzureClustersIsMutable(); + azureClusters_.add(index, builderForValue.build()); + onChanged(); + } else { + azureClustersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder addAllAzureClusters( + java.lang.Iterable values) { + if (azureClustersBuilder_ == null) { + ensureAzureClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, azureClusters_); + onChanged(); + } else { + azureClustersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder clearAzureClusters() { + if (azureClustersBuilder_ == null) { + azureClusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + azureClustersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public Builder removeAzureClusters(int index) { + if (azureClustersBuilder_ == null) { + ensureAzureClustersIsMutable(); + azureClusters_.remove(index); + onChanged(); + } else { + azureClustersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster.Builder getAzureClustersBuilder( + int index) { + return getAzureClustersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClustersOrBuilder( + int index) { + if (azureClustersBuilder_ == null) { + return azureClusters_.get(index); + } else { + return azureClustersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public java.util.List + getAzureClustersOrBuilderList() { + if (azureClustersBuilder_ != null) { + return azureClustersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(azureClusters_); + } + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster.Builder addAzureClustersBuilder() { + return getAzureClustersFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster.Builder addAzureClustersBuilder( + int index) { + return getAzureClustersFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+     * project and region region.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + public java.util.List + getAzureClustersBuilderList() { + return getAzureClustersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + getAzureClustersFieldBuilder() { + if (azureClustersBuilder_ == null) { + azureClustersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder>( + azureClusters_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + azureClusters_ = null; + } + return azureClustersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureClustersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureClustersResponse) + private static final com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureClustersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureClustersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponseOrBuilder.java new file mode 100644 index 0000000..c98541b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureClustersResponseOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureClustersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureClustersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + java.util.List getAzureClustersList(); + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureCluster getAzureClusters(int index); + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + int getAzureClustersCount(); + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + java.util.List + getAzureClustersOrBuilderList(); + /** + * + * + *
+   * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP
+   * project and region region.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClustersOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequest.java new file mode 100644 index 0000000..5d902f3 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequest.java @@ -0,0 +1,984 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.ListAzureNodePools` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest} + */ +public final class ListAzureNodePoolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) + ListAzureNodePoolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureNodePoolsRequest.newBuilder() to construct. + private ListAzureNodePoolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureNodePoolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureNodePoolsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureNodePoolsRequest( + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent `AzureCluster` which owns this collection of
+   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent `AzureCluster` which owns this collection of
+   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * 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_; + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+   * 
+ * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest other = + (com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) 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.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest 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 `AzureClusters.ListAzureNodePools` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.class, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.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.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest build() { + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest result = + new com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest(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.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest.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.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent `AzureCluster` which owns this collection of
+     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent `AzureCluster` which owns this collection of
+     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent `AzureCluster` which owns this collection of
+     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent `AzureCluster` which owns this collection of
+     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent `AzureCluster` which owns this collection of
+     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+     * `AzureCluster` names are formatted as
+     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+     * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+     * for more details on Google Cloud resource names.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * If not specified, a default value of 50 will be used by the service.
+     * Regardless of the pageSize value, the response can include a partial list
+     * and a caller should only rely on response's
+     * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if
+     * there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `nextPageToken` value returned from a previous
+     * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) + private static final com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureNodePoolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureNodePoolsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequestOrBuilder.java new file mode 100644 index 0000000..9669b54 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsRequestOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureNodePoolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent `AzureCluster` which owns this collection of
+   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent `AzureCluster` which owns this collection of
+   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
+   * `AzureCluster` names are formatted as
+   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
+   * See [Resource Names](https://cloud.google.com/apis/design/resource_names)
+   * for more details on Google Cloud resource names.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * If not specified, a default value of 50 will be used by the service.
+   * Regardless of the pageSize value, the response can include a partial list
+   * and a caller should only rely on response's
+   * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if
+   * there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `nextPageToken` value returned from a previous
+   * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponse.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponse.java new file mode 100644 index 0000000..55ef3d9 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponse.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Response message for `AzureClusters.ListAzureNodePools` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse} + */ +public final class ListAzureNodePoolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) + ListAzureNodePoolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAzureNodePoolsResponse.newBuilder() to construct. + private ListAzureNodePoolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAzureNodePoolsResponse() { + azureNodePools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAzureNodePoolsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAzureNodePoolsResponse( + 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)) { + azureNodePools_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + azureNodePools_.add( + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureNodePool.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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + azureNodePools_ = java.util.Collections.unmodifiableList(azureNodePools_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.Builder.class); + } + + public static final int AZURE_NODE_POOLS_FIELD_NUMBER = 1; + private java.util.List azureNodePools_; + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + @java.lang.Override + public java.util.List getAzureNodePoolsList() { + return azureNodePools_; + } + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + @java.lang.Override + public java.util.List + getAzureNodePoolsOrBuilderList() { + return azureNodePools_; + } + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + @java.lang.Override + public int getAzureNodePoolsCount() { + return azureNodePools_.size(); + } + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePools(int index) { + return azureNodePools_.get(index); + } + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolsOrBuilder( + int index) { + return azureNodePools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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 < azureNodePools_.size(); i++) { + output.writeMessage(1, azureNodePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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 < azureNodePools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, azureNodePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + 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.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse other = + (com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) obj; + + if (!getAzureNodePoolsList().equals(other.getAzureNodePoolsList())) 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 (getAzureNodePoolsCount() > 0) { + hash = (37 * hash) + AZURE_NODE_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getAzureNodePoolsList().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.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse 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 `AzureClusters.ListAzureNodePools` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.class, + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAzureNodePoolsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (azureNodePoolsBuilder_ == null) { + azureNodePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + azureNodePoolsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_ListAzureNodePoolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse build() { + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse buildPartial() { + com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse result = + new com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse(this); + int from_bitField0_ = bitField0_; + if (azureNodePoolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + azureNodePools_ = java.util.Collections.unmodifiableList(azureNodePools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.azureNodePools_ = azureNodePools_; + } else { + result.azureNodePools_ = azureNodePoolsBuilder_.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.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse other) { + if (other + == com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.getDefaultInstance()) + return this; + if (azureNodePoolsBuilder_ == null) { + if (!other.azureNodePools_.isEmpty()) { + if (azureNodePools_.isEmpty()) { + azureNodePools_ = other.azureNodePools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAzureNodePoolsIsMutable(); + azureNodePools_.addAll(other.azureNodePools_); + } + onChanged(); + } + } else { + if (!other.azureNodePools_.isEmpty()) { + if (azureNodePoolsBuilder_.isEmpty()) { + azureNodePoolsBuilder_.dispose(); + azureNodePoolsBuilder_ = null; + azureNodePools_ = other.azureNodePools_; + bitField0_ = (bitField0_ & ~0x00000001); + azureNodePoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAzureNodePoolsFieldBuilder() + : null; + } else { + azureNodePoolsBuilder_.addAllMessages(other.azureNodePools_); + } + } + } + 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.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List azureNodePools_ = + java.util.Collections.emptyList(); + + private void ensureAzureNodePoolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + azureNodePools_ = + new java.util.ArrayList( + azureNodePools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + azureNodePoolsBuilder_; + + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public java.util.List getAzureNodePoolsList() { + if (azureNodePoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(azureNodePools_); + } else { + return azureNodePoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public int getAzureNodePoolsCount() { + if (azureNodePoolsBuilder_ == null) { + return azureNodePools_.size(); + } else { + return azureNodePoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePools(int index) { + if (azureNodePoolsBuilder_ == null) { + return azureNodePools_.get(index); + } else { + return azureNodePoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder setAzureNodePools( + int index, com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureNodePoolsIsMutable(); + azureNodePools_.set(index, value); + onChanged(); + } else { + azureNodePoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder setAzureNodePools( + int index, com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder builderForValue) { + if (azureNodePoolsBuilder_ == null) { + ensureAzureNodePoolsIsMutable(); + azureNodePools_.set(index, builderForValue.build()); + onChanged(); + } else { + azureNodePoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder addAzureNodePools(com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureNodePoolsIsMutable(); + azureNodePools_.add(value); + onChanged(); + } else { + azureNodePoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder addAzureNodePools( + int index, com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAzureNodePoolsIsMutable(); + azureNodePools_.add(index, value); + onChanged(); + } else { + azureNodePoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder addAzureNodePools( + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder builderForValue) { + if (azureNodePoolsBuilder_ == null) { + ensureAzureNodePoolsIsMutable(); + azureNodePools_.add(builderForValue.build()); + onChanged(); + } else { + azureNodePoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder addAzureNodePools( + int index, com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder builderForValue) { + if (azureNodePoolsBuilder_ == null) { + ensureAzureNodePoolsIsMutable(); + azureNodePools_.add(index, builderForValue.build()); + onChanged(); + } else { + azureNodePoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder addAllAzureNodePools( + java.lang.Iterable values) { + if (azureNodePoolsBuilder_ == null) { + ensureAzureNodePoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, azureNodePools_); + onChanged(); + } else { + azureNodePoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder clearAzureNodePools() { + if (azureNodePoolsBuilder_ == null) { + azureNodePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + azureNodePoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public Builder removeAzureNodePools(int index) { + if (azureNodePoolsBuilder_ == null) { + ensureAzureNodePoolsIsMutable(); + azureNodePools_.remove(index); + onChanged(); + } else { + azureNodePoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder getAzureNodePoolsBuilder( + int index) { + return getAzureNodePoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolsOrBuilder( + int index) { + if (azureNodePoolsBuilder_ == null) { + return azureNodePools_.get(index); + } else { + return azureNodePoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public java.util.List + getAzureNodePoolsOrBuilderList() { + if (azureNodePoolsBuilder_ != null) { + return azureNodePoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(azureNodePools_); + } + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder addAzureNodePoolsBuilder() { + return getAzureNodePoolsFieldBuilder() + .addBuilder(com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder addAzureNodePoolsBuilder( + int index) { + return getAzureNodePoolsFieldBuilder() + .addBuilder(index, com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+     * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + public java.util.List + getAzureNodePoolsBuilderList() { + return getAzureNodePoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + getAzureNodePoolsFieldBuilder() { + if (azureNodePoolsBuilder_ == null) { + azureNodePoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder>( + azureNodePools_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + azureNodePools_ = null; + } + return azureNodePoolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) + private static final com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse(); + } + + public static com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAzureNodePoolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAzureNodePoolsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponseOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponseOrBuilder.java new file mode 100644 index 0000000..d55a66f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ListAzureNodePoolsResponseOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ListAzureNodePoolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + java.util.List getAzureNodePoolsList(); + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePools(int index); + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + int getAzureNodePoolsCount(); + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + java.util.List + getAzureNodePoolsOrBuilderList(); + /** + * + * + *
+   * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`.
+   * 
+ * + * repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; + */ + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LocationName.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LocationName.java new file mode 100644 index 0000000..bda9ab0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gkemulticloud.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfig.java new file mode 100644 index 0000000..ee01e2c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfig.java @@ -0,0 +1,1058 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Parameters that describe the Logging component configuration in a cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.LoggingComponentConfig} + */ +public final class LoggingComponentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.LoggingComponentConfig) + LoggingComponentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoggingComponentConfig.newBuilder() to construct. + private LoggingComponentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoggingComponentConfig() { + enableComponents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoggingComponentConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoggingComponentConfig( + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + enableComponents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + enableComponents_.add(rawValue); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + enableComponents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + enableComponents_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + enableComponents_ = java.util.Collections.unmodifiableList(enableComponents_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.class, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder.class); + } + + /** + * + * + *
+   * The components of the logging configuration;
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component} + */ + public enum Component implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No component is specified
+     * 
+ * + * COMPONENT_UNSPECIFIED = 0; + */ + COMPONENT_UNSPECIFIED(0), + /** + * + * + *
+     * This indicates that system logging components is enabled.
+     * 
+ * + * SYSTEM_COMPONENTS = 1; + */ + SYSTEM_COMPONENTS(1), + /** + * + * + *
+     * This indicates that user workload logging component is enabled.
+     * 
+ * + * WORKLOADS = 2; + */ + WORKLOADS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No component is specified
+     * 
+ * + * COMPONENT_UNSPECIFIED = 0; + */ + public static final int COMPONENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * This indicates that system logging components is enabled.
+     * 
+ * + * SYSTEM_COMPONENTS = 1; + */ + public static final int SYSTEM_COMPONENTS_VALUE = 1; + /** + * + * + *
+     * This indicates that user workload logging component is enabled.
+     * 
+ * + * WORKLOADS = 2; + */ + public static final int WORKLOADS_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 Component 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 Component forNumber(int value) { + switch (value) { + case 0: + return COMPONENT_UNSPECIFIED; + case 1: + return SYSTEM_COMPONENTS; + case 2: + return WORKLOADS; + 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 Component findValueByNumber(int number) { + return Component.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Component[] VALUES = values(); + + public static Component 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 Component(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component) + } + + public static final int ENABLE_COMPONENTS_FIELD_NUMBER = 1; + private java.util.List enableComponents_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component> + enableComponents_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component>() { + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component result = + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component.valueOf(from); + return result == null + ? com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enableComponents. + */ + @java.lang.Override + public java.util.List + getEnableComponentsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component>( + enableComponents_, enableComponents_converter_); + } + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return The count of enableComponents. + */ + @java.lang.Override + public int getEnableComponentsCount() { + return enableComponents_.size(); + } + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the element to return. + * @return The enableComponents at the given index. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component getEnableComponents( + int index) { + return enableComponents_converter_.convert(enableComponents_.get(index)); + } + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enum numeric values on the wire for enableComponents. + */ + @java.lang.Override + public java.util.List getEnableComponentsValueList() { + return enableComponents_; + } + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enableComponents at the given index. + */ + @java.lang.Override + public int getEnableComponentsValue(int index) { + return enableComponents_.get(index); + } + + private int enableComponentsMemoizedSerializedSize; + + 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 (getEnableComponentsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(enableComponentsMemoizedSerializedSize); + } + for (int i = 0; i < enableComponents_.size(); i++) { + output.writeEnumNoTag(enableComponents_.get(i)); + } + 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 < enableComponents_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(enableComponents_.get(i)); + } + size += dataSize; + if (!getEnableComponentsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + enableComponentsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.LoggingComponentConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig other = + (com.google.cloud.gkemulticloud.v1.LoggingComponentConfig) obj; + + if (!enableComponents_.equals(other.enableComponents_)) 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 (getEnableComponentsCount() > 0) { + hash = (37 * hash) + ENABLE_COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + enableComponents_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig 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; + } + /** + * + * + *
+   * Parameters that describe the Logging component configuration in a cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.LoggingComponentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.LoggingComponentConfig) + com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.class, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.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(); + enableComponents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingComponentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig build() { + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig result = + new com.google.cloud.gkemulticloud.v1.LoggingComponentConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + enableComponents_ = java.util.Collections.unmodifiableList(enableComponents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.enableComponents_ = enableComponents_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.LoggingComponentConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.LoggingComponentConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.LoggingComponentConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDefaultInstance()) + return this; + if (!other.enableComponents_.isEmpty()) { + if (enableComponents_.isEmpty()) { + enableComponents_ = other.enableComponents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnableComponentsIsMutable(); + enableComponents_.addAll(other.enableComponents_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.LoggingComponentConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List enableComponents_ = java.util.Collections.emptyList(); + + private void ensureEnableComponentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + enableComponents_ = new java.util.ArrayList(enableComponents_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enableComponents. + */ + public java.util.List + getEnableComponentsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component>( + enableComponents_, enableComponents_converter_); + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return The count of enableComponents. + */ + public int getEnableComponentsCount() { + return enableComponents_.size(); + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the element to return. + * @return The enableComponents at the given index. + */ + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component getEnableComponents( + int index) { + return enableComponents_converter_.convert(enableComponents_.get(index)); + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index to set the value at. + * @param value The enableComponents to set. + * @return This builder for chaining. + */ + public Builder setEnableComponents( + int index, com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnableComponentsIsMutable(); + enableComponents_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param value The enableComponents to add. + * @return This builder for chaining. + */ + public Builder addEnableComponents( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnableComponentsIsMutable(); + enableComponents_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param values The enableComponents to add. + * @return This builder for chaining. + */ + public Builder addAllEnableComponents( + java.lang.Iterable< + ? extends com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component> + values) { + ensureEnableComponentsIsMutable(); + for (com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component value : values) { + enableComponents_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableComponents() { + enableComponents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enum numeric values on the wire for enableComponents. + */ + public java.util.List getEnableComponentsValueList() { + return java.util.Collections.unmodifiableList(enableComponents_); + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enableComponents at the given index. + */ + public int getEnableComponentsValue(int index) { + return enableComponents_.get(index); + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enableComponents at the given index. + * @return This builder for chaining. + */ + public Builder setEnableComponentsValue(int index, int value) { + ensureEnableComponentsIsMutable(); + enableComponents_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param value The enum numeric value on the wire for enableComponents to add. + * @return This builder for chaining. + */ + public Builder addEnableComponentsValue(int value) { + ensureEnableComponentsIsMutable(); + enableComponents_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The components to be enabled.
+     * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param values The enum numeric values on the wire for enableComponents to add. + * @return This builder for chaining. + */ + public Builder addAllEnableComponentsValue(java.lang.Iterable values) { + ensureEnableComponentsIsMutable(); + for (int value : values) { + enableComponents_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.LoggingComponentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.LoggingComponentConfig) + private static final com.google.cloud.gkemulticloud.v1.LoggingComponentConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.LoggingComponentConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoggingComponentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoggingComponentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfigOrBuilder.java new file mode 100644 index 0000000..1697049 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingComponentConfigOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface LoggingComponentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.LoggingComponentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enableComponents. + */ + java.util.List + getEnableComponentsList(); + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return The count of enableComponents. + */ + int getEnableComponentsCount(); + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the element to return. + * @return The enableComponents at the given index. + */ + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component getEnableComponents(int index); + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @return A list containing the enum numeric values on the wire for enableComponents. + */ + java.util.List getEnableComponentsValueList(); + /** + * + * + *
+   * The components to be enabled.
+   * 
+ * + * + * repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enableComponents at the given index. + */ + int getEnableComponentsValue(int index); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfig.java new file mode 100644 index 0000000..65f82c2 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfig.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/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Parameters that describe the Logging configuration in a cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.LoggingConfig} + */ +public final class LoggingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.LoggingConfig) + LoggingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoggingConfig.newBuilder() to construct. + private LoggingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoggingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoggingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoggingConfig( + 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.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder subBuilder = null; + if (componentConfig_ != null) { + subBuilder = componentConfig_.toBuilder(); + } + componentConfig_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(componentConfig_); + componentConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.LoggingConfig.class, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder.class); + } + + public static final int COMPONENT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.gkemulticloud.v1.LoggingComponentConfig componentConfig_; + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return Whether the componentConfig field is set. + */ + @java.lang.Override + public boolean hasComponentConfig() { + return componentConfig_ != null; + } + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return The componentConfig. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getComponentConfig() { + return componentConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDefaultInstance() + : componentConfig_; + } + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder + getComponentConfigOrBuilder() { + return getComponentConfig(); + } + + 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 (componentConfig_ != null) { + output.writeMessage(1, getComponentConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (componentConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getComponentConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.LoggingConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.LoggingConfig other = + (com.google.cloud.gkemulticloud.v1.LoggingConfig) obj; + + if (hasComponentConfig() != other.hasComponentConfig()) return false; + if (hasComponentConfig()) { + if (!getComponentConfig().equals(other.getComponentConfig())) 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 (hasComponentConfig()) { + hash = (37 * hash) + COMPONENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getComponentConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.LoggingConfig 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; + } + /** + * + * + *
+   * Parameters that describe the Logging configuration in a cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.LoggingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.LoggingConfig) + com.google.cloud.gkemulticloud.v1.LoggingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.LoggingConfig.class, + com.google.cloud.gkemulticloud.v1.LoggingConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.LoggingConfig.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 (componentConfigBuilder_ == null) { + componentConfig_ = null; + } else { + componentConfig_ = null; + componentConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_LoggingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig build() { + com.google.cloud.gkemulticloud.v1.LoggingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.LoggingConfig result = + new com.google.cloud.gkemulticloud.v1.LoggingConfig(this); + if (componentConfigBuilder_ == null) { + result.componentConfig_ = componentConfig_; + } else { + result.componentConfig_ = componentConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.LoggingConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.LoggingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.LoggingConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.LoggingConfig.getDefaultInstance()) + return this; + if (other.hasComponentConfig()) { + mergeComponentConfig(other.getComponentConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.LoggingConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.LoggingConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.gkemulticloud.v1.LoggingComponentConfig componentConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder> + componentConfigBuilder_; + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return Whether the componentConfig field is set. + */ + public boolean hasComponentConfig() { + return componentConfigBuilder_ != null || componentConfig_ != null; + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return The componentConfig. + */ + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getComponentConfig() { + if (componentConfigBuilder_ == null) { + return componentConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDefaultInstance() + : componentConfig_; + } else { + return componentConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public Builder setComponentConfig( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig value) { + if (componentConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + componentConfig_ = value; + onChanged(); + } else { + componentConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public Builder setComponentConfig( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder builderForValue) { + if (componentConfigBuilder_ == null) { + componentConfig_ = builderForValue.build(); + onChanged(); + } else { + componentConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public Builder mergeComponentConfig( + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig value) { + if (componentConfigBuilder_ == null) { + if (componentConfig_ != null) { + componentConfig_ = + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.newBuilder(componentConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + componentConfig_ = value; + } + onChanged(); + } else { + componentConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public Builder clearComponentConfig() { + if (componentConfigBuilder_ == null) { + componentConfig_ = null; + onChanged(); + } else { + componentConfig_ = null; + componentConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder + getComponentConfigBuilder() { + + onChanged(); + return getComponentConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + public com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder + getComponentConfigOrBuilder() { + if (componentConfigBuilder_ != null) { + return componentConfigBuilder_.getMessageOrBuilder(); + } else { + return componentConfig_ == null + ? com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.getDefaultInstance() + : componentConfig_; + } + } + /** + * + * + *
+     * The configuration of the logging components;
+     * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder> + getComponentConfigFieldBuilder() { + if (componentConfigBuilder_ == null) { + componentConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Builder, + com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder>( + getComponentConfig(), getParentForChildren(), isClean()); + componentConfig_ = null; + } + return componentConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.LoggingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.LoggingConfig) + private static final com.google.cloud.gkemulticloud.v1.LoggingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.LoggingConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.LoggingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoggingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoggingConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.LoggingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfigOrBuilder.java new file mode 100644 index 0000000..33a1f8c --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/LoggingConfigOrBuilder.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/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface LoggingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.LoggingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return Whether the componentConfig field is set. + */ + boolean hasComponentConfig(); + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + * + * @return The componentConfig. + */ + com.google.cloud.gkemulticloud.v1.LoggingComponentConfig getComponentConfig(); + /** + * + * + *
+   * The configuration of the logging components;
+   * 
+ * + * .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; + */ + com.google.cloud.gkemulticloud.v1.LoggingComponentConfigOrBuilder getComponentConfigOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraint.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraint.java new file mode 100644 index 0000000..ac84950 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraint.java @@ -0,0 +1,548 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Constraints applied to pods.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.MaxPodsConstraint} + */ +public final class MaxPodsConstraint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.MaxPodsConstraint) + MaxPodsConstraintOrBuilder { + private static final long serialVersionUID = 0L; + // Use MaxPodsConstraint.newBuilder() to construct. + private MaxPodsConstraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MaxPodsConstraint() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MaxPodsConstraint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MaxPodsConstraint( + 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: + { + maxPodsPerNode_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.class, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder.class); + } + + public static final int MAX_PODS_PER_NODE_FIELD_NUMBER = 1; + private long maxPodsPerNode_; + /** + * + * + *
+   * Required. The maximum number of pods to schedule on a single node.
+   * 
+ * + * int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxPodsPerNode. + */ + @java.lang.Override + public long getMaxPodsPerNode() { + return maxPodsPerNode_; + } + + 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 (maxPodsPerNode_ != 0L) { + output.writeInt64(1, maxPodsPerNode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxPodsPerNode_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, maxPodsPerNode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.MaxPodsConstraint)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint other = + (com.google.cloud.gkemulticloud.v1.MaxPodsConstraint) obj; + + if (getMaxPodsPerNode() != other.getMaxPodsPerNode()) 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) + MAX_PODS_PER_NODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxPodsPerNode()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.MaxPodsConstraint 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; + } + /** + * + * + *
+   * Constraints applied to pods.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.MaxPodsConstraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.MaxPodsConstraint) + com.google.cloud.gkemulticloud.v1.MaxPodsConstraintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.class, + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.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(); + maxPodsPerNode_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_MaxPodsConstraint_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint build() { + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint buildPartial() { + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint result = + new com.google.cloud.gkemulticloud.v1.MaxPodsConstraint(this); + result.maxPodsPerNode_ = maxPodsPerNode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.MaxPodsConstraint) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.MaxPodsConstraint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.MaxPodsConstraint other) { + if (other == com.google.cloud.gkemulticloud.v1.MaxPodsConstraint.getDefaultInstance()) + return this; + if (other.getMaxPodsPerNode() != 0L) { + setMaxPodsPerNode(other.getMaxPodsPerNode()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.MaxPodsConstraint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.MaxPodsConstraint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long maxPodsPerNode_; + /** + * + * + *
+     * Required. The maximum number of pods to schedule on a single node.
+     * 
+ * + * int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxPodsPerNode. + */ + @java.lang.Override + public long getMaxPodsPerNode() { + return maxPodsPerNode_; + } + /** + * + * + *
+     * Required. The maximum number of pods to schedule on a single node.
+     * 
+ * + * int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxPodsPerNode to set. + * @return This builder for chaining. + */ + public Builder setMaxPodsPerNode(long value) { + + maxPodsPerNode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The maximum number of pods to schedule on a single node.
+     * 
+ * + * int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxPodsPerNode() { + + maxPodsPerNode_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.MaxPodsConstraint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.MaxPodsConstraint) + private static final com.google.cloud.gkemulticloud.v1.MaxPodsConstraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.MaxPodsConstraint(); + } + + public static com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaxPodsConstraint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MaxPodsConstraint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.MaxPodsConstraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraintOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraintOrBuilder.java new file mode 100644 index 0000000..c1d60d8 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/MaxPodsConstraintOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface MaxPodsConstraintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.MaxPodsConstraint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The maximum number of pods to schedule on a single node.
+   * 
+ * + * int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxPodsPerNode. + */ + long getMaxPodsPerNode(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaint.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaint.java new file mode 100644 index 0000000..e5c2531 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaint.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * The taint content for the node taint.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.NodeTaint} + */ +public final class NodeTaint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.NodeTaint) + NodeTaintOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeTaint.newBuilder() to construct. + private NodeTaint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeTaint() { + key_ = ""; + value_ = ""; + effect_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeTaint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NodeTaint( + 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(); + + key_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + effect_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_NodeTaint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.NodeTaint.class, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder.class); + } + + /** + * + * + *
+   * The taint effect.
+   * 
+ * + * Protobuf enum {@code google.cloud.gkemulticloud.v1.NodeTaint.Effect} + */ + public enum Effect implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + EFFECT_UNSPECIFIED(0), + /** + * + * + *
+     * Do not allow new pods to schedule onto the node unless they tolerate the
+     * taint, but allow all pods submitted to Kubelet without going through the
+     * scheduler to start, and allow all already-running pods to continue
+     * running. Enforced by the scheduler.
+     * 
+ * + * NO_SCHEDULE = 1; + */ + NO_SCHEDULE(1), + /** + * + * + *
+     * Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+     * new pods onto the node, rather than prohibiting new pods from scheduling
+     * onto the node entirely. Enforced by the scheduler.
+     * 
+ * + * PREFER_NO_SCHEDULE = 2; + */ + PREFER_NO_SCHEDULE(2), + /** + * + * + *
+     * Evict any already-running pods that do not tolerate the taint.
+     * Currently enforced by NodeController.
+     * 
+ * + * NO_EXECUTE = 3; + */ + NO_EXECUTE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + public static final int EFFECT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Do not allow new pods to schedule onto the node unless they tolerate the
+     * taint, but allow all pods submitted to Kubelet without going through the
+     * scheduler to start, and allow all already-running pods to continue
+     * running. Enforced by the scheduler.
+     * 
+ * + * NO_SCHEDULE = 1; + */ + public static final int NO_SCHEDULE_VALUE = 1; + /** + * + * + *
+     * Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+     * new pods onto the node, rather than prohibiting new pods from scheduling
+     * onto the node entirely. Enforced by the scheduler.
+     * 
+ * + * PREFER_NO_SCHEDULE = 2; + */ + public static final int PREFER_NO_SCHEDULE_VALUE = 2; + /** + * + * + *
+     * Evict any already-running pods that do not tolerate the taint.
+     * Currently enforced by NodeController.
+     * 
+ * + * NO_EXECUTE = 3; + */ + public static final int NO_EXECUTE_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 Effect 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 Effect forNumber(int value) { + switch (value) { + case 0: + return EFFECT_UNSPECIFIED; + case 1: + return NO_SCHEDULE; + case 2: + return PREFER_NO_SCHEDULE; + case 3: + return NO_EXECUTE; + 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 Effect findValueByNumber(int number) { + return Effect.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.NodeTaint.getDescriptor().getEnumTypes().get(0); + } + + private static final Effect[] VALUES = values(); + + public static Effect 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 Effect(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gkemulticloud.v1.NodeTaint.Effect) + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * + * + *
+   * Required. Key for the taint.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Key for the taint.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + * + * + *
+   * Required. Value for the taint.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for the taint.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECT_FIELD_NUMBER = 3; + private int effect_; + /** + * + * + *
+   * Required. The taint effect.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + /** + * + * + *
+   * Required. The taint effect.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint.Effect getEffect() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.NodeTaint.Effect result = + com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.valueOf(effect_); + return result == null + ? com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (effect_ + != com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.EFFECT_UNSPECIFIED.getNumber()) { + output.writeEnum(3, effect_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (effect_ + != com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.EFFECT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, effect_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.NodeTaint)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.NodeTaint other = + (com.google.cloud.gkemulticloud.v1.NodeTaint) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (effect_ != other.effect_) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + EFFECT_FIELD_NUMBER; + hash = (53 * hash) + effect_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.NodeTaint 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 taint content for the node taint.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.NodeTaint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.NodeTaint) + com.google.cloud.gkemulticloud.v1.NodeTaintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_NodeTaint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.NodeTaint.class, + com.google.cloud.gkemulticloud.v1.NodeTaint.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.NodeTaint.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(); + key_ = ""; + + value_ = ""; + + effect_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_NodeTaint_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint build() { + com.google.cloud.gkemulticloud.v1.NodeTaint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint buildPartial() { + com.google.cloud.gkemulticloud.v1.NodeTaint result = + new com.google.cloud.gkemulticloud.v1.NodeTaint(this); + result.key_ = key_; + result.value_ = value_; + result.effect_ = effect_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.NodeTaint) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.NodeTaint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.NodeTaint other) { + if (other == com.google.cloud.gkemulticloud.v1.NodeTaint.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.effect_ != 0) { + setEffectValue(other.getEffectValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.NodeTaint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.gkemulticloud.v1.NodeTaint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Required. Key for the taint.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Key for the taint.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Key for the taint.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Key for the taint.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Key for the taint.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * Required. Value for the taint.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for the taint.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for the taint.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for the taint.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for the taint.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private int effect_ = 0; + /** + * + * + *
+     * Required. The taint effect.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + /** + * + * + *
+     * Required. The taint effect.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for effect to set. + * @return This builder for chaining. + */ + public Builder setEffectValue(int value) { + + effect_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The taint effect.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint.Effect getEffect() { + @SuppressWarnings("deprecation") + com.google.cloud.gkemulticloud.v1.NodeTaint.Effect result = + com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.valueOf(effect_); + return result == null + ? com.google.cloud.gkemulticloud.v1.NodeTaint.Effect.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The taint effect.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The effect to set. + * @return This builder for chaining. + */ + public Builder setEffect(com.google.cloud.gkemulticloud.v1.NodeTaint.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + + effect_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The taint effect.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffect() { + + effect_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.NodeTaint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.NodeTaint) + private static final com.google.cloud.gkemulticloud.v1.NodeTaint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.NodeTaint(); + } + + public static com.google.cloud.gkemulticloud.v1.NodeTaint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeTaint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeTaint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.NodeTaint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaintOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaintOrBuilder.java new file mode 100644 index 0000000..6ca7bbd --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/NodeTaintOrBuilder.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/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface NodeTaintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.NodeTaint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Key for the taint.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Required. Key for the taint.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Required. Value for the taint.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * Required. Value for the taint.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+   * Required. The taint effect.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + int getEffectValue(); + /** + * + * + *
+   * Required. The taint effect.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + com.google.cloud.gkemulticloud.v1.NodeTaint.Effect getEffect(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadata.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadata.java new file mode 100644 index 0000000..98ceea4 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadata.java @@ -0,0 +1,1569 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Metadata about a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + statusDetail_ = ""; + errorDetail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorDetail_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.OperationMetadata.class, + com.google.cloud.gkemulticloud.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Output only. The name of the resource associated to this operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the resource associated to this operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_DETAIL_FIELD_NUMBER = 4; + private volatile java.lang.Object statusDetail_; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object errorDetail_; + /** + * + * + *
+   * Output only. Human-readable status of any error that occurred during the operation.
+   * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetail. + */ + @java.lang.Override + public java.lang.String getErrorDetail() { + java.lang.Object ref = errorDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of any error that occurred during the operation.
+   * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorDetailBytes() { + java.lang.Object ref = errorDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, statusDetail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDetail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, errorDetail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, statusDetail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDetail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, errorDetail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.OperationMetadata other = + (com.google.cloud.gkemulticloud.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getStatusDetail().equals(other.getStatusDetail())) return false; + if (!getErrorDetail().equals(other.getErrorDetail())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + ERROR_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getErrorDetail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata about a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.OperationMetadata) + com.google.cloud.gkemulticloud.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.OperationMetadata.class, + com.google.cloud.gkemulticloud.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + statusDetail_ = ""; + + errorDetail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.OperationMetadata build() { + com.google.cloud.gkemulticloud.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.OperationMetadata buildPartial() { + com.google.cloud.gkemulticloud.v1.OperationMetadata result = + new com.google.cloud.gkemulticloud.v1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.statusDetail_ = statusDetail_; + result.errorDetail_ = errorDetail_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.OperationMetadata other) { + if (other == com.google.cloud.gkemulticloud.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (!other.getErrorDetail().isEmpty()) { + errorDetail_ = other.errorDetail_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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; + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this operation was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. The name of the resource associated to this operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the resource associated to this operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the resource associated to this operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the resource associated to this operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the resource associated to this operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private java.lang.Object errorDetail_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of any error that occurred during the operation.
+     * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetail. + */ + public java.lang.String getErrorDetail() { + java.lang.Object ref = errorDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of any error that occurred during the operation.
+     * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetail. + */ + public com.google.protobuf.ByteString getErrorDetailBytes() { + java.lang.Object ref = errorDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of any error that occurred during the operation.
+     * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorDetail to set. + * @return This builder for chaining. + */ + public Builder setErrorDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of any error that occurred during the operation.
+     * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorDetail() { + + errorDetail_ = getDefaultInstance().getErrorDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of any error that occurred during the operation.
+     * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for errorDetail to set. + * @return This builder for chaining. + */ + public Builder setErrorDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorDetail_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.OperationMetadata) + private static final com.google.cloud.gkemulticloud.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.OperationMetadata(); + } + + public static com.google.cloud.gkemulticloud.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadataOrBuilder.java new file mode 100644 index 0000000..f631c0f --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time at which this operation was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The name of the resource associated to this operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. The name of the resource associated to this operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString getStatusDetailBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of any error that occurred during the operation.
+   * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetail. + */ + java.lang.String getErrorDetail(); + /** + * + * + *
+   * Output only. Human-readable status of any error that occurred during the operation.
+   * 
+ * + * string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetail. + */ + com.google.protobuf.ByteString getErrorDetailBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacement.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacement.java new file mode 100644 index 0000000..1d4133b --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacement.java @@ -0,0 +1,838 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Configuration for the placement of a control plane replica.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ReplicaPlacement} + */ +public final class ReplicaPlacement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.ReplicaPlacement) + ReplicaPlacementOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReplicaPlacement.newBuilder() to construct. + private ReplicaPlacement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReplicaPlacement() { + subnetId_ = ""; + azureAvailabilityZone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReplicaPlacement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReplicaPlacement( + 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(); + + subnetId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + azureAvailabilityZone_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.class, + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder.class); + } + + public static final int SUBNET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object subnetId_; + /** + * + * + *
+   * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+   * deployed. Make sure it's a subnet under the virtual network in the cluster
+   * configuration.
+   * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + @java.lang.Override + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+   * deployed. Make sure it's a subnet under the virtual network in the cluster
+   * configuration.
+   * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_AVAILABILITY_ZONE_FIELD_NUMBER = 2; + private volatile java.lang.Object azureAvailabilityZone_; + /** + * + * + *
+   * Required. For a given replica, the Azure availability zone where to provision the
+   * control plane VM and the ETCD disk.
+   * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureAvailabilityZone. + */ + @java.lang.Override + public java.lang.String getAzureAvailabilityZone() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureAvailabilityZone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. For a given replica, the Azure availability zone where to provision the
+   * control plane VM and the ETCD disk.
+   * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureAvailabilityZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAzureAvailabilityZoneBytes() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureAvailabilityZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subnetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureAvailabilityZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, azureAvailabilityZone_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subnetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(azureAvailabilityZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, azureAvailabilityZone_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.ReplicaPlacement)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.ReplicaPlacement other = + (com.google.cloud.gkemulticloud.v1.ReplicaPlacement) obj; + + if (!getSubnetId().equals(other.getSubnetId())) return false; + if (!getAzureAvailabilityZone().equals(other.getAzureAvailabilityZone())) 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) + SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubnetId().hashCode(); + hash = (37 * hash) + AZURE_AVAILABILITY_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getAzureAvailabilityZone().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.gkemulticloud.v1.ReplicaPlacement 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; + } + /** + * + * + *
+   * Configuration for the placement of a control plane replica.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.ReplicaPlacement} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.ReplicaPlacement) + com.google.cloud.gkemulticloud.v1.ReplicaPlacementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.class, + com.google.cloud.gkemulticloud.v1.ReplicaPlacement.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.ReplicaPlacement.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(); + subnetId_ = ""; + + azureAvailabilityZone_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.AzureResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_ReplicaPlacement_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.ReplicaPlacement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement build() { + com.google.cloud.gkemulticloud.v1.ReplicaPlacement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement buildPartial() { + com.google.cloud.gkemulticloud.v1.ReplicaPlacement result = + new com.google.cloud.gkemulticloud.v1.ReplicaPlacement(this); + result.subnetId_ = subnetId_; + result.azureAvailabilityZone_ = azureAvailabilityZone_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.ReplicaPlacement) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.ReplicaPlacement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.ReplicaPlacement other) { + if (other == com.google.cloud.gkemulticloud.v1.ReplicaPlacement.getDefaultInstance()) + return this; + if (!other.getSubnetId().isEmpty()) { + subnetId_ = other.subnetId_; + onChanged(); + } + if (!other.getAzureAvailabilityZone().isEmpty()) { + azureAvailabilityZone_ = other.azureAvailabilityZone_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.ReplicaPlacement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.ReplicaPlacement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object subnetId_ = ""; + /** + * + * + *
+     * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+     * deployed. Make sure it's a subnet under the virtual network in the cluster
+     * configuration.
+     * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+     * deployed. Make sure it's a subnet under the virtual network in the cluster
+     * configuration.
+     * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+     * deployed. Make sure it's a subnet under the virtual network in the cluster
+     * configuration.
+     * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+     * deployed. Make sure it's a subnet under the virtual network in the cluster
+     * configuration.
+     * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetId() { + + subnetId_ = getDefaultInstance().getSubnetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+     * deployed. Make sure it's a subnet under the virtual network in the cluster
+     * configuration.
+     * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object azureAvailabilityZone_ = ""; + /** + * + * + *
+     * Required. For a given replica, the Azure availability zone where to provision the
+     * control plane VM and the ETCD disk.
+     * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureAvailabilityZone. + */ + public java.lang.String getAzureAvailabilityZone() { + java.lang.Object ref = azureAvailabilityZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + azureAvailabilityZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. For a given replica, the Azure availability zone where to provision the
+     * control plane VM and the ETCD disk.
+     * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureAvailabilityZone. + */ + public com.google.protobuf.ByteString getAzureAvailabilityZoneBytes() { + java.lang.Object ref = azureAvailabilityZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + azureAvailabilityZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. For a given replica, the Azure availability zone where to provision the
+     * control plane VM and the ETCD disk.
+     * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The azureAvailabilityZone to set. + * @return This builder for chaining. + */ + public Builder setAzureAvailabilityZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + azureAvailabilityZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. For a given replica, the Azure availability zone where to provision the
+     * control plane VM and the ETCD disk.
+     * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAzureAvailabilityZone() { + + azureAvailabilityZone_ = getDefaultInstance().getAzureAvailabilityZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. For a given replica, the Azure availability zone where to provision the
+     * control plane VM and the ETCD disk.
+     * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for azureAvailabilityZone to set. + * @return This builder for chaining. + */ + public Builder setAzureAvailabilityZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + azureAvailabilityZone_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.ReplicaPlacement) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.ReplicaPlacement) + private static final com.google.cloud.gkemulticloud.v1.ReplicaPlacement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.ReplicaPlacement(); + } + + public static com.google.cloud.gkemulticloud.v1.ReplicaPlacement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplicaPlacement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReplicaPlacement(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.ReplicaPlacement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacementOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacementOrBuilder.java new file mode 100644 index 0000000..c0c7ba0 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/ReplicaPlacementOrBuilder.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/cloud/gkemulticloud/v1/azure_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface ReplicaPlacementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.ReplicaPlacement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+   * deployed. Make sure it's a subnet under the virtual network in the cluster
+   * configuration.
+   * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + java.lang.String getSubnetId(); + /** + * + * + *
+   * Required. For a given replica, the ARM ID of the subnet where the control plane VM is
+   * deployed. Make sure it's a subnet under the virtual network in the cluster
+   * configuration.
+   * 
+ * + * string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + com.google.protobuf.ByteString getSubnetIdBytes(); + + /** + * + * + *
+   * Required. For a given replica, the Azure availability zone where to provision the
+   * control plane VM and the ETCD disk.
+   * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The azureAvailabilityZone. + */ + java.lang.String getAzureAvailabilityZone(); + /** + * + * + *
+   * Required. For a given replica, the Azure availability zone where to provision the
+   * control plane VM and the ETCD disk.
+   * 
+ * + * string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for azureAvailabilityZone. + */ + com.google.protobuf.ByteString getAzureAvailabilityZoneBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequest.java new file mode 100644 index 0000000..4ae803d --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequest.java @@ -0,0 +1,1399 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.UpdateAwsCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} + */ +public final class UpdateAwsClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + UpdateAwsClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAwsClusterRequest.newBuilder() to construct. + private UpdateAwsClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAwsClusterRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAwsClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAwsClusterRequest( + 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.cloud.gkemulticloud.v1.AwsCluster.Builder subBuilder = null; + if (awsCluster_ != null) { + subBuilder = awsCluster_.toBuilder(); + } + awsCluster_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsCluster_); + awsCluster_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + validateOnly_ = input.readBool(); + break; + } + case 34: + { + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.Builder.class); + } + + public static final int AWS_CLUSTER_FIELD_NUMBER = 1; + private com.google.cloud.gkemulticloud.v1.AwsCluster awsCluster_; + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + @java.lang.Override + public boolean hasAwsCluster() { + return awsCluster_ != null; + } + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster() { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder() { + return getAwsCluster(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually update the cluster.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @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 (awsCluster_ != null) { + output.writeMessage(1, getAwsCluster()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (awsCluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAwsCluster()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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.cloud.gkemulticloud.v1.UpdateAwsClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest other = + (com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) obj; + + if (hasAwsCluster() != other.hasAwsCluster()) return false; + if (hasAwsCluster()) { + if (!getAwsCluster().equals(other.getAwsCluster())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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(); + if (hasAwsCluster()) { + hash = (37 * hash) + AWS_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAwsCluster().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + 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.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest 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 `AwsClusters.UpdateAwsCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.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 (awsClusterBuilder_ == null) { + awsCluster_ = null; + } else { + awsCluster_ = null; + awsClusterBuilder_ = null; + } + validateOnly_ = false; + + 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.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest build() { + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest result = + new com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(this); + if (awsClusterBuilder_ == null) { + result.awsCluster_ = awsCluster_; + } else { + result.awsCluster_ = awsClusterBuilder_.build(); + } + result.validateOnly_ = validateOnly_; + 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.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.getDefaultInstance()) + return this; + if (other.hasAwsCluster()) { + mergeAwsCluster(other.getAwsCluster()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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.cloud.gkemulticloud.v1.UpdateAwsClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsCluster awsCluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + awsClusterBuilder_; + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + public boolean hasAwsCluster() { + return awsClusterBuilder_ != null || awsCluster_ != null; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster() { + if (awsClusterBuilder_ == null) { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } else { + return awsClusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsCluster(com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsCluster_ = value; + onChanged(); + } else { + awsClusterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsCluster( + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder builderForValue) { + if (awsClusterBuilder_ == null) { + awsCluster_ = builderForValue.build(); + onChanged(); + } else { + awsClusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAwsCluster(com.google.cloud.gkemulticloud.v1.AwsCluster value) { + if (awsClusterBuilder_ == null) { + if (awsCluster_ != null) { + awsCluster_ = + com.google.cloud.gkemulticloud.v1.AwsCluster.newBuilder(awsCluster_) + .mergeFrom(value) + .buildPartial(); + } else { + awsCluster_ = value; + } + onChanged(); + } else { + awsClusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAwsCluster() { + if (awsClusterBuilder_ == null) { + awsCluster_ = null; + onChanged(); + } else { + awsCluster_ = null; + awsClusterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsCluster.Builder getAwsClusterBuilder() { + + onChanged(); + return getAwsClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder() { + if (awsClusterBuilder_ != null) { + return awsClusterBuilder_.getMessageOrBuilder(); + } else { + return awsCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AwsCluster.getDefaultInstance() + : awsCluster_; + } + } + /** + * + * + *
+     * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder> + getAwsClusterFieldBuilder() { + if (awsClusterBuilder_ == null) { + awsClusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsCluster, + com.google.cloud.gkemulticloud.v1.AwsCluster.Builder, + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder>( + getAwsCluster(), getParentForChildren(), isClean()); + awsCluster_ = null; + } + return awsClusterBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `control_plane.version`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.aws_services_authentication.role_arn`.
+     *  *   `control_plane.aws_services_authentication.role_session_name`.
+     *  *   `control_plane.config_encryption.kms_key_arn`.
+     *  *   `control_plane.instance_type`.
+     *  *   `control_plane.security_group_ids`.
+     *  *   `control_plane.proxy_config`.
+     *  *   `control_plane.proxy_config.secret_arn`.
+     *  *   `control_plane.proxy_config.secret_version`.
+     *  *   `control_plane.root_volume.iops`.
+     *  *   `control_plane.root_volume.kms_key_arn`.
+     *  *   `control_plane.root_volume.volume_type`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `control_plane.ssh_config`.
+     *  *   `control_plane.ssh_config.ec2_key_pair`.
+     *  *   `control_plane.instance_placement.tenancy`.
+     *  *   `logging_config`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAwsClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAwsClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequestOrBuilder.java new file mode 100644 index 0000000..dc87270 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsClusterRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface UpdateAwsClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsCluster field is set. + */ + boolean hasAwsCluster(); + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsCluster. + */ + com.google.cloud.gkemulticloud.v1.AwsCluster getAwsCluster(); + /** + * + * + *
+   * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsClusterOrBuilder getAwsClusterOrBuilder(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually update the cluster.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `control_plane.version`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.aws_services_authentication.role_arn`.
+   *  *   `control_plane.aws_services_authentication.role_session_name`.
+   *  *   `control_plane.config_encryption.kms_key_arn`.
+   *  *   `control_plane.instance_type`.
+   *  *   `control_plane.security_group_ids`.
+   *  *   `control_plane.proxy_config`.
+   *  *   `control_plane.proxy_config.secret_arn`.
+   *  *   `control_plane.proxy_config.secret_version`.
+   *  *   `control_plane.root_volume.iops`.
+   *  *   `control_plane.root_volume.kms_key_arn`.
+   *  *   `control_plane.root_volume.volume_type`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `control_plane.ssh_config`.
+   *  *   `control_plane.ssh_config.ec2_key_pair`.
+   *  *   `control_plane.instance_placement.tenancy`.
+   *  *   `logging_config`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequest.java new file mode 100644 index 0000000..e4c8dcf --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequest.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AwsClusters.UpdateAwsNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} + */ +public final class UpdateAwsNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + UpdateAwsNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAwsNodePoolRequest.newBuilder() to construct. + private UpdateAwsNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAwsNodePoolRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAwsNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAwsNodePoolRequest( + 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.cloud.gkemulticloud.v1.AwsNodePool.Builder subBuilder = null; + if (awsNodePool_ != null) { + subBuilder = awsNodePool_.toBuilder(); + } + awsNodePool_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AwsNodePool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsNodePool_); + awsNodePool_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + validateOnly_ = input.readBool(); + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.Builder.class); + } + + public static final int AWS_NODE_POOL_FIELD_NUMBER = 1; + private com.google.cloud.gkemulticloud.v1.AwsNodePool awsNodePool_; + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + @java.lang.Override + public boolean hasAwsNodePool() { + return awsNodePool_ != null; + } + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool() { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder() { + return getAwsNodePool(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but don't actually update the node pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @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 (awsNodePool_ != null) { + output.writeMessage(1, getAwsNodePool()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + 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 (awsNodePool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAwsNodePool()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + 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.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) obj; + + if (hasAwsNodePool() != other.hasAwsNodePool()) return false; + if (hasAwsNodePool()) { + if (!getAwsNodePool().equals(other.getAwsNodePool())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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(); + if (hasAwsNodePool()) { + hash = (37 * hash) + AWS_NODE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getAwsNodePool().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + 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.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest 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 `AwsClusters.UpdateAwsNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.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 (awsNodePoolBuilder_ == null) { + awsNodePool_ = null; + } else { + awsNodePool_ = null; + awsNodePoolBuilder_ = null; + } + validateOnly_ = false; + + 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.cloud.gkemulticloud.v1.AwsServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAwsNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(this); + if (awsNodePoolBuilder_ == null) { + result.awsNodePool_ = awsNodePool_; + } else { + result.awsNodePool_ = awsNodePoolBuilder_.build(); + } + result.validateOnly_ = validateOnly_; + 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.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.getDefaultInstance()) + return this; + if (other.hasAwsNodePool()) { + mergeAwsNodePool(other.getAwsNodePool()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.gkemulticloud.v1.AwsNodePool awsNodePool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + awsNodePoolBuilder_; + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + public boolean hasAwsNodePool() { + return awsNodePoolBuilder_ != null || awsNodePool_ != null; + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool() { + if (awsNodePoolBuilder_ == null) { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } else { + return awsNodePoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsNodePool(com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsNodePool_ = value; + onChanged(); + } else { + awsNodePoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAwsNodePool( + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder builderForValue) { + if (awsNodePoolBuilder_ == null) { + awsNodePool_ = builderForValue.build(); + onChanged(); + } else { + awsNodePoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAwsNodePool(com.google.cloud.gkemulticloud.v1.AwsNodePool value) { + if (awsNodePoolBuilder_ == null) { + if (awsNodePool_ != null) { + awsNodePool_ = + com.google.cloud.gkemulticloud.v1.AwsNodePool.newBuilder(awsNodePool_) + .mergeFrom(value) + .buildPartial(); + } else { + awsNodePool_ = value; + } + onChanged(); + } else { + awsNodePoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAwsNodePool() { + if (awsNodePoolBuilder_ == null) { + awsNodePool_ = null; + onChanged(); + } else { + awsNodePool_ = null; + awsNodePoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder getAwsNodePoolBuilder() { + + onChanged(); + return getAwsNodePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder() { + if (awsNodePoolBuilder_ != null) { + return awsNodePoolBuilder_.getMessageOrBuilder(); + } else { + return awsNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AwsNodePool.getDefaultInstance() + : awsNodePool_; + } + } + /** + * + * + *
+     * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder> + getAwsNodePoolFieldBuilder() { + if (awsNodePoolBuilder_ == null) { + awsNodePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AwsNodePool, + com.google.cloud.gkemulticloud.v1.AwsNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder>( + getAwsNodePool(), getParentForChildren(), isClean()); + awsNodePool_ = null; + } + return awsNodePoolBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+     *  *   `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.config_encryption.kms_key_arn`.
+     *  *   `config.security_group_ids`.
+     *  *   `config.root_volume.iops`.
+     *  *   `config.root_volume.kms_key_arn`.
+     *  *   `config.root_volume.volume_type`.
+     *  *   `config.root_volume.size_gib`.
+     *  *   `config.proxy_config`.
+     *  *   `config.proxy_config.secret_arn`.
+     *  *   `config.proxy_config.secret_version`.
+     *  *   `config.ssh_config`.
+     *  *   `config.ssh_config.ec2_key_pair`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAwsNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAwsNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..5037229 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAwsNodePoolRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/aws_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface UpdateAwsNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the awsNodePool field is set. + */ + boolean hasAwsNodePool(); + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The awsNodePool. + */ + com.google.cloud.gkemulticloud.v1.AwsNodePool getAwsNodePool(); + /** + * + * + *
+   * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AwsNodePoolOrBuilder getAwsNodePoolOrBuilder(); + + /** + * + * + *
+   * If set, only validate the request, but don't actually update the node pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]:
+   *  *   `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.config_encryption.kms_key_arn`.
+   *  *   `config.security_group_ids`.
+   *  *   `config.root_volume.iops`.
+   *  *   `config.root_volume.kms_key_arn`.
+   *  *   `config.root_volume.volume_type`.
+   *  *   `config.root_volume.size_gib`.
+   *  *   `config.proxy_config`.
+   *  *   `config.proxy_config.secret_arn`.
+   *  *   `config.proxy_config.secret_version`.
+   *  *   `config.ssh_config`.
+   *  *   `config.ssh_config.ec2_key_pair`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequest.java new file mode 100644 index 0000000..553c825 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequest.java @@ -0,0 +1,1255 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.UpdateAzureCluster` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest} + */ +public final class UpdateAzureClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) + UpdateAzureClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAzureClusterRequest.newBuilder() to construct. + private UpdateAzureClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAzureClusterRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAzureClusterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAzureClusterRequest( + 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.cloud.gkemulticloud.v1.AzureCluster.Builder subBuilder = null; + if (azureCluster_ != null) { + subBuilder = azureCluster_.toBuilder(); + } + azureCluster_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureCluster_); + azureCluster_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + validateOnly_ = input.readBool(); + break; + } + case 34: + { + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.Builder.class); + } + + public static final int AZURE_CLUSTER_FIELD_NUMBER = 1; + private com.google.cloud.gkemulticloud.v1.AzureCluster azureCluster_; + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + @java.lang.Override + public boolean hasAzureCluster() { + return azureCluster_ != null; + } + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster() { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder() { + return getAzureCluster(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but do not actually update the cluster.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @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 (azureCluster_ != null) { + output.writeMessage(1, getAzureCluster()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (azureCluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAzureCluster()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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.cloud.gkemulticloud.v1.UpdateAzureClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest other = + (com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) obj; + + if (hasAzureCluster() != other.hasAzureCluster()) return false; + if (hasAzureCluster()) { + if (!getAzureCluster().equals(other.getAzureCluster())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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(); + if (hasAzureCluster()) { + hash = (37 * hash) + AZURE_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getAzureCluster().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + 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.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest 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 `AzureClusters.UpdateAzureCluster` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.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 (azureClusterBuilder_ == null) { + azureCluster_ = null; + } else { + azureCluster_ = null; + azureClusterBuilder_ = null; + } + validateOnly_ = false; + + 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.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest build() { + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest result = + new com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest(this); + if (azureClusterBuilder_ == null) { + result.azureCluster_ = azureCluster_; + } else { + result.azureCluster_ = azureClusterBuilder_.build(); + } + result.validateOnly_ = validateOnly_; + 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.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest other) { + if (other == com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.getDefaultInstance()) + return this; + if (other.hasAzureCluster()) { + mergeAzureCluster(other.getAzureCluster()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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.cloud.gkemulticloud.v1.UpdateAzureClusterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureCluster azureCluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + azureClusterBuilder_; + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + public boolean hasAzureCluster() { + return azureClusterBuilder_ != null || azureCluster_ != null; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster() { + if (azureClusterBuilder_ == null) { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } else { + return azureClusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureCluster(com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureCluster_ = value; + onChanged(); + } else { + azureClusterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureCluster( + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder builderForValue) { + if (azureClusterBuilder_ == null) { + azureCluster_ = builderForValue.build(); + onChanged(); + } else { + azureClusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAzureCluster(com.google.cloud.gkemulticloud.v1.AzureCluster value) { + if (azureClusterBuilder_ == null) { + if (azureCluster_ != null) { + azureCluster_ = + com.google.cloud.gkemulticloud.v1.AzureCluster.newBuilder(azureCluster_) + .mergeFrom(value) + .buildPartial(); + } else { + azureCluster_ = value; + } + onChanged(); + } else { + azureClusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAzureCluster() { + if (azureClusterBuilder_ == null) { + azureCluster_ = null; + onChanged(); + } else { + azureCluster_ = null; + azureClusterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureCluster.Builder getAzureClusterBuilder() { + + onChanged(); + return getAzureClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder() { + if (azureClusterBuilder_ != null) { + return azureClusterBuilder_.getMessageOrBuilder(); + } else { + return azureCluster_ == null + ? com.google.cloud.gkemulticloud.v1.AzureCluster.getDefaultInstance() + : azureCluster_; + } + } + /** + * + * + *
+     * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder> + getAzureClusterFieldBuilder() { + if (azureClusterBuilder_ == null) { + azureClusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureCluster, + com.google.cloud.gkemulticloud.v1.AzureCluster.Builder, + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder>( + getAzureCluster(), getParentForChildren(), isClean()); + azureCluster_ = null; + } + return azureClusterBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but do not actually update the cluster.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+     *  *   `description`.
+     *  *   `annotations`.
+     *  *   `azureClient`.
+     *  *   `control_plane.version`.
+     *  *   `control_plane.vm_size`.
+     *  *   `authorization.admin_users`.
+     *  *   `control_plane.root_volume.size_gib`.
+     *  *   `logging_config`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) + private static final com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAzureClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAzureClusterRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequestOrBuilder.java new file mode 100644 index 0000000..5871d23 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureClusterRequestOrBuilder.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/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface UpdateAzureClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureCluster field is set. + */ + boolean hasAzureCluster(); + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureCluster. + */ + com.google.cloud.gkemulticloud.v1.AzureCluster getAzureCluster(); + /** + * + * + *
+   * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureClusterOrBuilder getAzureClusterOrBuilder(); + + /** + * + * + *
+   * If set, only validate the request, but do not actually update the cluster.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
+   *  *   `description`.
+   *  *   `annotations`.
+   *  *   `azureClient`.
+   *  *   `control_plane.version`.
+   *  *   `control_plane.vm_size`.
+   *  *   `authorization.admin_users`.
+   *  *   `control_plane.root_volume.size_gib`.
+   *  *   `logging_config`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequest.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequest.java new file mode 100644 index 0000000..2fc63d1 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequest.java @@ -0,0 +1,1222 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Request message for `AzureClusters.UpdateAzureNodePool` method.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest} + */ +public final class UpdateAzureNodePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) + UpdateAzureNodePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAzureNodePoolRequest.newBuilder() to construct. + private UpdateAzureNodePoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAzureNodePoolRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAzureNodePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAzureNodePoolRequest( + 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.cloud.gkemulticloud.v1.AzureNodePool.Builder subBuilder = null; + if (azureNodePool_ != null) { + subBuilder = azureNodePool_.toBuilder(); + } + azureNodePool_ = + input.readMessage( + com.google.cloud.gkemulticloud.v1.AzureNodePool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureNodePool_); + azureNodePool_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + validateOnly_ = input.readBool(); + 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 (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.Builder.class); + } + + public static final int AZURE_NODE_POOL_FIELD_NUMBER = 1; + private com.google.cloud.gkemulticloud.v1.AzureNodePool azureNodePool_; + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + @java.lang.Override + public boolean hasAzureNodePool() { + return azureNodePool_ != null; + } + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool() { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder() { + return getAzureNodePool(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_; + /** + * + * + *
+   * If set, only validate the request, but don't actually update the node pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @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 (azureNodePool_ != null) { + output.writeMessage(1, getAzureNodePool()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + 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 (azureNodePool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAzureNodePool()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + 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.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest other = + (com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) obj; + + if (hasAzureNodePool() != other.hasAzureNodePool()) return false; + if (hasAzureNodePool()) { + if (!getAzureNodePool().equals(other.getAzureNodePool())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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(); + if (hasAzureNodePool()) { + hash = (37 * hash) + AZURE_NODE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getAzureNodePool().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + 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.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest 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 `AzureClusters.UpdateAzureNodePool` method.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.class, + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.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 (azureNodePoolBuilder_ == null) { + azureNodePool_ = null; + } else { + azureNodePool_ = null; + azureNodePoolBuilder_ = null; + } + validateOnly_ = false; + + 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.cloud.gkemulticloud.v1.AzureServiceProto + .internal_static_google_cloud_gkemulticloud_v1_UpdateAzureNodePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest build() { + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest buildPartial() { + com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest result = + new com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest(this); + if (azureNodePoolBuilder_ == null) { + result.azureNodePool_ = azureNodePool_; + } else { + result.azureNodePool_ = azureNodePoolBuilder_.build(); + } + result.validateOnly_ = validateOnly_; + 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.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest other) { + if (other + == com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.getDefaultInstance()) + return this; + if (other.hasAzureNodePool()) { + mergeAzureNodePool(other.getAzureNodePool()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.gkemulticloud.v1.AzureNodePool azureNodePool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + azureNodePoolBuilder_; + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + public boolean hasAzureNodePool() { + return azureNodePoolBuilder_ != null || azureNodePool_ != null; + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool() { + if (azureNodePoolBuilder_ == null) { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } else { + return azureNodePoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureNodePool(com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureNodePool_ = value; + onChanged(); + } else { + azureNodePoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAzureNodePool( + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder builderForValue) { + if (azureNodePoolBuilder_ == null) { + azureNodePool_ = builderForValue.build(); + onChanged(); + } else { + azureNodePoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAzureNodePool(com.google.cloud.gkemulticloud.v1.AzureNodePool value) { + if (azureNodePoolBuilder_ == null) { + if (azureNodePool_ != null) { + azureNodePool_ = + com.google.cloud.gkemulticloud.v1.AzureNodePool.newBuilder(azureNodePool_) + .mergeFrom(value) + .buildPartial(); + } else { + azureNodePool_ = value; + } + onChanged(); + } else { + azureNodePoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAzureNodePool() { + if (azureNodePoolBuilder_ == null) { + azureNodePool_ = null; + onChanged(); + } else { + azureNodePool_ = null; + azureNodePoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder getAzureNodePoolBuilder() { + + onChanged(); + return getAzureNodePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder() { + if (azureNodePoolBuilder_ != null) { + return azureNodePoolBuilder_.getMessageOrBuilder(); + } else { + return azureNodePool_ == null + ? com.google.cloud.gkemulticloud.v1.AzureNodePool.getDefaultInstance() + : azureNodePool_; + } + } + /** + * + * + *
+     * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+     * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder> + getAzureNodePoolFieldBuilder() { + if (azureNodePoolBuilder_ == null) { + azureNodePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gkemulticloud.v1.AzureNodePool, + com.google.cloud.gkemulticloud.v1.AzureNodePool.Builder, + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder>( + getAzureNodePool(), getParentForChildren(), isClean()); + azureNodePool_ = null; + } + return azureNodePoolBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only validate the request, but don't actually update the node pool.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field can only include these
+     * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+     *  *.  `annotations`.
+     *  *   `version`.
+     *  *   `autoscaling.min_node_count`.
+     *  *   `autoscaling.max_node_count`.
+     *  *   `config.vm_size`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) + private static final com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest(); + } + + public static com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAzureNodePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAzureNodePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequestOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequestOrBuilder.java new file mode 100644 index 0000000..6cff924 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/UpdateAzureNodePoolRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/azure_service.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface UpdateAzureNodePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the azureNodePool field is set. + */ + boolean hasAzureNodePool(); + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The azureNodePool. + */ + com.google.cloud.gkemulticloud.v1.AzureNodePool getAzureNodePool(); + /** + * + * + *
+   * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update.
+   * 
+ * + * + * .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gkemulticloud.v1.AzureNodePoolOrBuilder getAzureNodePoolOrBuilder(); + + /** + * + * + *
+   * If set, only validate the request, but don't actually update the node pool.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field can only include these
+   * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
+   *  *.  `annotations`.
+   *  *   `version`.
+   *  *   `autoscaling.min_node_count`.
+   *  *   `autoscaling.max_node_count`.
+   *  *   `config.vm_size`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfig.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfig.java new file mode 100644 index 0000000..95bae54 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfig.java @@ -0,0 +1,1004 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +/** + * + * + *
+ * Workload Identity settings.
+ * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} + */ +public final class WorkloadIdentityConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + WorkloadIdentityConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkloadIdentityConfig.newBuilder() to construct. + private WorkloadIdentityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkloadIdentityConfig() { + issuerUri_ = ""; + workloadPool_ = ""; + identityProvider_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkloadIdentityConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkloadIdentityConfig( + 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(); + + issuerUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + workloadPool_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + identityProvider_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.class, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder.class); + } + + public static final int ISSUER_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object issuerUri_; + /** + * + * + *
+   * The OIDC issuer URL for this cluster.
+   * 
+ * + * string issuer_uri = 1; + * + * @return The issuerUri. + */ + @java.lang.Override + public java.lang.String getIssuerUri() { + java.lang.Object ref = issuerUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuerUri_ = s; + return s; + } + } + /** + * + * + *
+   * The OIDC issuer URL for this cluster.
+   * 
+ * + * string issuer_uri = 1; + * + * @return The bytes for issuerUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIssuerUriBytes() { + java.lang.Object ref = issuerUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WORKLOAD_POOL_FIELD_NUMBER = 2; + private volatile java.lang.Object workloadPool_; + /** + * + * + *
+   * The Workload Identity Pool associated to the cluster.
+   * 
+ * + * string workload_pool = 2; + * + * @return The workloadPool. + */ + @java.lang.Override + public java.lang.String getWorkloadPool() { + java.lang.Object ref = workloadPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workloadPool_ = s; + return s; + } + } + /** + * + * + *
+   * The Workload Identity Pool associated to the cluster.
+   * 
+ * + * string workload_pool = 2; + * + * @return The bytes for workloadPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkloadPoolBytes() { + java.lang.Object ref = workloadPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workloadPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDENTITY_PROVIDER_FIELD_NUMBER = 3; + private volatile java.lang.Object identityProvider_; + /** + * + * + *
+   * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+   * Identity Pool.
+   * 
+ * + * string identity_provider = 3; + * + * @return The identityProvider. + */ + @java.lang.Override + public java.lang.String getIdentityProvider() { + java.lang.Object ref = identityProvider_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityProvider_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+   * Identity Pool.
+   * 
+ * + * string identity_provider = 3; + * + * @return The bytes for identityProvider. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityProviderBytes() { + java.lang.Object ref = identityProvider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityProvider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuerUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, issuerUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workloadPool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, workloadPool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identityProvider_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, identityProvider_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuerUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, issuerUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workloadPool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, workloadPool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identityProvider_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, identityProvider_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig)) { + return super.equals(obj); + } + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig other = + (com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) obj; + + if (!getIssuerUri().equals(other.getIssuerUri())) return false; + if (!getWorkloadPool().equals(other.getWorkloadPool())) return false; + if (!getIdentityProvider().equals(other.getIdentityProvider())) 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) + ISSUER_URI_FIELD_NUMBER; + hash = (53 * hash) + getIssuerUri().hashCode(); + hash = (37 * hash) + WORKLOAD_POOL_FIELD_NUMBER; + hash = (53 * hash) + getWorkloadPool().hashCode(); + hash = (37 * hash) + IDENTITY_PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getIdentityProvider().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig 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; + } + /** + * + * + *
+   * Workload Identity settings.
+   * 
+ * + * Protobuf type {@code google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.class, + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.Builder.class); + } + + // Construct using com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.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(); + issuerUri_ = ""; + + workloadPool_ = ""; + + identityProvider_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gkemulticloud.v1.CommonResourcesProto + .internal_static_google_cloud_gkemulticloud_v1_WorkloadIdentityConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getDefaultInstanceForType() { + return com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig build() { + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig buildPartial() { + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig result = + new com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(this); + result.issuerUri_ = issuerUri_; + result.workloadPool_ = workloadPool_; + result.identityProvider_ = identityProvider_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) { + return mergeFrom((com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig other) { + if (other == com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.getDefaultInstance()) + return this; + if (!other.getIssuerUri().isEmpty()) { + issuerUri_ = other.issuerUri_; + onChanged(); + } + if (!other.getWorkloadPool().isEmpty()) { + workloadPool_ = other.workloadPool_; + onChanged(); + } + if (!other.getIdentityProvider().isEmpty()) { + identityProvider_ = other.identityProvider_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object issuerUri_ = ""; + /** + * + * + *
+     * The OIDC issuer URL for this cluster.
+     * 
+ * + * string issuer_uri = 1; + * + * @return The issuerUri. + */ + public java.lang.String getIssuerUri() { + java.lang.Object ref = issuerUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuerUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The OIDC issuer URL for this cluster.
+     * 
+ * + * string issuer_uri = 1; + * + * @return The bytes for issuerUri. + */ + public com.google.protobuf.ByteString getIssuerUriBytes() { + java.lang.Object ref = issuerUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The OIDC issuer URL for this cluster.
+     * 
+ * + * string issuer_uri = 1; + * + * @param value The issuerUri to set. + * @return This builder for chaining. + */ + public Builder setIssuerUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + issuerUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The OIDC issuer URL for this cluster.
+     * 
+ * + * string issuer_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearIssuerUri() { + + issuerUri_ = getDefaultInstance().getIssuerUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The OIDC issuer URL for this cluster.
+     * 
+ * + * string issuer_uri = 1; + * + * @param value The bytes for issuerUri to set. + * @return This builder for chaining. + */ + public Builder setIssuerUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + issuerUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object workloadPool_ = ""; + /** + * + * + *
+     * The Workload Identity Pool associated to the cluster.
+     * 
+ * + * string workload_pool = 2; + * + * @return The workloadPool. + */ + public java.lang.String getWorkloadPool() { + java.lang.Object ref = workloadPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workloadPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Workload Identity Pool associated to the cluster.
+     * 
+ * + * string workload_pool = 2; + * + * @return The bytes for workloadPool. + */ + public com.google.protobuf.ByteString getWorkloadPoolBytes() { + java.lang.Object ref = workloadPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workloadPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Workload Identity Pool associated to the cluster.
+     * 
+ * + * string workload_pool = 2; + * + * @param value The workloadPool to set. + * @return This builder for chaining. + */ + public Builder setWorkloadPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + workloadPool_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Workload Identity Pool associated to the cluster.
+     * 
+ * + * string workload_pool = 2; + * + * @return This builder for chaining. + */ + public Builder clearWorkloadPool() { + + workloadPool_ = getDefaultInstance().getWorkloadPool(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Workload Identity Pool associated to the cluster.
+     * 
+ * + * string workload_pool = 2; + * + * @param value The bytes for workloadPool to set. + * @return This builder for chaining. + */ + public Builder setWorkloadPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + workloadPool_ = value; + onChanged(); + return this; + } + + private java.lang.Object identityProvider_ = ""; + /** + * + * + *
+     * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+     * Identity Pool.
+     * 
+ * + * string identity_provider = 3; + * + * @return The identityProvider. + */ + public java.lang.String getIdentityProvider() { + java.lang.Object ref = identityProvider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityProvider_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+     * Identity Pool.
+     * 
+ * + * string identity_provider = 3; + * + * @return The bytes for identityProvider. + */ + public com.google.protobuf.ByteString getIdentityProviderBytes() { + java.lang.Object ref = identityProvider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityProvider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+     * Identity Pool.
+     * 
+ * + * string identity_provider = 3; + * + * @param value The identityProvider to set. + * @return This builder for chaining. + */ + public Builder setIdentityProvider(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + identityProvider_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+     * Identity Pool.
+     * 
+ * + * string identity_provider = 3; + * + * @return This builder for chaining. + */ + public Builder clearIdentityProvider() { + + identityProvider_ = getDefaultInstance().getIdentityProvider(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+     * Identity Pool.
+     * 
+ * + * string identity_provider = 3; + * + * @param value The bytes for identityProvider to set. + * @return This builder for chaining. + */ + public Builder setIdentityProviderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + identityProvider_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + private static final com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(); + } + + public static com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkloadIdentityConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkloadIdentityConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfigOrBuilder.java b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfigOrBuilder.java new file mode 100644 index 0000000..96e2b50 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/WorkloadIdentityConfigOrBuilder.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/cloud/gkemulticloud/v1/common_resources.proto + +package com.google.cloud.gkemulticloud.v1; + +public interface WorkloadIdentityConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The OIDC issuer URL for this cluster.
+   * 
+ * + * string issuer_uri = 1; + * + * @return The issuerUri. + */ + java.lang.String getIssuerUri(); + /** + * + * + *
+   * The OIDC issuer URL for this cluster.
+   * 
+ * + * string issuer_uri = 1; + * + * @return The bytes for issuerUri. + */ + com.google.protobuf.ByteString getIssuerUriBytes(); + + /** + * + * + *
+   * The Workload Identity Pool associated to the cluster.
+   * 
+ * + * string workload_pool = 2; + * + * @return The workloadPool. + */ + java.lang.String getWorkloadPool(); + /** + * + * + *
+   * The Workload Identity Pool associated to the cluster.
+   * 
+ * + * string workload_pool = 2; + * + * @return The bytes for workloadPool. + */ + com.google.protobuf.ByteString getWorkloadPoolBytes(); + + /** + * + * + *
+   * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+   * Identity Pool.
+   * 
+ * + * string identity_provider = 3; + * + * @return The identityProvider. + */ + java.lang.String getIdentityProvider(); + /** + * + * + *
+   * The ID of the OIDC Identity Provider (IdP) associated to the Workload
+   * Identity Pool.
+   * 
+ * + * string identity_provider = 3; + * + * @return The bytes for identityProvider. + */ + com.google.protobuf.ByteString getIdentityProviderBytes(); +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto new file mode 100644 index 0000000..60e6594 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto @@ -0,0 +1,556 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/common_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AwsResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// An Anthos cluster running on AWS. +message AwsCluster { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}" + }; + + // The lifecycle state of the cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the cluster is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the cluster has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that some work is actively being done on + // the cluster, such as upgrading the control plane replicas. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Cluster names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // Optional. A human readable description of this cluster. + // Cannot be longer than 255 UTF-8 encoded bytes. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Cluster-wide networking configuration. + AwsClusterNetworking networking = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AWS region where the cluster runs. + // + // Each Google Cloud region supports a subset of nearby AWS regions. + // You can call + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + // to list all supported AWS regions within a given Google Cloud region. + string aws_region = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster control plane. + AwsControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster RBAC settings. + AwsAuthorization authorization = 15 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The endpoint of the cluster's API server. + string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the cluster. + string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the cluster. + bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was last updated. + google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 13; + + // Optional. Annotations on the cluster. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Key can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Workload Identity settings. + WorkloadIdentityConfig workload_identity_config = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PEM encoded x509 certificate of the cluster root of trust. + string cluster_ca_certificate = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Fleet configuration. + Fleet fleet = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Logging configuration for this cluster. + LoggingConfig logging_config = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// ControlPlane defines common parameters between control plane nodes. +message AwsControlPlane { + // Required. The Kubernetes version to run on control plane replicas + // (e.g. `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + string version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The AWS instance type. + // + // When unspecified, it uses a default based on the cluster's version. + string instance_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SSH configuration for how to access the underlying control plane + // machines. + AwsSshConfig ssh_config = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The list of subnets where control plane replicas will run. + // A replica will be provisioned on each subnet and up to three values + // can be provided. + // Each subnet must be in a different AWS Availability Zone (AZ). + repeated string subnet_ids = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The IDs of additional security groups to add to control plane + // replicas. The Anthos Multi-Cloud API will automatically create and manage + // security groups with the minimum rules needed for a functioning cluster. + repeated string security_group_ids = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name or ARN of the AWS IAM instance profile to assign to each control + // plane replica. + string iam_instance_profile = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration related to the root volume provisioned for each + // control plane replica. + // + // Volumes will be provisioned in the availability zone associated + // with the corresponding subnet. + // + // When unspecified, it defaults to 32 GiB with the GP2 volume type. + AwsVolumeTemplate root_volume = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the main volume provisioned for each + // control plane replica. + // The main volume is in charge of storing all of the cluster's etcd state. + // + // Volumes will be provisioned in the availability zone associated + // with the corresponding subnet. + // + // When unspecified, it defaults to 8 GiB with the GP2 volume type. + AwsVolumeTemplate main_volume = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + AwsDatabaseEncryption database_encryption = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A set of AWS resource tags to propagate to all underlying managed AWS + // resources. + // + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. + map tags = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Authentication configuration for management of AWS resources. + AwsServicesAuthentication aws_services_authentication = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AwsProxyConfig proxy_config = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Config encryption for user data. + AwsConfigEncryption config_encryption = 17 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The placement to use on control plane instances. + // When unspecified, the VPC's default tenancy will be used. + AwsInstancePlacement instance_placement = 18 [(google.api.field_behavior) = OPTIONAL]; +} + +// Authentication configuration for the management of AWS resources. +message AwsServicesAuthentication { + // Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API + // will assume when managing AWS resources on your account. + string role_arn = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An identifier for the assumed role session. + // + // When unspecified, it defaults to `multicloud-service-agent`. + string role_session_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration related to the cluster RBAC settings. +message AwsAuthorization { + // Required. Users that can perform operations as a cluster admin. A managed + // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + // to the users. Up to ten admin users can be provided. + // + // For more info on RBAC, see + // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + repeated AwsClusterUser admin_users = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Identities of a user-type subject for AWS clusters. +message AwsClusterUser { + // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to application-layer secrets encryption. +message AwsDatabaseEncryption { + // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration template for AWS EBS volumes. +message AwsVolumeTemplate { + // Types of supported EBS volumes. We currently only support GP2 or GP3 + // volumes. + // See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html + // for more information. + enum VolumeType { + // Not set. + VOLUME_TYPE_UNSPECIFIED = 0; + + // GP2 (General Purpose SSD volume type). + GP2 = 1; + + // GP3 (General Purpose SSD volume type). + GP3 = 2; + } + + // Optional. The size of the volume, in GiBs. + // + // When unspecified, a default value is provided. See the specific reference + // in the parent resource. + int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the EBS volume. + // + // When unspecified, it defaults to GP2 volume. + VolumeType volume_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume. + int32 iops = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to + // encrypt AWS EBS volumes. + // + // If not specified, the default Amazon managed key associated to + // the AWS region where this cluster runs will be used. + string kms_key_arn = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// ClusterNetworking defines cluster-wide networking configuration. +// +// Anthos clusters on AWS run on a single VPC. This includes control +// plane replicas and node pool nodes. +message AwsClusterNetworking { + // Required. The VPC associated with the cluster. All component clusters + // (i.e. control plane and node pools) run on a single VPC. + // + // This field cannot be changed after creation. + string vpc_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. All pods in the cluster are assigned an IPv4 address from these ranges. + // Only a single range is supported. + // This field cannot be changed after creation. + repeated string pod_address_cidr_blocks = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. All services in the cluster are assigned an IPv4 address from these ranges. + // Only a single range is supported. + // This field cannot be changed after creation. + repeated string service_address_cidr_blocks = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// An Anthos node pool running on AWS. +message AwsNodePool { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}" + }; + + // The lifecycle state of the node pool. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the node pool is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the node pool has been created + // and is fully usable. + RUNNING = 2; + + // The RECONCILING state indicates that the node pool is being reconciled. + RECONCILING = 3; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 4; + + // The ERROR state indicates the node pool is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the node pool requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Node pool names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // For more details on Google Cloud resource names, + // see [Resource Names](https://cloud.google.com/apis/design/resource_names) + string name = 1; + + // Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + string version = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The configuration of the node pool. + AwsNodeConfig config = 28 [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaler configuration for this node pool. + AwsNodePoolAutoscaling autoscaling = 25 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subnet where the node pool node run. + string subnet_id = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The lifecycle state of the node pool. + State state = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the node pool. + string uid = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the node + // pool. + bool reconciling = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was created. + google.protobuf.Timestamp create_time = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was last updated. + google.protobuf.Timestamp update_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 21; + + // Optional. Annotations on the node pool. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Key can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 27 [(google.api.field_behavior) = REQUIRED]; +} + +// Parameters that describe the nodes in a cluster. +message AwsNodeConfig { + // Optional. The AWS instance type. + // + // When unspecified, it uses a default based on the node pool's version. + string instance_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Template for the root volume provisioned for node pool nodes. + // Volumes will be provisioned in the availability zone assigned + // to the node pool subnet. + // + // When unspecified, it defaults to 32 GiB with the GP2 volume type. + AwsVolumeTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial taints assigned to nodes of this node pool. + repeated NodeTaint taints = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial labels assigned to nodes of this node pool. An object + // containing a list of "key": value pairs. Example: { "name": "wrench", + // "mass": "1.3kg", "count": "3" }. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Key/value metadata to assign to each underlying AWS resource. Specify at + // most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/). + // Keys can be up to 127 Unicode characters. + // Values can be up to 255 Unicode characters. + map tags = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + string iam_instance_profile = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The OS image type to use on node pool instances. + // Can have a value of `ubuntu`, or `windows` if the cluster enables + // the Windows node pool preview feature. + // + // When unspecified, it defaults to `ubuntu`. + string image_type = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The SSH configuration. + AwsSshConfig ssh_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IDs of additional security groups to add to nodes in this pool. The + // manager will automatically create security groups with minimum rules + // needed for a functioning cluster. + repeated string security_group_ids = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AwsProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Config encryption for user data. + AwsConfigEncryption config_encryption = 13 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Placement related info for this node. + // When unspecified, the VPC's default tenancy will be used. + AwsInstancePlacement instance_placement = 14 [(google.api.field_behavior) = OPTIONAL]; +} + +// AwsNodePoolAutoscaling contains information required by cluster autoscaler +// to adjust the size of the node pool to the current cluster usage. +message AwsNodePoolAutoscaling { + // Required. Minimum number of nodes in the node pool. Must be greater than or equal to + // 1 and less than or equal to max_node_count. + int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes in the node pool. Must be greater than or equal to + // min_node_count and less than or equal to 50. + int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// AwsServerConfig is the configuration of GKE cluster on AWS. +message AwsServerConfig { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsServerConfig" + pattern: "projects/{project}/locations/{location}/awsServerConfig" + }; + + // The resource name of the config. + string name = 1; + + // List of valid Kubernetes versions. + repeated AwsK8sVersionInfo valid_versions = 2; + + // The list of supported AWS regions. + repeated string supported_aws_regions = 3; +} + +// Kubernetes version information of GKE cluster on AWS. +message AwsK8sVersionInfo { + // Kubernetes version name. + string version = 1; +} + +// SSH configuration for AWS resources. +message AwsSshConfig { + // Required. The name of the EC2 key pair used to login into cluster machines. + string ec2_key_pair = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of a proxy config stored in AWS Secret Manager. +message AwsProxyConfig { + // The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + // configuration. + string secret_arn = 1; + + // The version string of the AWS Secret Manager secret that contains the + // HTTP(S) proxy configuration. + string secret_version = 2; +} + +// Config encryption for user data. +message AwsConfigEncryption { + // Required. The ARN of the AWS KMS key used to encrypt user data. + string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of placement information for an instance. +// Limitations for using the `host` tenancy: +// +// * T3 instances that use the unlimited CPU credit option don't support host +// tenancy. +message AwsInstancePlacement { + // Tenancy defines how EC2 instances are distributed across physical hardware. + enum Tenancy { + // Not set. + TENANCY_UNSPECIFIED = 0; + + // Use default VPC tenancy. + DEFAULT = 1; + + // Run a dedicated instance. + DEDICATED = 2; + + // Launch this instance to a dedicated host. + HOST = 3; + } + + // Required. The tenancy for instance. + Tenancy tenancy = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_service.proto b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_service.proto new file mode 100644 index 0000000..d7f7144 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_service.proto @@ -0,0 +1,548 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/aws_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AwsServiceProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// The AwsClusters API provides a single centrally managed service +// to create and manage Anthos clusters that run on AWS infrastructure. +service AwsClusters { + option (google.api.default_host) = "gkemulticloud.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAwsCluster(CreateAwsClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/awsClusters" + body: "aws_cluster" + }; + option (google.api.method_signature) = "parent,aws_cluster,aws_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "AwsCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + rpc UpdateAwsCluster(UpdateAwsClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}" + body: "aws_cluster" + }; + option (google.api.method_signature) = "aws_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AwsCluster" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + rpc GetAwsCluster(GetAwsClusterRequest) returns (AwsCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and + // region. + rpc ListAwsClusters(ListAwsClustersRequest) returns (ListAwsClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/awsClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + // + // Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resources. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAwsCluster(DeleteAwsClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/awsClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Generates a short-lived access token to authenticate to a given + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + rpc GenerateAwsAccessToken(GenerateAwsAccessTokenRequest) returns (GenerateAwsAccessTokenResponse) { + option (google.api.http) = { + get: "/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken" + }; + } + + // Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAwsNodePool(CreateAwsNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" + body: "aws_node_pool" + }; + option (google.api.method_signature) = "parent,aws_node_pool,aws_node_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "AwsNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + rpc UpdateAwsNodePool(UpdateAwsNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + body: "aws_node_pool" + }; + option (google.api.method_signature) = "aws_node_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AwsNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + rpc GetAwsNodePool(GetAwsNodePoolRequest) returns (AwsNodePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + rpc ListAwsNodePools(ListAwsNodePoolsRequest) returns (ListAwsNodePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAwsNodePool(DeleteAwsNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns information, such as supported AWS regions and Kubernetes + // versions, on a given Google Cloud location. + rpc GetAwsServerConfig(GetAwsServerConfigRequest) returns (AwsServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsServerConfig}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `AwsClusters.CreateAwsCluster` method. +message CreateAwsClusterRequest { + // Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + AwsCluster aws_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the parent + // resource. + // + // The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource name formatted as + // `projects//locations//awsClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + string aws_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the cluster. + bool validate_only = 4; +} + +// Request message for `AwsClusters.UpdateAwsCluster` method. +message UpdateAwsClusterRequest { + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + AwsCluster aws_cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually update the cluster. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + // + // * `description`. + // * `annotations`. + // * `control_plane.version`. + // * `authorization.admin_users`. + // * `control_plane.aws_services_authentication.role_arn`. + // * `control_plane.aws_services_authentication.role_session_name`. + // * `control_plane.config_encryption.kms_key_arn`. + // * `control_plane.instance_type`. + // * `control_plane.security_group_ids`. + // * `control_plane.proxy_config`. + // * `control_plane.proxy_config.secret_arn`. + // * `control_plane.proxy_config.secret_version`. + // * `control_plane.root_volume.iops`. + // * `control_plane.root_volume.kms_key_arn`. + // * `control_plane.root_volume.volume_type`. + // * `control_plane.root_volume.size_gib`. + // * `control_plane.ssh_config`. + // * `control_plane.ssh_config.ec2_key_pair`. + // * `control_plane.instance_placement.tenancy`. + // * `logging_config`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AwsClusters.GetAwsCluster` method. +message GetAwsClusterRequest { + // Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; +} + +// Request message for `AwsClusters.ListAwsClusters` method. +message ListAwsClustersRequest { + // Required. The parent location which owns this collection of + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if + // there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + string page_token = 3; +} + +// Response message for `AwsClusters.ListAwsClusters` method. +message ListAwsClustersResponse { + // A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP + // project and region region. + repeated AwsCluster aws_clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AwsClusters.DeleteAwsCluster` method. +message DeleteAwsClusterRequest { + // Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 2; + + // If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found, + // the request will succeed but no action will be taken on the server and a + // completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided etag does not match the current etag of the cluster, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// Response message for `AwsClusters.CreateAwsNodePool` method. +message CreateAwsNodePoolRequest { + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + AwsNodePool aws_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the parent + // resource. + // + // The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resource name formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + string aws_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the node + // pool. + bool validate_only = 4; +} + +// Request message for `AwsClusters.UpdateAwsNodePool` method. +message UpdateAwsNodePoolRequest { + // Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + AwsNodePool aws_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but don't actually update the node pool. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + // + // * `annotations`. + // * `version`. + // * `autoscaling.min_node_count`. + // * `autoscaling.max_node_count`. + // * `config.config_encryption.kms_key_arn`. + // * `config.security_group_ids`. + // * `config.root_volume.iops`. + // * `config.root_volume.kms_key_arn`. + // * `config.root_volume.volume_type`. + // * `config.root_volume.size_gib`. + // * `config.proxy_config`. + // * `config.proxy_config.secret_arn`. + // * `config.proxy_config.secret_version`. + // * `config.ssh_config`. + // * `config.ssh_config.ec2_key_pair`. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AwsClusters.GetAwsNodePool` method. +message GetAwsNodePoolRequest { + // Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + // + // `AwsNodePool` names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; +} + +// Request message for `AwsClusters.ListAwsNodePools` method. +message ListAwsNodePoolsRequest { + // Required. The parent `AwsCluster` which owns this collection of + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if + // there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + string page_token = 3; +} + +// Response message for `AwsClusters.ListAwsNodePools` method. +message ListAwsNodePoolsResponse { + // A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`. + repeated AwsNodePool aws_node_pools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AwsClusters.DeleteNodePool` method. +message DeleteAwsNodePoolRequest { + // Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + // + // `AwsNodePool` names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // If set, only validate the request, but do not actually delete the node + // pool. + bool validate_only = 2; + + // If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found, + // the request will succeed but no action will be taken on the server and a + // completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided ETag does not match the current etag of the node pool, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// GetAwsServerConfigRequest gets the server config of GKE cluster on AWS. +message GetAwsServerConfigRequest { + // Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + // + // `AwsServerConfig` names are formatted as + // `projects//locations//awsServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsServerConfig" + } + ]; +} + +// Request message for `AwsClusters.GenerateAwsAccessToken` method. +message GenerateAwsAccessTokenRequest { + // Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string aws_cluster = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; +} + +// Response message for `AwsClusters.GenerateAwsAccessToken` method. +message GenerateAwsAccessTokenResponse { + // Output only. Access token to authenticate to k8s api-server. + string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp at which the token will expire. + google.protobuf.Timestamp expiration_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_resources.proto b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_resources.proto new file mode 100644 index 0000000..3548c6a --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_resources.proto @@ -0,0 +1,632 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/common_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AzureResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// An Anthos cluster running on Azure. +message AzureCluster { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}" + }; + + // The lifecycle state of the cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the cluster is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the cluster has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that some work is actively being done on + // the cluster, such as upgrading the control plane replicas. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Cluster names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // Optional. A human readable description of this cluster. + // Cannot be longer than 255 UTF-8 encoded bytes. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Azure region where the cluster runs. + // + // Each Google Cloud region supports a subset of nearby Azure regions. + // You can call + // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + // to list all supported Azure regions within a given Google Cloud region. + string azure_region = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ARM ID of the resource group where the cluster resources are deployed. + // For example: + // `/subscriptions//resourceGroups/` + string resource_group_id = 17 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for + // how the Anthos Multi-Cloud API connects to Azure APIs. + // + // The `AzureClient` resource must reside on the same GCP project and region + // as the `AzureCluster`. + // + // `AzureClient` names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string azure_client = 16 [(google.api.field_behavior) = REQUIRED]; + + // Required. Cluster-wide networking configuration. + AzureClusterNetworking networking = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster control plane. + AzureControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster RBAC settings. + AzureAuthorization authorization = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The endpoint of the cluster's API server. + string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the cluster. + string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the cluster. + bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was last updated. + google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 13; + + // Optional. Annotations on the cluster. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Workload Identity settings. + WorkloadIdentityConfig workload_identity_config = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PEM encoded x509 certificate of the cluster root of trust. + string cluster_ca_certificate = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Fleet configuration. + Fleet fleet = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Mananged Azure resources for this cluster. + AzureClusterResources managed_resources = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Logging configuration for this cluster. + LoggingConfig logging_config = 23 [(google.api.field_behavior) = OPTIONAL]; +} + +// ClusterNetworking contains cluster-wide networking configuration. +message AzureClusterNetworking { + // Required. The Azure Resource Manager (ARM) ID of the VNet associated with your + // cluster. + // + // All components in the cluster (i.e. control plane and node pools) run on a + // single VNet. + // + // Example: + // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + // + // This field cannot be changed after creation. + string virtual_network_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IP address range of the pods in this cluster, in CIDR + // notation (e.g. `10.96.0.0/14`). + // + // All pods in the cluster get assigned a unique IPv4 address from these + // ranges. Only a single range is supported. + // + // This field cannot be changed after creation. + repeated string pod_address_cidr_blocks = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IP address range for services in this cluster, in CIDR + // notation (e.g. `10.96.0.0/14`). + // + // All services in the cluster get assigned a unique IPv4 address from these + // ranges. Only a single range is supported. + // + // This field cannot be changed after creating a cluster. + repeated string service_address_cidr_blocks = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ARM ID of the subnet where Kubernetes private service type load + // balancers are deployed. When unspecified, it defaults to + // AzureControlPlane.subnet_id. + // + // Example: + // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + string service_load_balancer_subnet_id = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// AzureControlPlane represents the control plane configurations. +message AzureControlPlane { + // Required. The Kubernetes version to run on control plane replicas + // (e.g. `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + string version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ARM ID of the default subnet for the control plane. The control plane + // VMs are deployed in this subnet, unless + // `AzureControlPlane.replica_placements` is specified. This subnet will also + // be used as default for `AzureControlPlane.endpoint_subnet_id` if + // `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + // be used as default for + // `AzureClusterNetworking.service_load_balancer_subnet_id`. + // + // Example: + // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + string subnet_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + // + // For available VM sizes, see + // https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + // + // When unspecified, it defaults to `Standard_DS2_v2`. + string vm_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. SSH configuration for how to access the underlying control plane + // machines. + AzureSshConfig ssh_config = 11 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration related to the root volume provisioned for each + // control plane replica. + // + // When unspecified, it defaults to 32-GiB Azure Disk. + AzureDiskTemplate root_volume = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the main volume provisioned for each + // control plane replica. + // The main volume is in charge of storing all of the cluster's etcd state. + // + // When unspecified, it defaults to a 8-GiB Azure Disk. + AzureDiskTemplate main_volume = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to application-layer secrets encryption. + AzureDatabaseEncryption database_encryption = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AzureProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to vm config encryption. + AzureConfigEncryption config_encryption = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of tags to apply to all underlying control plane Azure resources. + map tags = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for where to place the control plane replicas. + // + // Up to three replica placement instances can be specified. If + // replica_placements is set, the replica placement instances will be applied + // to the three control plane replicas as evenly as possible. + repeated ReplicaPlacement replica_placements = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ARM ID of the subnet where the control plane load balancer is deployed. + // When unspecified, it defaults to AzureControlPlane.subnet_id. + // + // Example: + // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + string endpoint_subnet_id = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the placement of a control plane replica. +message ReplicaPlacement { + // Required. For a given replica, the ARM ID of the subnet where the control plane VM is + // deployed. Make sure it's a subnet under the virtual network in the cluster + // configuration. + string subnet_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. For a given replica, the Azure availability zone where to provision the + // control plane VM and the ETCD disk. + string azure_availability_zone = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of a proxy config stored in Azure Key Vault. +message AzureProxyConfig { + // The ARM ID the of the resource group containing proxy keyvault. + // + // Resource group ids are formatted as + // `/subscriptions//resourceGroups/`. + string resource_group_id = 1; + + // The URL the of the proxy setting secret with its version. + // + // Secret ids are formatted as + // `https://.vault.azure.net/secrets//`. + string secret_id = 2; +} + +// Configuration related to application-layer secrets encryption. +// +// Anthos clusters on Azure encrypts your Kubernetes data at rest +// in etcd using Azure Key Vault. +message AzureDatabaseEncryption { + // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + // + // For example: + // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + // Encryption will always take the latest version of the key and hence + // specific version is not supported. + string key_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to config data encryption. +// +// Azure VM bootstrap secret is envelope encrypted with the provided key vault +// key. +message AzureConfigEncryption { + // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data. + // + // For example: + // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + string key_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. RSA key of the Azure Key Vault public key to use for encrypting the data. + // + // This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + // in ASN.1 DER form. The string must be comprised of a single PEM block of + // type "PUBLIC KEY". + string public_key = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for Azure Disks. +message AzureDiskTemplate { + // Optional. The size of the disk, in GiBs. + // + // When unspecified, a default value is provided. See the specific reference + // in the parent resource. + int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AzureClient` resources hold client authentication information needed by the +// Anthos Multi-Cloud API to manage Azure resources on your Azure subscription. +// +// When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is created, an `AzureClient` resource needs to be +// provided and all operations on Azure resources associated to that cluster +// will authenticate to Azure services using the given client. +// +// `AzureClient` resources are immutable and cannot be modified upon creation. +// +// Each `AzureClient` resource is bound to a single Azure Active Directory +// Application and tenant. +message AzureClient { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureClient" + pattern: "projects/{project}/locations/{location}/azureClients/{azure_client}" + }; + + // The name of this resource. + // + // `AzureClient` resource names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1; + + // Required. The Azure Active Directory Tenant ID. + string tenant_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Azure Active Directory Application ID. + string application_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Annotations on the resource. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The PEM encoded x509 certificate. + string pem_certificate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the client. + string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this resource was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration related to the cluster RBAC settings. +message AzureAuthorization { + // Required. Users that can perform operations as a cluster admin. A managed + // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + // to the users. Up to ten admin users can be provided. + // + // For more info on RBAC, see + // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + repeated AzureClusterUser admin_users = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Identities of a user-type subject for Azure clusters. +message AzureClusterUser { + // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// An Anthos node pool running on Azure. +message AzureNodePool { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}" + }; + + // The lifecycle state of the node pool. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the node pool is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the node pool has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that the node pool is being reconciled. + RECONCILING = 3; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 4; + + // The ERROR state indicates the node pool is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the node pool requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Node pool names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // For more details on Google Cloud resource names, + // see [Resource Names](https://cloud.google.com/apis/design/resource_names) + string name = 1; + + // Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool. + string version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The node configuration of the node pool. + AzureNodeConfig config = 22 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a + // subnet under the virtual network in the cluster configuration. + string subnet_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaler configuration for this node pool. + AzureNodePoolAutoscaling autoscaling = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the node pool. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the node pool. + string uid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently pending changes to the node + // pool. + bool reconciling = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was created. + google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was last updated. + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 12; + + // Optional. Annotations on the node pool. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 21 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The Azure availability zone of the nodes in this nodepool. + // + // When unspecified, it defaults to `1`. + string azure_availability_zone = 23 [(google.api.field_behavior) = OPTIONAL]; +} + +// Parameters that describe the configuration of all node machines +// on a given node pool. +message AzureNodeConfig { + // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + // + // See [Supported VM + // sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + // + // When unspecified, it defaults to `Standard_DS2_v2`. + string vm_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the root volume provisioned for each + // node pool machine. + // + // When unspecified, it defaults to a 32-GiB Azure Disk. + AzureDiskTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of tags to apply to all underlying Azure resources for this node + // pool. This currently only includes Virtual Machine Scale Sets. + // + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. + map tags = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The OS image type to use on node pool instances. + // Can have a value of `ubuntu`, or `windows` if the cluster enables + // the Windows node pool preview feature. + // + // When unspecified, it defaults to `ubuntu`. + string image_type = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. SSH configuration for how to access the node pool machines. + AzureSshConfig ssh_config = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AzureProxyConfig proxy_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to vm config encryption. + AzureConfigEncryption config_encryption = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial taints assigned to nodes of this node pool. + repeated NodeTaint taints = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial labels assigned to nodes of this node pool. An object + // containing a list of "key": value pairs. Example: { "name": "wrench", + // "mass": "1.3kg", "count": "3" }. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration related to Kubernetes cluster autoscaler. +// +// The Kubernetes cluster autoscaler will automatically adjust the +// size of the node pool based on the cluster load. +message AzureNodePoolAutoscaling { + // Required. Minimum number of nodes in the node pool. Must be greater than or equal to + // 1 and less than or equal to max_node_count. + int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes in the node pool. Must be greater than or equal to + // min_node_count and less than or equal to 50. + int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// AzureServerConfig contains information about a Google Cloud location, such as +// supported Azure regions and Kubernetes versions. +message AzureServerConfig { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureServerConfig" + pattern: "projects/{project}/locations/{location}/azureServerConfig" + }; + + // The `AzureServerConfig` resource name. + // + // `AzureServerConfig` names are formatted as + // `projects//locations//azureServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // List of valid Kubernetes versions. + repeated AzureK8sVersionInfo valid_versions = 2; + + // The list of supported Azure regions. + repeated string supported_azure_regions = 3; +} + +// Information about a supported Kubernetes version. +message AzureK8sVersionInfo { + // A supported Kubernetes version (for example, `1.19.10-gke.1000`) + string version = 1; +} + +// SSH configuration for Azure resources. +message AzureSshConfig { + // Required. The SSH public key data for VMs managed by Anthos. This accepts the + // authorized_keys file format used in OpenSSH according to the sshd(8) manual + // page. + string authorized_key = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Managed Azure resources for the cluster. +// +// The values could change and be empty, depending on the state of the cluster. +message AzureClusterResources { + // Output only. The ARM ID of the cluster network security group. + string network_security_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ARM ID of the control plane application security group. + string control_plane_application_security_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto new file mode 100644 index 0000000..aed6420 --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto @@ -0,0 +1,701 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/azure_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AzureServiceProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// The AzureClusters API provides a single centrally managed service +// to create and manage Anthos clusters that run on Azure infrastructure. +service AzureClusters { + option (google.api.default_host) = "gkemulticloud.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project + // and region. + // + // `AzureClient` resources hold client authentication + // information needed by the Anthos Multicloud API to manage Azure resources + // on your Azure subscription on your behalf. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureClient(CreateAzureClientRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/azureClients" + body: "azure_client" + }; + option (google.api.method_signature) = "parent,azure_client,azure_client_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureClient" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + rpc GetAzureClient(GetAzureClientRequest) returns (AzureClient) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClients/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and + // region. + rpc ListAzureClients(ListAzureClientsRequest) returns (ListAzureClientsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/azureClients" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + // + // If the client is used by one or more clusters, deletion will + // fail and a `FAILED_PRECONDITION` error will be returned. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureClient(DeleteAzureClientRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClients/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureCluster(CreateAzureClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/azureClusters" + body: "azure_cluster" + }; + option (google.api.method_signature) = "parent,azure_cluster,azure_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + rpc UpdateAzureCluster(UpdateAzureClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}" + body: "azure_cluster" + }; + option (google.api.method_signature) = "azure_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AzureCluster" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + rpc GetAzureCluster(GetAzureClusterRequest) returns (AzureCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and + // region. + rpc ListAzureClusters(ListAzureClustersRequest) returns (ListAzureClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/azureClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + // + // Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resources. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureCluster(DeleteAzureClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Generates a short-lived access token to authenticate to a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + rpc GenerateAzureAccessToken(GenerateAzureAccessTokenRequest) returns (GenerateAzureAccessTokenResponse) { + option (google.api.http) = { + get: "/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken" + }; + } + + // Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureNodePool(CreateAzureNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" + body: "azure_node_pool" + }; + option (google.api.method_signature) = "parent,azure_node_pool,azure_node_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + rpc UpdateAzureNodePool(UpdateAzureNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + body: "azure_node_pool" + }; + option (google.api.method_signature) = "azure_node_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AzureNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + rpc GetAzureNodePool(GetAzureNodePoolRequest) returns (AzureNodePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + rpc ListAzureNodePools(ListAzureNodePoolsRequest) returns (ListAzureNodePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureNodePool(DeleteAzureNodePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns information, such as supported Azure regions and Kubernetes + // versions, on a given Google Cloud location. + rpc GetAzureServerConfig(GetAzureServerConfigRequest) returns (AzureServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureServerConfig}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `AzureClusters.CreateAzureCluster` method. +message CreateAzureClusterRequest { + // Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + AzureCluster azure_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the parent + // resource. + // + // The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource name formatted as + // `projects//locations//azureClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + string azure_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the cluster. + bool validate_only = 4; +} + +// Request message for `AzureClusters.UpdateAzureCluster` method. +message UpdateAzureClusterRequest { + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + AzureCluster azure_cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually update the cluster. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + // + // * `description`. + // * `annotations`. + // * `azureClient`. + // * `control_plane.version`. + // * `control_plane.vm_size`. + // * `authorization.admin_users`. + // * `control_plane.root_volume.size_gib`. + // * `logging_config` + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AzureClusters.GetAzureCluster` method. +message GetAzureClusterRequest { + // Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; +} + +// Request message for `AzureClusters.ListAzureClusters` method. +message ListAzureClustersRequest { + // Required. The parent location which owns this collection of + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if + // there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureClusters` method. +message ListAzureClustersResponse { + // A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP + // project and region region. + repeated AzureCluster azure_clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `Clusters.DeleteAzureCluster` method. +message DeleteAzureClusterRequest { + // Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found, + // the request will succeed but no action will be taken on the server and a + // completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 2; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 3; + + // The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided etag does not match the current etag of the cluster, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// Response message for `AzureClusters.CreateAzureNodePool` method. +message CreateAzureNodePoolRequest { + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + AzureNodePool azure_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the parent + // resource. + // + // The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resource name formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + string azure_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the node + // pool. + bool validate_only = 4; +} + +// Request message for `AzureClusters.UpdateAzureNodePool` method. +message UpdateAzureNodePoolRequest { + // Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + AzureNodePool azure_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but don't actually update the node pool. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + // + // *. `annotations`. + // * `version`. + // * `autoscaling.min_node_count`. + // * `autoscaling.max_node_count`. + // * `config.vm_size`. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AzureClusters.GetAzureNodePool` method. +message GetAzureNodePoolRequest { + // Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + // + // `AzureNodePool` names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; +} + +// Request message for `AzureClusters.ListAzureNodePools` method. +message ListAzureNodePoolsRequest { + // Required. The parent `AzureCluster` which owns this collection of + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if + // there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureNodePools` method. +message ListAzureNodePoolsResponse { + // A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`. + repeated AzureNodePool azure_node_pools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Delete message for `AzureClusters.DeleteNodePool` method. +message DeleteAzureNodePoolRequest { + // Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + // + // `AzureNodePool` names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // If set, only validate the request, but do not actually delete the node + // pool. + bool validate_only = 2; + + // If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found, + // the request will succeed but no action will be taken on the server and a + // completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided ETag does not match the current etag of the node pool, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// GetAzureServerConfigRequest gets the server config of GKE cluster on Azure. +message GetAzureServerConfigRequest { + // Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + // + // `AzureServerConfig` names are formatted as + // `projects//locations//azureServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureServerConfig" + } + ]; +} + +// Request message for `AzureClusters.CreateAzureClient` method. +message CreateAzureClientRequest { + // Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + AzureClient azure_client = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the parent + // resource. + // + // The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resource name formatted as + // `projects//locations//azureClients/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + string azure_client_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the client. + bool validate_only = 3; +} + +// Request message for `AzureClusters.GetAzureClient` method. +message GetAzureClientRequest { + // Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. + // + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; +} + +// Request message for `AzureClusters.ListAzureClients` method. +message ListAzureClientsRequest { + // Required. The parent location which owns this collection of + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if + // there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureClients` method. +message ListAzureClientsResponse { + // A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud + // project and region region. + repeated AzureClient azure_clients = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AzureClusters.DeleteAzureClient` method. +message DeleteAzureClientRequest { + // Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + // + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found, + // the request will succeed but no action will be taken on the server and a + // completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 2; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 3; +} + +// Request message for `AzureClusters.GenerateAzureAccessToken` method. +message GenerateAzureAccessTokenRequest { + // Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + // + // `AzureCluster` names are formatted as + // `projects//locations//AzureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string azure_cluster = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; +} + +// Response message for `AzureClusters.GenerateAzureAccessToken` method. +message GenerateAzureAccessTokenResponse { + // Output only. Access token to authenticate to k8s api-server. + string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp at which the token will expire. + google.protobuf.Timestamp expiration_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/common_resources.proto b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/common_resources.proto new file mode 100644 index 0000000..2a8e1bc --- /dev/null +++ b/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/common_resources.proto @@ -0,0 +1,145 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "CommonResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// Workload Identity settings. +message WorkloadIdentityConfig { + // The OIDC issuer URL for this cluster. + string issuer_uri = 1; + + // The Workload Identity Pool associated to the cluster. + string workload_pool = 2; + + // The ID of the OIDC Identity Provider (IdP) associated to the Workload + // Identity Pool. + string identity_provider = 3; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Required. The maximum number of pods to schedule on a single node. + int64 max_pods_per_node = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata about a long-running operation. +message OperationMetadata { + // Output only. The time at which this operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this operation was completed. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the resource associated to this operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_detail = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of any error that occurred during the operation. + string error_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The taint content for the node taint. +message NodeTaint { + // The taint effect. + enum Effect { + // Not set. + EFFECT_UNSPECIFIED = 0; + + // Do not allow new pods to schedule onto the node unless they tolerate the + // taint, but allow all pods submitted to Kubelet without going through the + // scheduler to start, and allow all already-running pods to continue + // running. Enforced by the scheduler. + NO_SCHEDULE = 1; + + // Like TaintEffectNoSchedule, but the scheduler tries not to schedule + // new pods onto the node, rather than prohibiting new pods from scheduling + // onto the node entirely. Enforced by the scheduler. + PREFER_NO_SCHEDULE = 2; + + // Evict any already-running pods that do not tolerate the taint. + // Currently enforced by NodeController. + NO_EXECUTE = 3; + } + + // Required. Key for the taint. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Value for the taint. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The taint effect. + Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Fleet related configuration. +// +// Fleets are a Google Cloud concept for logically organizing clusters, +// letting you use and manage multi-cluster capabilities and apply +// consistent policies across your systems. +// +// See [Anthos +// Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for +// more details on Anthos multi-cluster capabilities using Fleets. +message Fleet { + // Required. The name of the Fleet host project where this cluster will be registered. + // + // Project names are formatted as + // `projects/`. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The name of the managed Hub Membership resource associated to this cluster. + // + // Membership names are formatted as + // `projects//locations/global/membership/`. + string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Parameters that describe the Logging configuration in a cluster. +message LoggingConfig { + // The configuration of the logging components; + LoggingComponentConfig component_config = 1; +} + +// Parameters that describe the Logging component configuration in a cluster. +message LoggingComponentConfig { + // The components of the logging configuration; + enum Component { + // No component is specified + COMPONENT_UNSPECIFIED = 0; + + // This indicates that system logging components is enabled. + SYSTEM_COMPONENTS = 1; + + // This indicates that user workload logging component is enabled. + WORKLOADS = 2; + } + + // The components to be enabled. + repeated Component enable_components = 1; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..13e3adf --- /dev/null +++ b/renovate.json @@ -0,0 +1,74 @@ +{ + "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-gke-multi-cloud", + "^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", + "^com.google.cloud:google-cloud-conformance-tests" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "dependencyDashboard": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 0000000..988256b --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + -install-without-bom + jar + Google Anthos Multicloud Install Without Bom + https://github.com/googleapis/java-gke-multi-cloud + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-gke-multi-cloud + 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 0000000..fefa955 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud--samples + 0.0.1-SNAPSHOT + pom + Google Anthos Multicloud Samples Parent + https://github.com/googleapis/java-gke-multi-cloud + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 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.12 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 0000000..fe02f54 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + -snapshot + jar + Google Anthos Multicloud Snapshot Samples + https://github.com/googleapis/java-gke-multi-cloud + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-gke-multi-cloud + 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/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..80fd9f0 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + -snippets + jar + Google Anthos Multicloud Snippets + https://github.com/googleapis/java-gke-multi-cloud + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-gke-multi-cloud + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 0000000..0392c34 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-gke-multi-cloud:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-gke-multi-cloud-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-gke-multi-cloud-v1:0.0.0:0.0.1-SNAPSHOT