1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/dataproc/v1/clusters.proto 18 19 package com.google.cloud.dataproc.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Describes the identifying information, config, and status of 26 * a Dataproc cluster 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.dataproc.v1.Cluster} 30 */ 31 public final class Cluster extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Cluster) 34 ClusterOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use Cluster.newBuilder() to construct. Cluster(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private Cluster(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 Cluster()41 private Cluster() { 42 projectId_ = ""; 43 clusterName_ = ""; 44 statusHistory_ = java.util.Collections.emptyList(); 45 clusterUuid_ = ""; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new Cluster(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.dataproc.v1.ClustersProto 61 .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; 62 } 63 64 @SuppressWarnings({"rawtypes"}) 65 @java.lang.Override internalGetMapField(int number)66 protected com.google.protobuf.MapField internalGetMapField(int number) { 67 switch (number) { 68 case 8: 69 return internalGetLabels(); 70 default: 71 throw new RuntimeException("Invalid map field number: " + number); 72 } 73 } 74 75 @java.lang.Override 76 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()77 internalGetFieldAccessorTable() { 78 return com.google.cloud.dataproc.v1.ClustersProto 79 .internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable 80 .ensureFieldAccessorsInitialized( 81 com.google.cloud.dataproc.v1.Cluster.class, 82 com.google.cloud.dataproc.v1.Cluster.Builder.class); 83 } 84 85 public static final int PROJECT_ID_FIELD_NUMBER = 1; 86 87 @SuppressWarnings("serial") 88 private volatile java.lang.Object projectId_ = ""; 89 /** 90 * 91 * 92 * <pre> 93 * Required. The Google Cloud Platform project ID that the cluster belongs to. 94 * </pre> 95 * 96 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 97 * 98 * @return The projectId. 99 */ 100 @java.lang.Override getProjectId()101 public java.lang.String getProjectId() { 102 java.lang.Object ref = projectId_; 103 if (ref instanceof java.lang.String) { 104 return (java.lang.String) ref; 105 } else { 106 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 107 java.lang.String s = bs.toStringUtf8(); 108 projectId_ = s; 109 return s; 110 } 111 } 112 /** 113 * 114 * 115 * <pre> 116 * Required. The Google Cloud Platform project ID that the cluster belongs to. 117 * </pre> 118 * 119 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 120 * 121 * @return The bytes for projectId. 122 */ 123 @java.lang.Override getProjectIdBytes()124 public com.google.protobuf.ByteString getProjectIdBytes() { 125 java.lang.Object ref = projectId_; 126 if (ref instanceof java.lang.String) { 127 com.google.protobuf.ByteString b = 128 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 129 projectId_ = b; 130 return b; 131 } else { 132 return (com.google.protobuf.ByteString) ref; 133 } 134 } 135 136 public static final int CLUSTER_NAME_FIELD_NUMBER = 2; 137 138 @SuppressWarnings("serial") 139 private volatile java.lang.Object clusterName_ = ""; 140 /** 141 * 142 * 143 * <pre> 144 * Required. The cluster name, which must be unique within a project. 145 * The name must start with a lowercase letter, and can contain 146 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 147 * with a hyphen. The name of a deleted cluster can be reused. 148 * </pre> 149 * 150 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 151 * 152 * @return The clusterName. 153 */ 154 @java.lang.Override getClusterName()155 public java.lang.String getClusterName() { 156 java.lang.Object ref = clusterName_; 157 if (ref instanceof java.lang.String) { 158 return (java.lang.String) ref; 159 } else { 160 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 161 java.lang.String s = bs.toStringUtf8(); 162 clusterName_ = s; 163 return s; 164 } 165 } 166 /** 167 * 168 * 169 * <pre> 170 * Required. The cluster name, which must be unique within a project. 171 * The name must start with a lowercase letter, and can contain 172 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 173 * with a hyphen. The name of a deleted cluster can be reused. 174 * </pre> 175 * 176 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 177 * 178 * @return The bytes for clusterName. 179 */ 180 @java.lang.Override getClusterNameBytes()181 public com.google.protobuf.ByteString getClusterNameBytes() { 182 java.lang.Object ref = clusterName_; 183 if (ref instanceof java.lang.String) { 184 com.google.protobuf.ByteString b = 185 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 186 clusterName_ = b; 187 return b; 188 } else { 189 return (com.google.protobuf.ByteString) ref; 190 } 191 } 192 193 public static final int CONFIG_FIELD_NUMBER = 3; 194 private com.google.cloud.dataproc.v1.ClusterConfig config_; 195 /** 196 * 197 * 198 * <pre> 199 * Optional. The cluster config for a cluster of Compute Engine Instances. 200 * Note that Dataproc may set default values, and values may change 201 * when clusters are updated. 202 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 203 * </pre> 204 * 205 * <code> 206 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 207 * </code> 208 * 209 * @return Whether the config field is set. 210 */ 211 @java.lang.Override hasConfig()212 public boolean hasConfig() { 213 return config_ != null; 214 } 215 /** 216 * 217 * 218 * <pre> 219 * Optional. The cluster config for a cluster of Compute Engine Instances. 220 * Note that Dataproc may set default values, and values may change 221 * when clusters are updated. 222 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 223 * </pre> 224 * 225 * <code> 226 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 227 * </code> 228 * 229 * @return The config. 230 */ 231 @java.lang.Override getConfig()232 public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { 233 return config_ == null 234 ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() 235 : config_; 236 } 237 /** 238 * 239 * 240 * <pre> 241 * Optional. The cluster config for a cluster of Compute Engine Instances. 242 * Note that Dataproc may set default values, and values may change 243 * when clusters are updated. 244 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 245 * </pre> 246 * 247 * <code> 248 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 249 * </code> 250 */ 251 @java.lang.Override getConfigOrBuilder()252 public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { 253 return config_ == null 254 ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() 255 : config_; 256 } 257 258 public static final int VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER = 10; 259 private com.google.cloud.dataproc.v1.VirtualClusterConfig virtualClusterConfig_; 260 /** 261 * 262 * 263 * <pre> 264 * Optional. The virtual cluster config is used when creating a Dataproc 265 * cluster that does not directly control the underlying compute resources, 266 * for example, when creating a [Dataproc-on-GKE 267 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 268 * Dataproc may set default values, and values may change when 269 * clusters are updated. Exactly one of 270 * [config][google.cloud.dataproc.v1.Cluster.config] or 271 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 272 * must be specified. 273 * </pre> 274 * 275 * <code> 276 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 277 * </code> 278 * 279 * @return Whether the virtualClusterConfig field is set. 280 */ 281 @java.lang.Override hasVirtualClusterConfig()282 public boolean hasVirtualClusterConfig() { 283 return virtualClusterConfig_ != null; 284 } 285 /** 286 * 287 * 288 * <pre> 289 * Optional. The virtual cluster config is used when creating a Dataproc 290 * cluster that does not directly control the underlying compute resources, 291 * for example, when creating a [Dataproc-on-GKE 292 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 293 * Dataproc may set default values, and values may change when 294 * clusters are updated. Exactly one of 295 * [config][google.cloud.dataproc.v1.Cluster.config] or 296 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 297 * must be specified. 298 * </pre> 299 * 300 * <code> 301 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 302 * </code> 303 * 304 * @return The virtualClusterConfig. 305 */ 306 @java.lang.Override getVirtualClusterConfig()307 public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig() { 308 return virtualClusterConfig_ == null 309 ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() 310 : virtualClusterConfig_; 311 } 312 /** 313 * 314 * 315 * <pre> 316 * Optional. The virtual cluster config is used when creating a Dataproc 317 * cluster that does not directly control the underlying compute resources, 318 * for example, when creating a [Dataproc-on-GKE 319 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 320 * Dataproc may set default values, and values may change when 321 * clusters are updated. Exactly one of 322 * [config][google.cloud.dataproc.v1.Cluster.config] or 323 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 324 * must be specified. 325 * </pre> 326 * 327 * <code> 328 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 329 * </code> 330 */ 331 @java.lang.Override 332 public com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder getVirtualClusterConfigOrBuilder()333 getVirtualClusterConfigOrBuilder() { 334 return virtualClusterConfig_ == null 335 ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() 336 : virtualClusterConfig_; 337 } 338 339 public static final int LABELS_FIELD_NUMBER = 8; 340 341 private static final class LabelsDefaultEntryHolder { 342 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 343 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 344 com.google.cloud.dataproc.v1.ClustersProto 345 .internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_descriptor, 346 com.google.protobuf.WireFormat.FieldType.STRING, 347 "", 348 com.google.protobuf.WireFormat.FieldType.STRING, 349 ""); 350 } 351 352 @SuppressWarnings("serial") 353 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 354 internalGetLabels()355 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 356 if (labels_ == null) { 357 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 358 } 359 return labels_; 360 } 361 getLabelsCount()362 public int getLabelsCount() { 363 return internalGetLabels().getMap().size(); 364 } 365 /** 366 * 367 * 368 * <pre> 369 * Optional. The labels to associate with this cluster. 370 * Label **keys** must contain 1 to 63 characters, and must conform to 371 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 372 * Label **values** may be empty, but, if present, must contain 1 to 63 373 * characters, and must conform to [RFC 374 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 375 * associated with a cluster. 376 * </pre> 377 * 378 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 379 */ 380 @java.lang.Override containsLabels(java.lang.String key)381 public boolean containsLabels(java.lang.String key) { 382 if (key == null) { 383 throw new NullPointerException("map key"); 384 } 385 return internalGetLabels().getMap().containsKey(key); 386 } 387 /** Use {@link #getLabelsMap()} instead. */ 388 @java.lang.Override 389 @java.lang.Deprecated getLabels()390 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 391 return getLabelsMap(); 392 } 393 /** 394 * 395 * 396 * <pre> 397 * Optional. The labels to associate with this cluster. 398 * Label **keys** must contain 1 to 63 characters, and must conform to 399 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 400 * Label **values** may be empty, but, if present, must contain 1 to 63 401 * characters, and must conform to [RFC 402 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 403 * associated with a cluster. 404 * </pre> 405 * 406 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 407 */ 408 @java.lang.Override getLabelsMap()409 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 410 return internalGetLabels().getMap(); 411 } 412 /** 413 * 414 * 415 * <pre> 416 * Optional. The labels to associate with this cluster. 417 * Label **keys** must contain 1 to 63 characters, and must conform to 418 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 419 * Label **values** may be empty, but, if present, must contain 1 to 63 420 * characters, and must conform to [RFC 421 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 422 * associated with a cluster. 423 * </pre> 424 * 425 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 426 */ 427 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)428 public /* nullable */ java.lang.String getLabelsOrDefault( 429 java.lang.String key, 430 /* nullable */ 431 java.lang.String defaultValue) { 432 if (key == null) { 433 throw new NullPointerException("map key"); 434 } 435 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 436 return map.containsKey(key) ? map.get(key) : defaultValue; 437 } 438 /** 439 * 440 * 441 * <pre> 442 * Optional. The labels to associate with this cluster. 443 * Label **keys** must contain 1 to 63 characters, and must conform to 444 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 445 * Label **values** may be empty, but, if present, must contain 1 to 63 446 * characters, and must conform to [RFC 447 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 448 * associated with a cluster. 449 * </pre> 450 * 451 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 452 */ 453 @java.lang.Override getLabelsOrThrow(java.lang.String key)454 public java.lang.String getLabelsOrThrow(java.lang.String key) { 455 if (key == null) { 456 throw new NullPointerException("map key"); 457 } 458 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 459 if (!map.containsKey(key)) { 460 throw new java.lang.IllegalArgumentException(); 461 } 462 return map.get(key); 463 } 464 465 public static final int STATUS_FIELD_NUMBER = 4; 466 private com.google.cloud.dataproc.v1.ClusterStatus status_; 467 /** 468 * 469 * 470 * <pre> 471 * Output only. Cluster status. 472 * </pre> 473 * 474 * <code> 475 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 476 * </code> 477 * 478 * @return Whether the status field is set. 479 */ 480 @java.lang.Override hasStatus()481 public boolean hasStatus() { 482 return status_ != null; 483 } 484 /** 485 * 486 * 487 * <pre> 488 * Output only. Cluster status. 489 * </pre> 490 * 491 * <code> 492 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 493 * </code> 494 * 495 * @return The status. 496 */ 497 @java.lang.Override getStatus()498 public com.google.cloud.dataproc.v1.ClusterStatus getStatus() { 499 return status_ == null 500 ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() 501 : status_; 502 } 503 /** 504 * 505 * 506 * <pre> 507 * Output only. Cluster status. 508 * </pre> 509 * 510 * <code> 511 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 512 * </code> 513 */ 514 @java.lang.Override getStatusOrBuilder()515 public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusOrBuilder() { 516 return status_ == null 517 ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() 518 : status_; 519 } 520 521 public static final int STATUS_HISTORY_FIELD_NUMBER = 7; 522 523 @SuppressWarnings("serial") 524 private java.util.List<com.google.cloud.dataproc.v1.ClusterStatus> statusHistory_; 525 /** 526 * 527 * 528 * <pre> 529 * Output only. The previous cluster status. 530 * </pre> 531 * 532 * <code> 533 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 534 * </code> 535 */ 536 @java.lang.Override getStatusHistoryList()537 public java.util.List<com.google.cloud.dataproc.v1.ClusterStatus> getStatusHistoryList() { 538 return statusHistory_; 539 } 540 /** 541 * 542 * 543 * <pre> 544 * Output only. The previous cluster status. 545 * </pre> 546 * 547 * <code> 548 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 549 * </code> 550 */ 551 @java.lang.Override 552 public java.util.List<? extends com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> getStatusHistoryOrBuilderList()553 getStatusHistoryOrBuilderList() { 554 return statusHistory_; 555 } 556 /** 557 * 558 * 559 * <pre> 560 * Output only. The previous cluster status. 561 * </pre> 562 * 563 * <code> 564 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 565 * </code> 566 */ 567 @java.lang.Override getStatusHistoryCount()568 public int getStatusHistoryCount() { 569 return statusHistory_.size(); 570 } 571 /** 572 * 573 * 574 * <pre> 575 * Output only. The previous cluster status. 576 * </pre> 577 * 578 * <code> 579 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 580 * </code> 581 */ 582 @java.lang.Override getStatusHistory(int index)583 public com.google.cloud.dataproc.v1.ClusterStatus getStatusHistory(int index) { 584 return statusHistory_.get(index); 585 } 586 /** 587 * 588 * 589 * <pre> 590 * Output only. The previous cluster status. 591 * </pre> 592 * 593 * <code> 594 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 595 * </code> 596 */ 597 @java.lang.Override getStatusHistoryOrBuilder(int index)598 public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusHistoryOrBuilder(int index) { 599 return statusHistory_.get(index); 600 } 601 602 public static final int CLUSTER_UUID_FIELD_NUMBER = 6; 603 604 @SuppressWarnings("serial") 605 private volatile java.lang.Object clusterUuid_ = ""; 606 /** 607 * 608 * 609 * <pre> 610 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 611 * generates this value when it creates the cluster. 612 * </pre> 613 * 614 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 615 * 616 * @return The clusterUuid. 617 */ 618 @java.lang.Override getClusterUuid()619 public java.lang.String getClusterUuid() { 620 java.lang.Object ref = clusterUuid_; 621 if (ref instanceof java.lang.String) { 622 return (java.lang.String) ref; 623 } else { 624 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 625 java.lang.String s = bs.toStringUtf8(); 626 clusterUuid_ = s; 627 return s; 628 } 629 } 630 /** 631 * 632 * 633 * <pre> 634 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 635 * generates this value when it creates the cluster. 636 * </pre> 637 * 638 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 639 * 640 * @return The bytes for clusterUuid. 641 */ 642 @java.lang.Override getClusterUuidBytes()643 public com.google.protobuf.ByteString getClusterUuidBytes() { 644 java.lang.Object ref = clusterUuid_; 645 if (ref instanceof java.lang.String) { 646 com.google.protobuf.ByteString b = 647 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 648 clusterUuid_ = b; 649 return b; 650 } else { 651 return (com.google.protobuf.ByteString) ref; 652 } 653 } 654 655 public static final int METRICS_FIELD_NUMBER = 9; 656 private com.google.cloud.dataproc.v1.ClusterMetrics metrics_; 657 /** 658 * 659 * 660 * <pre> 661 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 662 * **Beta Feature**: This report is available for testing purposes only. It 663 * may be changed before final release. 664 * </pre> 665 * 666 * <code> 667 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 668 * </code> 669 * 670 * @return Whether the metrics field is set. 671 */ 672 @java.lang.Override hasMetrics()673 public boolean hasMetrics() { 674 return metrics_ != null; 675 } 676 /** 677 * 678 * 679 * <pre> 680 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 681 * **Beta Feature**: This report is available for testing purposes only. It 682 * may be changed before final release. 683 * </pre> 684 * 685 * <code> 686 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 687 * </code> 688 * 689 * @return The metrics. 690 */ 691 @java.lang.Override getMetrics()692 public com.google.cloud.dataproc.v1.ClusterMetrics getMetrics() { 693 return metrics_ == null 694 ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() 695 : metrics_; 696 } 697 /** 698 * 699 * 700 * <pre> 701 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 702 * **Beta Feature**: This report is available for testing purposes only. It 703 * may be changed before final release. 704 * </pre> 705 * 706 * <code> 707 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 708 * </code> 709 */ 710 @java.lang.Override getMetricsOrBuilder()711 public com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder getMetricsOrBuilder() { 712 return metrics_ == null 713 ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() 714 : metrics_; 715 } 716 717 private byte memoizedIsInitialized = -1; 718 719 @java.lang.Override isInitialized()720 public final boolean isInitialized() { 721 byte isInitialized = memoizedIsInitialized; 722 if (isInitialized == 1) return true; 723 if (isInitialized == 0) return false; 724 725 memoizedIsInitialized = 1; 726 return true; 727 } 728 729 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)730 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 731 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { 732 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); 733 } 734 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { 735 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); 736 } 737 if (config_ != null) { 738 output.writeMessage(3, getConfig()); 739 } 740 if (status_ != null) { 741 output.writeMessage(4, getStatus()); 742 } 743 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { 744 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clusterUuid_); 745 } 746 for (int i = 0; i < statusHistory_.size(); i++) { 747 output.writeMessage(7, statusHistory_.get(i)); 748 } 749 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 750 output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); 751 if (metrics_ != null) { 752 output.writeMessage(9, getMetrics()); 753 } 754 if (virtualClusterConfig_ != null) { 755 output.writeMessage(10, getVirtualClusterConfig()); 756 } 757 getUnknownFields().writeTo(output); 758 } 759 760 @java.lang.Override getSerializedSize()761 public int getSerializedSize() { 762 int size = memoizedSize; 763 if (size != -1) return size; 764 765 size = 0; 766 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { 767 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); 768 } 769 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { 770 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); 771 } 772 if (config_ != null) { 773 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfig()); 774 } 775 if (status_ != null) { 776 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStatus()); 777 } 778 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { 779 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clusterUuid_); 780 } 781 for (int i = 0; i < statusHistory_.size(); i++) { 782 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, statusHistory_.get(i)); 783 } 784 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 785 internalGetLabels().getMap().entrySet()) { 786 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 787 LabelsDefaultEntryHolder.defaultEntry 788 .newBuilderForType() 789 .setKey(entry.getKey()) 790 .setValue(entry.getValue()) 791 .build(); 792 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); 793 } 794 if (metrics_ != null) { 795 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMetrics()); 796 } 797 if (virtualClusterConfig_ != null) { 798 size += 799 com.google.protobuf.CodedOutputStream.computeMessageSize(10, getVirtualClusterConfig()); 800 } 801 size += getUnknownFields().getSerializedSize(); 802 memoizedSize = size; 803 return size; 804 } 805 806 @java.lang.Override equals(final java.lang.Object obj)807 public boolean equals(final java.lang.Object obj) { 808 if (obj == this) { 809 return true; 810 } 811 if (!(obj instanceof com.google.cloud.dataproc.v1.Cluster)) { 812 return super.equals(obj); 813 } 814 com.google.cloud.dataproc.v1.Cluster other = (com.google.cloud.dataproc.v1.Cluster) obj; 815 816 if (!getProjectId().equals(other.getProjectId())) return false; 817 if (!getClusterName().equals(other.getClusterName())) return false; 818 if (hasConfig() != other.hasConfig()) return false; 819 if (hasConfig()) { 820 if (!getConfig().equals(other.getConfig())) return false; 821 } 822 if (hasVirtualClusterConfig() != other.hasVirtualClusterConfig()) return false; 823 if (hasVirtualClusterConfig()) { 824 if (!getVirtualClusterConfig().equals(other.getVirtualClusterConfig())) return false; 825 } 826 if (!internalGetLabels().equals(other.internalGetLabels())) return false; 827 if (hasStatus() != other.hasStatus()) return false; 828 if (hasStatus()) { 829 if (!getStatus().equals(other.getStatus())) return false; 830 } 831 if (!getStatusHistoryList().equals(other.getStatusHistoryList())) return false; 832 if (!getClusterUuid().equals(other.getClusterUuid())) return false; 833 if (hasMetrics() != other.hasMetrics()) return false; 834 if (hasMetrics()) { 835 if (!getMetrics().equals(other.getMetrics())) return false; 836 } 837 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 838 return true; 839 } 840 841 @java.lang.Override hashCode()842 public int hashCode() { 843 if (memoizedHashCode != 0) { 844 return memoizedHashCode; 845 } 846 int hash = 41; 847 hash = (19 * hash) + getDescriptor().hashCode(); 848 hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; 849 hash = (53 * hash) + getProjectId().hashCode(); 850 hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; 851 hash = (53 * hash) + getClusterName().hashCode(); 852 if (hasConfig()) { 853 hash = (37 * hash) + CONFIG_FIELD_NUMBER; 854 hash = (53 * hash) + getConfig().hashCode(); 855 } 856 if (hasVirtualClusterConfig()) { 857 hash = (37 * hash) + VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER; 858 hash = (53 * hash) + getVirtualClusterConfig().hashCode(); 859 } 860 if (!internalGetLabels().getMap().isEmpty()) { 861 hash = (37 * hash) + LABELS_FIELD_NUMBER; 862 hash = (53 * hash) + internalGetLabels().hashCode(); 863 } 864 if (hasStatus()) { 865 hash = (37 * hash) + STATUS_FIELD_NUMBER; 866 hash = (53 * hash) + getStatus().hashCode(); 867 } 868 if (getStatusHistoryCount() > 0) { 869 hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER; 870 hash = (53 * hash) + getStatusHistoryList().hashCode(); 871 } 872 hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; 873 hash = (53 * hash) + getClusterUuid().hashCode(); 874 if (hasMetrics()) { 875 hash = (37 * hash) + METRICS_FIELD_NUMBER; 876 hash = (53 * hash) + getMetrics().hashCode(); 877 } 878 hash = (29 * hash) + getUnknownFields().hashCode(); 879 memoizedHashCode = hash; 880 return hash; 881 } 882 parseFrom(java.nio.ByteBuffer data)883 public static com.google.cloud.dataproc.v1.Cluster parseFrom(java.nio.ByteBuffer data) 884 throws com.google.protobuf.InvalidProtocolBufferException { 885 return PARSER.parseFrom(data); 886 } 887 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)888 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 889 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 890 throws com.google.protobuf.InvalidProtocolBufferException { 891 return PARSER.parseFrom(data, extensionRegistry); 892 } 893 parseFrom(com.google.protobuf.ByteString data)894 public static com.google.cloud.dataproc.v1.Cluster parseFrom(com.google.protobuf.ByteString data) 895 throws com.google.protobuf.InvalidProtocolBufferException { 896 return PARSER.parseFrom(data); 897 } 898 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)899 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 900 com.google.protobuf.ByteString data, 901 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 902 throws com.google.protobuf.InvalidProtocolBufferException { 903 return PARSER.parseFrom(data, extensionRegistry); 904 } 905 parseFrom(byte[] data)906 public static com.google.cloud.dataproc.v1.Cluster parseFrom(byte[] data) 907 throws com.google.protobuf.InvalidProtocolBufferException { 908 return PARSER.parseFrom(data); 909 } 910 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)911 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 912 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 913 throws com.google.protobuf.InvalidProtocolBufferException { 914 return PARSER.parseFrom(data, extensionRegistry); 915 } 916 parseFrom(java.io.InputStream input)917 public static com.google.cloud.dataproc.v1.Cluster parseFrom(java.io.InputStream input) 918 throws java.io.IOException { 919 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 920 } 921 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)922 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 923 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 924 throws java.io.IOException { 925 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 926 PARSER, input, extensionRegistry); 927 } 928 parseDelimitedFrom(java.io.InputStream input)929 public static com.google.cloud.dataproc.v1.Cluster parseDelimitedFrom(java.io.InputStream input) 930 throws java.io.IOException { 931 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 932 } 933 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)934 public static com.google.cloud.dataproc.v1.Cluster parseDelimitedFrom( 935 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 936 throws java.io.IOException { 937 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 938 PARSER, input, extensionRegistry); 939 } 940 parseFrom( com.google.protobuf.CodedInputStream input)941 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 942 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 943 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 944 } 945 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)946 public static com.google.cloud.dataproc.v1.Cluster parseFrom( 947 com.google.protobuf.CodedInputStream input, 948 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 949 throws java.io.IOException { 950 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 951 PARSER, input, extensionRegistry); 952 } 953 954 @java.lang.Override newBuilderForType()955 public Builder newBuilderForType() { 956 return newBuilder(); 957 } 958 newBuilder()959 public static Builder newBuilder() { 960 return DEFAULT_INSTANCE.toBuilder(); 961 } 962 newBuilder(com.google.cloud.dataproc.v1.Cluster prototype)963 public static Builder newBuilder(com.google.cloud.dataproc.v1.Cluster prototype) { 964 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 965 } 966 967 @java.lang.Override toBuilder()968 public Builder toBuilder() { 969 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 970 } 971 972 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)973 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 974 Builder builder = new Builder(parent); 975 return builder; 976 } 977 /** 978 * 979 * 980 * <pre> 981 * Describes the identifying information, config, and status of 982 * a Dataproc cluster 983 * </pre> 984 * 985 * Protobuf type {@code google.cloud.dataproc.v1.Cluster} 986 */ 987 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 988 implements 989 // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Cluster) 990 com.google.cloud.dataproc.v1.ClusterOrBuilder { getDescriptor()991 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 992 return com.google.cloud.dataproc.v1.ClustersProto 993 .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; 994 } 995 996 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)997 protected com.google.protobuf.MapField internalGetMapField(int number) { 998 switch (number) { 999 case 8: 1000 return internalGetLabels(); 1001 default: 1002 throw new RuntimeException("Invalid map field number: " + number); 1003 } 1004 } 1005 1006 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1007 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1008 switch (number) { 1009 case 8: 1010 return internalGetMutableLabels(); 1011 default: 1012 throw new RuntimeException("Invalid map field number: " + number); 1013 } 1014 } 1015 1016 @java.lang.Override 1017 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1018 internalGetFieldAccessorTable() { 1019 return com.google.cloud.dataproc.v1.ClustersProto 1020 .internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable 1021 .ensureFieldAccessorsInitialized( 1022 com.google.cloud.dataproc.v1.Cluster.class, 1023 com.google.cloud.dataproc.v1.Cluster.Builder.class); 1024 } 1025 1026 // Construct using com.google.cloud.dataproc.v1.Cluster.newBuilder() Builder()1027 private Builder() {} 1028 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1029 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1030 super(parent); 1031 } 1032 1033 @java.lang.Override clear()1034 public Builder clear() { 1035 super.clear(); 1036 bitField0_ = 0; 1037 projectId_ = ""; 1038 clusterName_ = ""; 1039 config_ = null; 1040 if (configBuilder_ != null) { 1041 configBuilder_.dispose(); 1042 configBuilder_ = null; 1043 } 1044 virtualClusterConfig_ = null; 1045 if (virtualClusterConfigBuilder_ != null) { 1046 virtualClusterConfigBuilder_.dispose(); 1047 virtualClusterConfigBuilder_ = null; 1048 } 1049 internalGetMutableLabels().clear(); 1050 status_ = null; 1051 if (statusBuilder_ != null) { 1052 statusBuilder_.dispose(); 1053 statusBuilder_ = null; 1054 } 1055 if (statusHistoryBuilder_ == null) { 1056 statusHistory_ = java.util.Collections.emptyList(); 1057 } else { 1058 statusHistory_ = null; 1059 statusHistoryBuilder_.clear(); 1060 } 1061 bitField0_ = (bitField0_ & ~0x00000040); 1062 clusterUuid_ = ""; 1063 metrics_ = null; 1064 if (metricsBuilder_ != null) { 1065 metricsBuilder_.dispose(); 1066 metricsBuilder_ = null; 1067 } 1068 return this; 1069 } 1070 1071 @java.lang.Override getDescriptorForType()1072 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1073 return com.google.cloud.dataproc.v1.ClustersProto 1074 .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; 1075 } 1076 1077 @java.lang.Override getDefaultInstanceForType()1078 public com.google.cloud.dataproc.v1.Cluster getDefaultInstanceForType() { 1079 return com.google.cloud.dataproc.v1.Cluster.getDefaultInstance(); 1080 } 1081 1082 @java.lang.Override build()1083 public com.google.cloud.dataproc.v1.Cluster build() { 1084 com.google.cloud.dataproc.v1.Cluster result = buildPartial(); 1085 if (!result.isInitialized()) { 1086 throw newUninitializedMessageException(result); 1087 } 1088 return result; 1089 } 1090 1091 @java.lang.Override buildPartial()1092 public com.google.cloud.dataproc.v1.Cluster buildPartial() { 1093 com.google.cloud.dataproc.v1.Cluster result = new com.google.cloud.dataproc.v1.Cluster(this); 1094 buildPartialRepeatedFields(result); 1095 if (bitField0_ != 0) { 1096 buildPartial0(result); 1097 } 1098 onBuilt(); 1099 return result; 1100 } 1101 buildPartialRepeatedFields(com.google.cloud.dataproc.v1.Cluster result)1102 private void buildPartialRepeatedFields(com.google.cloud.dataproc.v1.Cluster result) { 1103 if (statusHistoryBuilder_ == null) { 1104 if (((bitField0_ & 0x00000040) != 0)) { 1105 statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); 1106 bitField0_ = (bitField0_ & ~0x00000040); 1107 } 1108 result.statusHistory_ = statusHistory_; 1109 } else { 1110 result.statusHistory_ = statusHistoryBuilder_.build(); 1111 } 1112 } 1113 buildPartial0(com.google.cloud.dataproc.v1.Cluster result)1114 private void buildPartial0(com.google.cloud.dataproc.v1.Cluster result) { 1115 int from_bitField0_ = bitField0_; 1116 if (((from_bitField0_ & 0x00000001) != 0)) { 1117 result.projectId_ = projectId_; 1118 } 1119 if (((from_bitField0_ & 0x00000002) != 0)) { 1120 result.clusterName_ = clusterName_; 1121 } 1122 if (((from_bitField0_ & 0x00000004) != 0)) { 1123 result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); 1124 } 1125 if (((from_bitField0_ & 0x00000008) != 0)) { 1126 result.virtualClusterConfig_ = 1127 virtualClusterConfigBuilder_ == null 1128 ? virtualClusterConfig_ 1129 : virtualClusterConfigBuilder_.build(); 1130 } 1131 if (((from_bitField0_ & 0x00000010) != 0)) { 1132 result.labels_ = internalGetLabels(); 1133 result.labels_.makeImmutable(); 1134 } 1135 if (((from_bitField0_ & 0x00000020) != 0)) { 1136 result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); 1137 } 1138 if (((from_bitField0_ & 0x00000080) != 0)) { 1139 result.clusterUuid_ = clusterUuid_; 1140 } 1141 if (((from_bitField0_ & 0x00000100) != 0)) { 1142 result.metrics_ = metricsBuilder_ == null ? metrics_ : metricsBuilder_.build(); 1143 } 1144 } 1145 1146 @java.lang.Override clone()1147 public Builder clone() { 1148 return super.clone(); 1149 } 1150 1151 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1152 public Builder setField( 1153 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1154 return super.setField(field, value); 1155 } 1156 1157 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1158 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1159 return super.clearField(field); 1160 } 1161 1162 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1163 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1164 return super.clearOneof(oneof); 1165 } 1166 1167 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1168 public Builder setRepeatedField( 1169 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1170 return super.setRepeatedField(field, index, value); 1171 } 1172 1173 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1174 public Builder addRepeatedField( 1175 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1176 return super.addRepeatedField(field, value); 1177 } 1178 1179 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1180 public Builder mergeFrom(com.google.protobuf.Message other) { 1181 if (other instanceof com.google.cloud.dataproc.v1.Cluster) { 1182 return mergeFrom((com.google.cloud.dataproc.v1.Cluster) other); 1183 } else { 1184 super.mergeFrom(other); 1185 return this; 1186 } 1187 } 1188 mergeFrom(com.google.cloud.dataproc.v1.Cluster other)1189 public Builder mergeFrom(com.google.cloud.dataproc.v1.Cluster other) { 1190 if (other == com.google.cloud.dataproc.v1.Cluster.getDefaultInstance()) return this; 1191 if (!other.getProjectId().isEmpty()) { 1192 projectId_ = other.projectId_; 1193 bitField0_ |= 0x00000001; 1194 onChanged(); 1195 } 1196 if (!other.getClusterName().isEmpty()) { 1197 clusterName_ = other.clusterName_; 1198 bitField0_ |= 0x00000002; 1199 onChanged(); 1200 } 1201 if (other.hasConfig()) { 1202 mergeConfig(other.getConfig()); 1203 } 1204 if (other.hasVirtualClusterConfig()) { 1205 mergeVirtualClusterConfig(other.getVirtualClusterConfig()); 1206 } 1207 internalGetMutableLabels().mergeFrom(other.internalGetLabels()); 1208 bitField0_ |= 0x00000010; 1209 if (other.hasStatus()) { 1210 mergeStatus(other.getStatus()); 1211 } 1212 if (statusHistoryBuilder_ == null) { 1213 if (!other.statusHistory_.isEmpty()) { 1214 if (statusHistory_.isEmpty()) { 1215 statusHistory_ = other.statusHistory_; 1216 bitField0_ = (bitField0_ & ~0x00000040); 1217 } else { 1218 ensureStatusHistoryIsMutable(); 1219 statusHistory_.addAll(other.statusHistory_); 1220 } 1221 onChanged(); 1222 } 1223 } else { 1224 if (!other.statusHistory_.isEmpty()) { 1225 if (statusHistoryBuilder_.isEmpty()) { 1226 statusHistoryBuilder_.dispose(); 1227 statusHistoryBuilder_ = null; 1228 statusHistory_ = other.statusHistory_; 1229 bitField0_ = (bitField0_ & ~0x00000040); 1230 statusHistoryBuilder_ = 1231 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1232 ? getStatusHistoryFieldBuilder() 1233 : null; 1234 } else { 1235 statusHistoryBuilder_.addAllMessages(other.statusHistory_); 1236 } 1237 } 1238 } 1239 if (!other.getClusterUuid().isEmpty()) { 1240 clusterUuid_ = other.clusterUuid_; 1241 bitField0_ |= 0x00000080; 1242 onChanged(); 1243 } 1244 if (other.hasMetrics()) { 1245 mergeMetrics(other.getMetrics()); 1246 } 1247 this.mergeUnknownFields(other.getUnknownFields()); 1248 onChanged(); 1249 return this; 1250 } 1251 1252 @java.lang.Override isInitialized()1253 public final boolean isInitialized() { 1254 return true; 1255 } 1256 1257 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1258 public Builder mergeFrom( 1259 com.google.protobuf.CodedInputStream input, 1260 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1261 throws java.io.IOException { 1262 if (extensionRegistry == null) { 1263 throw new java.lang.NullPointerException(); 1264 } 1265 try { 1266 boolean done = false; 1267 while (!done) { 1268 int tag = input.readTag(); 1269 switch (tag) { 1270 case 0: 1271 done = true; 1272 break; 1273 case 10: 1274 { 1275 projectId_ = input.readStringRequireUtf8(); 1276 bitField0_ |= 0x00000001; 1277 break; 1278 } // case 10 1279 case 18: 1280 { 1281 clusterName_ = input.readStringRequireUtf8(); 1282 bitField0_ |= 0x00000002; 1283 break; 1284 } // case 18 1285 case 26: 1286 { 1287 input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); 1288 bitField0_ |= 0x00000004; 1289 break; 1290 } // case 26 1291 case 34: 1292 { 1293 input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); 1294 bitField0_ |= 0x00000020; 1295 break; 1296 } // case 34 1297 case 50: 1298 { 1299 clusterUuid_ = input.readStringRequireUtf8(); 1300 bitField0_ |= 0x00000080; 1301 break; 1302 } // case 50 1303 case 58: 1304 { 1305 com.google.cloud.dataproc.v1.ClusterStatus m = 1306 input.readMessage( 1307 com.google.cloud.dataproc.v1.ClusterStatus.parser(), extensionRegistry); 1308 if (statusHistoryBuilder_ == null) { 1309 ensureStatusHistoryIsMutable(); 1310 statusHistory_.add(m); 1311 } else { 1312 statusHistoryBuilder_.addMessage(m); 1313 } 1314 break; 1315 } // case 58 1316 case 66: 1317 { 1318 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 1319 input.readMessage( 1320 LabelsDefaultEntryHolder.defaultEntry.getParserForType(), 1321 extensionRegistry); 1322 internalGetMutableLabels() 1323 .getMutableMap() 1324 .put(labels__.getKey(), labels__.getValue()); 1325 bitField0_ |= 0x00000010; 1326 break; 1327 } // case 66 1328 case 74: 1329 { 1330 input.readMessage(getMetricsFieldBuilder().getBuilder(), extensionRegistry); 1331 bitField0_ |= 0x00000100; 1332 break; 1333 } // case 74 1334 case 82: 1335 { 1336 input.readMessage( 1337 getVirtualClusterConfigFieldBuilder().getBuilder(), extensionRegistry); 1338 bitField0_ |= 0x00000008; 1339 break; 1340 } // case 82 1341 default: 1342 { 1343 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1344 done = true; // was an endgroup tag 1345 } 1346 break; 1347 } // default: 1348 } // switch (tag) 1349 } // while (!done) 1350 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1351 throw e.unwrapIOException(); 1352 } finally { 1353 onChanged(); 1354 } // finally 1355 return this; 1356 } 1357 1358 private int bitField0_; 1359 1360 private java.lang.Object projectId_ = ""; 1361 /** 1362 * 1363 * 1364 * <pre> 1365 * Required. The Google Cloud Platform project ID that the cluster belongs to. 1366 * </pre> 1367 * 1368 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1369 * 1370 * @return The projectId. 1371 */ getProjectId()1372 public java.lang.String getProjectId() { 1373 java.lang.Object ref = projectId_; 1374 if (!(ref instanceof java.lang.String)) { 1375 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1376 java.lang.String s = bs.toStringUtf8(); 1377 projectId_ = s; 1378 return s; 1379 } else { 1380 return (java.lang.String) ref; 1381 } 1382 } 1383 /** 1384 * 1385 * 1386 * <pre> 1387 * Required. The Google Cloud Platform project ID that the cluster belongs to. 1388 * </pre> 1389 * 1390 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1391 * 1392 * @return The bytes for projectId. 1393 */ getProjectIdBytes()1394 public com.google.protobuf.ByteString getProjectIdBytes() { 1395 java.lang.Object ref = projectId_; 1396 if (ref instanceof String) { 1397 com.google.protobuf.ByteString b = 1398 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1399 projectId_ = b; 1400 return b; 1401 } else { 1402 return (com.google.protobuf.ByteString) ref; 1403 } 1404 } 1405 /** 1406 * 1407 * 1408 * <pre> 1409 * Required. The Google Cloud Platform project ID that the cluster belongs to. 1410 * </pre> 1411 * 1412 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1413 * 1414 * @param value The projectId to set. 1415 * @return This builder for chaining. 1416 */ setProjectId(java.lang.String value)1417 public Builder setProjectId(java.lang.String value) { 1418 if (value == null) { 1419 throw new NullPointerException(); 1420 } 1421 projectId_ = value; 1422 bitField0_ |= 0x00000001; 1423 onChanged(); 1424 return this; 1425 } 1426 /** 1427 * 1428 * 1429 * <pre> 1430 * Required. The Google Cloud Platform project ID that the cluster belongs to. 1431 * </pre> 1432 * 1433 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1434 * 1435 * @return This builder for chaining. 1436 */ clearProjectId()1437 public Builder clearProjectId() { 1438 projectId_ = getDefaultInstance().getProjectId(); 1439 bitField0_ = (bitField0_ & ~0x00000001); 1440 onChanged(); 1441 return this; 1442 } 1443 /** 1444 * 1445 * 1446 * <pre> 1447 * Required. The Google Cloud Platform project ID that the cluster belongs to. 1448 * </pre> 1449 * 1450 * <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1451 * 1452 * @param value The bytes for projectId to set. 1453 * @return This builder for chaining. 1454 */ setProjectIdBytes(com.google.protobuf.ByteString value)1455 public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { 1456 if (value == null) { 1457 throw new NullPointerException(); 1458 } 1459 checkByteStringIsUtf8(value); 1460 projectId_ = value; 1461 bitField0_ |= 0x00000001; 1462 onChanged(); 1463 return this; 1464 } 1465 1466 private java.lang.Object clusterName_ = ""; 1467 /** 1468 * 1469 * 1470 * <pre> 1471 * Required. The cluster name, which must be unique within a project. 1472 * The name must start with a lowercase letter, and can contain 1473 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 1474 * with a hyphen. The name of a deleted cluster can be reused. 1475 * </pre> 1476 * 1477 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1478 * 1479 * @return The clusterName. 1480 */ getClusterName()1481 public java.lang.String getClusterName() { 1482 java.lang.Object ref = clusterName_; 1483 if (!(ref instanceof java.lang.String)) { 1484 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1485 java.lang.String s = bs.toStringUtf8(); 1486 clusterName_ = s; 1487 return s; 1488 } else { 1489 return (java.lang.String) ref; 1490 } 1491 } 1492 /** 1493 * 1494 * 1495 * <pre> 1496 * Required. The cluster name, which must be unique within a project. 1497 * The name must start with a lowercase letter, and can contain 1498 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 1499 * with a hyphen. The name of a deleted cluster can be reused. 1500 * </pre> 1501 * 1502 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1503 * 1504 * @return The bytes for clusterName. 1505 */ getClusterNameBytes()1506 public com.google.protobuf.ByteString getClusterNameBytes() { 1507 java.lang.Object ref = clusterName_; 1508 if (ref instanceof String) { 1509 com.google.protobuf.ByteString b = 1510 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1511 clusterName_ = b; 1512 return b; 1513 } else { 1514 return (com.google.protobuf.ByteString) ref; 1515 } 1516 } 1517 /** 1518 * 1519 * 1520 * <pre> 1521 * Required. The cluster name, which must be unique within a project. 1522 * The name must start with a lowercase letter, and can contain 1523 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 1524 * with a hyphen. The name of a deleted cluster can be reused. 1525 * </pre> 1526 * 1527 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1528 * 1529 * @param value The clusterName to set. 1530 * @return This builder for chaining. 1531 */ setClusterName(java.lang.String value)1532 public Builder setClusterName(java.lang.String value) { 1533 if (value == null) { 1534 throw new NullPointerException(); 1535 } 1536 clusterName_ = value; 1537 bitField0_ |= 0x00000002; 1538 onChanged(); 1539 return this; 1540 } 1541 /** 1542 * 1543 * 1544 * <pre> 1545 * Required. The cluster name, which must be unique within a project. 1546 * The name must start with a lowercase letter, and can contain 1547 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 1548 * with a hyphen. The name of a deleted cluster can be reused. 1549 * </pre> 1550 * 1551 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1552 * 1553 * @return This builder for chaining. 1554 */ clearClusterName()1555 public Builder clearClusterName() { 1556 clusterName_ = getDefaultInstance().getClusterName(); 1557 bitField0_ = (bitField0_ & ~0x00000002); 1558 onChanged(); 1559 return this; 1560 } 1561 /** 1562 * 1563 * 1564 * <pre> 1565 * Required. The cluster name, which must be unique within a project. 1566 * The name must start with a lowercase letter, and can contain 1567 * up to 51 lowercase letters, numbers, and hyphens. It cannot end 1568 * with a hyphen. The name of a deleted cluster can be reused. 1569 * </pre> 1570 * 1571 * <code>string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1572 * 1573 * @param value The bytes for clusterName to set. 1574 * @return This builder for chaining. 1575 */ setClusterNameBytes(com.google.protobuf.ByteString value)1576 public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { 1577 if (value == null) { 1578 throw new NullPointerException(); 1579 } 1580 checkByteStringIsUtf8(value); 1581 clusterName_ = value; 1582 bitField0_ |= 0x00000002; 1583 onChanged(); 1584 return this; 1585 } 1586 1587 private com.google.cloud.dataproc.v1.ClusterConfig config_; 1588 private com.google.protobuf.SingleFieldBuilderV3< 1589 com.google.cloud.dataproc.v1.ClusterConfig, 1590 com.google.cloud.dataproc.v1.ClusterConfig.Builder, 1591 com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> 1592 configBuilder_; 1593 /** 1594 * 1595 * 1596 * <pre> 1597 * Optional. The cluster config for a cluster of Compute Engine Instances. 1598 * Note that Dataproc may set default values, and values may change 1599 * when clusters are updated. 1600 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1601 * </pre> 1602 * 1603 * <code> 1604 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1605 * </code> 1606 * 1607 * @return Whether the config field is set. 1608 */ hasConfig()1609 public boolean hasConfig() { 1610 return ((bitField0_ & 0x00000004) != 0); 1611 } 1612 /** 1613 * 1614 * 1615 * <pre> 1616 * Optional. The cluster config for a cluster of Compute Engine Instances. 1617 * Note that Dataproc may set default values, and values may change 1618 * when clusters are updated. 1619 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1620 * </pre> 1621 * 1622 * <code> 1623 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1624 * </code> 1625 * 1626 * @return The config. 1627 */ getConfig()1628 public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { 1629 if (configBuilder_ == null) { 1630 return config_ == null 1631 ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() 1632 : config_; 1633 } else { 1634 return configBuilder_.getMessage(); 1635 } 1636 } 1637 /** 1638 * 1639 * 1640 * <pre> 1641 * Optional. The cluster config for a cluster of Compute Engine Instances. 1642 * Note that Dataproc may set default values, and values may change 1643 * when clusters are updated. 1644 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1645 * </pre> 1646 * 1647 * <code> 1648 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1649 * </code> 1650 */ setConfig(com.google.cloud.dataproc.v1.ClusterConfig value)1651 public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { 1652 if (configBuilder_ == null) { 1653 if (value == null) { 1654 throw new NullPointerException(); 1655 } 1656 config_ = value; 1657 } else { 1658 configBuilder_.setMessage(value); 1659 } 1660 bitField0_ |= 0x00000004; 1661 onChanged(); 1662 return this; 1663 } 1664 /** 1665 * 1666 * 1667 * <pre> 1668 * Optional. The cluster config for a cluster of Compute Engine Instances. 1669 * Note that Dataproc may set default values, and values may change 1670 * when clusters are updated. 1671 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1672 * </pre> 1673 * 1674 * <code> 1675 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1676 * </code> 1677 */ setConfig(com.google.cloud.dataproc.v1.ClusterConfig.Builder builderForValue)1678 public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig.Builder builderForValue) { 1679 if (configBuilder_ == null) { 1680 config_ = builderForValue.build(); 1681 } else { 1682 configBuilder_.setMessage(builderForValue.build()); 1683 } 1684 bitField0_ |= 0x00000004; 1685 onChanged(); 1686 return this; 1687 } 1688 /** 1689 * 1690 * 1691 * <pre> 1692 * Optional. The cluster config for a cluster of Compute Engine Instances. 1693 * Note that Dataproc may set default values, and values may change 1694 * when clusters are updated. 1695 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1696 * </pre> 1697 * 1698 * <code> 1699 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1700 * </code> 1701 */ mergeConfig(com.google.cloud.dataproc.v1.ClusterConfig value)1702 public Builder mergeConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { 1703 if (configBuilder_ == null) { 1704 if (((bitField0_ & 0x00000004) != 0) 1705 && config_ != null 1706 && config_ != com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance()) { 1707 getConfigBuilder().mergeFrom(value); 1708 } else { 1709 config_ = value; 1710 } 1711 } else { 1712 configBuilder_.mergeFrom(value); 1713 } 1714 bitField0_ |= 0x00000004; 1715 onChanged(); 1716 return this; 1717 } 1718 /** 1719 * 1720 * 1721 * <pre> 1722 * Optional. The cluster config for a cluster of Compute Engine Instances. 1723 * Note that Dataproc may set default values, and values may change 1724 * when clusters are updated. 1725 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1726 * </pre> 1727 * 1728 * <code> 1729 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1730 * </code> 1731 */ clearConfig()1732 public Builder clearConfig() { 1733 bitField0_ = (bitField0_ & ~0x00000004); 1734 config_ = null; 1735 if (configBuilder_ != null) { 1736 configBuilder_.dispose(); 1737 configBuilder_ = null; 1738 } 1739 onChanged(); 1740 return this; 1741 } 1742 /** 1743 * 1744 * 1745 * <pre> 1746 * Optional. The cluster config for a cluster of Compute Engine Instances. 1747 * Note that Dataproc may set default values, and values may change 1748 * when clusters are updated. 1749 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1750 * </pre> 1751 * 1752 * <code> 1753 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1754 * </code> 1755 */ getConfigBuilder()1756 public com.google.cloud.dataproc.v1.ClusterConfig.Builder getConfigBuilder() { 1757 bitField0_ |= 0x00000004; 1758 onChanged(); 1759 return getConfigFieldBuilder().getBuilder(); 1760 } 1761 /** 1762 * 1763 * 1764 * <pre> 1765 * Optional. The cluster config for a cluster of Compute Engine Instances. 1766 * Note that Dataproc may set default values, and values may change 1767 * when clusters are updated. 1768 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1769 * </pre> 1770 * 1771 * <code> 1772 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1773 * </code> 1774 */ getConfigOrBuilder()1775 public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { 1776 if (configBuilder_ != null) { 1777 return configBuilder_.getMessageOrBuilder(); 1778 } else { 1779 return config_ == null 1780 ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() 1781 : config_; 1782 } 1783 } 1784 /** 1785 * 1786 * 1787 * <pre> 1788 * Optional. The cluster config for a cluster of Compute Engine Instances. 1789 * Note that Dataproc may set default values, and values may change 1790 * when clusters are updated. 1791 * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. 1792 * </pre> 1793 * 1794 * <code> 1795 * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; 1796 * </code> 1797 */ 1798 private com.google.protobuf.SingleFieldBuilderV3< 1799 com.google.cloud.dataproc.v1.ClusterConfig, 1800 com.google.cloud.dataproc.v1.ClusterConfig.Builder, 1801 com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> getConfigFieldBuilder()1802 getConfigFieldBuilder() { 1803 if (configBuilder_ == null) { 1804 configBuilder_ = 1805 new com.google.protobuf.SingleFieldBuilderV3< 1806 com.google.cloud.dataproc.v1.ClusterConfig, 1807 com.google.cloud.dataproc.v1.ClusterConfig.Builder, 1808 com.google.cloud.dataproc.v1.ClusterConfigOrBuilder>( 1809 getConfig(), getParentForChildren(), isClean()); 1810 config_ = null; 1811 } 1812 return configBuilder_; 1813 } 1814 1815 private com.google.cloud.dataproc.v1.VirtualClusterConfig virtualClusterConfig_; 1816 private com.google.protobuf.SingleFieldBuilderV3< 1817 com.google.cloud.dataproc.v1.VirtualClusterConfig, 1818 com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, 1819 com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder> 1820 virtualClusterConfigBuilder_; 1821 /** 1822 * 1823 * 1824 * <pre> 1825 * Optional. The virtual cluster config is used when creating a Dataproc 1826 * cluster that does not directly control the underlying compute resources, 1827 * for example, when creating a [Dataproc-on-GKE 1828 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1829 * Dataproc may set default values, and values may change when 1830 * clusters are updated. Exactly one of 1831 * [config][google.cloud.dataproc.v1.Cluster.config] or 1832 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1833 * must be specified. 1834 * </pre> 1835 * 1836 * <code> 1837 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1838 * </code> 1839 * 1840 * @return Whether the virtualClusterConfig field is set. 1841 */ hasVirtualClusterConfig()1842 public boolean hasVirtualClusterConfig() { 1843 return ((bitField0_ & 0x00000008) != 0); 1844 } 1845 /** 1846 * 1847 * 1848 * <pre> 1849 * Optional. The virtual cluster config is used when creating a Dataproc 1850 * cluster that does not directly control the underlying compute resources, 1851 * for example, when creating a [Dataproc-on-GKE 1852 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1853 * Dataproc may set default values, and values may change when 1854 * clusters are updated. Exactly one of 1855 * [config][google.cloud.dataproc.v1.Cluster.config] or 1856 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1857 * must be specified. 1858 * </pre> 1859 * 1860 * <code> 1861 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1862 * </code> 1863 * 1864 * @return The virtualClusterConfig. 1865 */ getVirtualClusterConfig()1866 public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig() { 1867 if (virtualClusterConfigBuilder_ == null) { 1868 return virtualClusterConfig_ == null 1869 ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() 1870 : virtualClusterConfig_; 1871 } else { 1872 return virtualClusterConfigBuilder_.getMessage(); 1873 } 1874 } 1875 /** 1876 * 1877 * 1878 * <pre> 1879 * Optional. The virtual cluster config is used when creating a Dataproc 1880 * cluster that does not directly control the underlying compute resources, 1881 * for example, when creating a [Dataproc-on-GKE 1882 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1883 * Dataproc may set default values, and values may change when 1884 * clusters are updated. Exactly one of 1885 * [config][google.cloud.dataproc.v1.Cluster.config] or 1886 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1887 * must be specified. 1888 * </pre> 1889 * 1890 * <code> 1891 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1892 * </code> 1893 */ setVirtualClusterConfig( com.google.cloud.dataproc.v1.VirtualClusterConfig value)1894 public Builder setVirtualClusterConfig( 1895 com.google.cloud.dataproc.v1.VirtualClusterConfig value) { 1896 if (virtualClusterConfigBuilder_ == null) { 1897 if (value == null) { 1898 throw new NullPointerException(); 1899 } 1900 virtualClusterConfig_ = value; 1901 } else { 1902 virtualClusterConfigBuilder_.setMessage(value); 1903 } 1904 bitField0_ |= 0x00000008; 1905 onChanged(); 1906 return this; 1907 } 1908 /** 1909 * 1910 * 1911 * <pre> 1912 * Optional. The virtual cluster config is used when creating a Dataproc 1913 * cluster that does not directly control the underlying compute resources, 1914 * for example, when creating a [Dataproc-on-GKE 1915 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1916 * Dataproc may set default values, and values may change when 1917 * clusters are updated. Exactly one of 1918 * [config][google.cloud.dataproc.v1.Cluster.config] or 1919 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1920 * must be specified. 1921 * </pre> 1922 * 1923 * <code> 1924 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1925 * </code> 1926 */ setVirtualClusterConfig( com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder builderForValue)1927 public Builder setVirtualClusterConfig( 1928 com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder builderForValue) { 1929 if (virtualClusterConfigBuilder_ == null) { 1930 virtualClusterConfig_ = builderForValue.build(); 1931 } else { 1932 virtualClusterConfigBuilder_.setMessage(builderForValue.build()); 1933 } 1934 bitField0_ |= 0x00000008; 1935 onChanged(); 1936 return this; 1937 } 1938 /** 1939 * 1940 * 1941 * <pre> 1942 * Optional. The virtual cluster config is used when creating a Dataproc 1943 * cluster that does not directly control the underlying compute resources, 1944 * for example, when creating a [Dataproc-on-GKE 1945 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1946 * Dataproc may set default values, and values may change when 1947 * clusters are updated. Exactly one of 1948 * [config][google.cloud.dataproc.v1.Cluster.config] or 1949 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1950 * must be specified. 1951 * </pre> 1952 * 1953 * <code> 1954 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1955 * </code> 1956 */ mergeVirtualClusterConfig( com.google.cloud.dataproc.v1.VirtualClusterConfig value)1957 public Builder mergeVirtualClusterConfig( 1958 com.google.cloud.dataproc.v1.VirtualClusterConfig value) { 1959 if (virtualClusterConfigBuilder_ == null) { 1960 if (((bitField0_ & 0x00000008) != 0) 1961 && virtualClusterConfig_ != null 1962 && virtualClusterConfig_ 1963 != com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance()) { 1964 getVirtualClusterConfigBuilder().mergeFrom(value); 1965 } else { 1966 virtualClusterConfig_ = value; 1967 } 1968 } else { 1969 virtualClusterConfigBuilder_.mergeFrom(value); 1970 } 1971 bitField0_ |= 0x00000008; 1972 onChanged(); 1973 return this; 1974 } 1975 /** 1976 * 1977 * 1978 * <pre> 1979 * Optional. The virtual cluster config is used when creating a Dataproc 1980 * cluster that does not directly control the underlying compute resources, 1981 * for example, when creating a [Dataproc-on-GKE 1982 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 1983 * Dataproc may set default values, and values may change when 1984 * clusters are updated. Exactly one of 1985 * [config][google.cloud.dataproc.v1.Cluster.config] or 1986 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 1987 * must be specified. 1988 * </pre> 1989 * 1990 * <code> 1991 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 1992 * </code> 1993 */ clearVirtualClusterConfig()1994 public Builder clearVirtualClusterConfig() { 1995 bitField0_ = (bitField0_ & ~0x00000008); 1996 virtualClusterConfig_ = null; 1997 if (virtualClusterConfigBuilder_ != null) { 1998 virtualClusterConfigBuilder_.dispose(); 1999 virtualClusterConfigBuilder_ = null; 2000 } 2001 onChanged(); 2002 return this; 2003 } 2004 /** 2005 * 2006 * 2007 * <pre> 2008 * Optional. The virtual cluster config is used when creating a Dataproc 2009 * cluster that does not directly control the underlying compute resources, 2010 * for example, when creating a [Dataproc-on-GKE 2011 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 2012 * Dataproc may set default values, and values may change when 2013 * clusters are updated. Exactly one of 2014 * [config][google.cloud.dataproc.v1.Cluster.config] or 2015 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 2016 * must be specified. 2017 * </pre> 2018 * 2019 * <code> 2020 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 2021 * </code> 2022 */ 2023 public com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder getVirtualClusterConfigBuilder()2024 getVirtualClusterConfigBuilder() { 2025 bitField0_ |= 0x00000008; 2026 onChanged(); 2027 return getVirtualClusterConfigFieldBuilder().getBuilder(); 2028 } 2029 /** 2030 * 2031 * 2032 * <pre> 2033 * Optional. The virtual cluster config is used when creating a Dataproc 2034 * cluster that does not directly control the underlying compute resources, 2035 * for example, when creating a [Dataproc-on-GKE 2036 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 2037 * Dataproc may set default values, and values may change when 2038 * clusters are updated. Exactly one of 2039 * [config][google.cloud.dataproc.v1.Cluster.config] or 2040 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 2041 * must be specified. 2042 * </pre> 2043 * 2044 * <code> 2045 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 2046 * </code> 2047 */ 2048 public com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder getVirtualClusterConfigOrBuilder()2049 getVirtualClusterConfigOrBuilder() { 2050 if (virtualClusterConfigBuilder_ != null) { 2051 return virtualClusterConfigBuilder_.getMessageOrBuilder(); 2052 } else { 2053 return virtualClusterConfig_ == null 2054 ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() 2055 : virtualClusterConfig_; 2056 } 2057 } 2058 /** 2059 * 2060 * 2061 * <pre> 2062 * Optional. The virtual cluster config is used when creating a Dataproc 2063 * cluster that does not directly control the underlying compute resources, 2064 * for example, when creating a [Dataproc-on-GKE 2065 * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). 2066 * Dataproc may set default values, and values may change when 2067 * clusters are updated. Exactly one of 2068 * [config][google.cloud.dataproc.v1.Cluster.config] or 2069 * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] 2070 * must be specified. 2071 * </pre> 2072 * 2073 * <code> 2074 * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; 2075 * </code> 2076 */ 2077 private com.google.protobuf.SingleFieldBuilderV3< 2078 com.google.cloud.dataproc.v1.VirtualClusterConfig, 2079 com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, 2080 com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder> getVirtualClusterConfigFieldBuilder()2081 getVirtualClusterConfigFieldBuilder() { 2082 if (virtualClusterConfigBuilder_ == null) { 2083 virtualClusterConfigBuilder_ = 2084 new com.google.protobuf.SingleFieldBuilderV3< 2085 com.google.cloud.dataproc.v1.VirtualClusterConfig, 2086 com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, 2087 com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder>( 2088 getVirtualClusterConfig(), getParentForChildren(), isClean()); 2089 virtualClusterConfig_ = null; 2090 } 2091 return virtualClusterConfigBuilder_; 2092 } 2093 2094 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 2095 internalGetLabels()2096 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 2097 if (labels_ == null) { 2098 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 2099 } 2100 return labels_; 2101 } 2102 2103 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels()2104 internalGetMutableLabels() { 2105 if (labels_ == null) { 2106 labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); 2107 } 2108 if (!labels_.isMutable()) { 2109 labels_ = labels_.copy(); 2110 } 2111 bitField0_ |= 0x00000010; 2112 onChanged(); 2113 return labels_; 2114 } 2115 getLabelsCount()2116 public int getLabelsCount() { 2117 return internalGetLabels().getMap().size(); 2118 } 2119 /** 2120 * 2121 * 2122 * <pre> 2123 * Optional. The labels to associate with this cluster. 2124 * Label **keys** must contain 1 to 63 characters, and must conform to 2125 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2126 * Label **values** may be empty, but, if present, must contain 1 to 63 2127 * characters, and must conform to [RFC 2128 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2129 * associated with a cluster. 2130 * </pre> 2131 * 2132 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2133 */ 2134 @java.lang.Override containsLabels(java.lang.String key)2135 public boolean containsLabels(java.lang.String key) { 2136 if (key == null) { 2137 throw new NullPointerException("map key"); 2138 } 2139 return internalGetLabels().getMap().containsKey(key); 2140 } 2141 /** Use {@link #getLabelsMap()} instead. */ 2142 @java.lang.Override 2143 @java.lang.Deprecated getLabels()2144 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 2145 return getLabelsMap(); 2146 } 2147 /** 2148 * 2149 * 2150 * <pre> 2151 * Optional. The labels to associate with this cluster. 2152 * Label **keys** must contain 1 to 63 characters, and must conform to 2153 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2154 * Label **values** may be empty, but, if present, must contain 1 to 63 2155 * characters, and must conform to [RFC 2156 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2157 * associated with a cluster. 2158 * </pre> 2159 * 2160 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2161 */ 2162 @java.lang.Override getLabelsMap()2163 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 2164 return internalGetLabels().getMap(); 2165 } 2166 /** 2167 * 2168 * 2169 * <pre> 2170 * Optional. The labels to associate with this cluster. 2171 * Label **keys** must contain 1 to 63 characters, and must conform to 2172 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2173 * Label **values** may be empty, but, if present, must contain 1 to 63 2174 * characters, and must conform to [RFC 2175 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2176 * associated with a cluster. 2177 * </pre> 2178 * 2179 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2180 */ 2181 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2182 public /* nullable */ java.lang.String getLabelsOrDefault( 2183 java.lang.String key, 2184 /* nullable */ 2185 java.lang.String defaultValue) { 2186 if (key == null) { 2187 throw new NullPointerException("map key"); 2188 } 2189 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2190 return map.containsKey(key) ? map.get(key) : defaultValue; 2191 } 2192 /** 2193 * 2194 * 2195 * <pre> 2196 * Optional. The labels to associate with this cluster. 2197 * Label **keys** must contain 1 to 63 characters, and must conform to 2198 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2199 * Label **values** may be empty, but, if present, must contain 1 to 63 2200 * characters, and must conform to [RFC 2201 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2202 * associated with a cluster. 2203 * </pre> 2204 * 2205 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2206 */ 2207 @java.lang.Override getLabelsOrThrow(java.lang.String key)2208 public java.lang.String getLabelsOrThrow(java.lang.String key) { 2209 if (key == null) { 2210 throw new NullPointerException("map key"); 2211 } 2212 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2213 if (!map.containsKey(key)) { 2214 throw new java.lang.IllegalArgumentException(); 2215 } 2216 return map.get(key); 2217 } 2218 clearLabels()2219 public Builder clearLabels() { 2220 bitField0_ = (bitField0_ & ~0x00000010); 2221 internalGetMutableLabels().getMutableMap().clear(); 2222 return this; 2223 } 2224 /** 2225 * 2226 * 2227 * <pre> 2228 * Optional. The labels to associate with this cluster. 2229 * Label **keys** must contain 1 to 63 characters, and must conform to 2230 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2231 * Label **values** may be empty, but, if present, must contain 1 to 63 2232 * characters, and must conform to [RFC 2233 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2234 * associated with a cluster. 2235 * </pre> 2236 * 2237 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2238 */ removeLabels(java.lang.String key)2239 public Builder removeLabels(java.lang.String key) { 2240 if (key == null) { 2241 throw new NullPointerException("map key"); 2242 } 2243 internalGetMutableLabels().getMutableMap().remove(key); 2244 return this; 2245 } 2246 /** Use alternate mutation accessors instead. */ 2247 @java.lang.Deprecated getMutableLabels()2248 public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { 2249 bitField0_ |= 0x00000010; 2250 return internalGetMutableLabels().getMutableMap(); 2251 } 2252 /** 2253 * 2254 * 2255 * <pre> 2256 * Optional. The labels to associate with this cluster. 2257 * Label **keys** must contain 1 to 63 characters, and must conform to 2258 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2259 * Label **values** may be empty, but, if present, must contain 1 to 63 2260 * characters, and must conform to [RFC 2261 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2262 * associated with a cluster. 2263 * </pre> 2264 * 2265 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2266 */ putLabels(java.lang.String key, java.lang.String value)2267 public Builder putLabels(java.lang.String key, java.lang.String value) { 2268 if (key == null) { 2269 throw new NullPointerException("map key"); 2270 } 2271 if (value == null) { 2272 throw new NullPointerException("map value"); 2273 } 2274 internalGetMutableLabels().getMutableMap().put(key, value); 2275 bitField0_ |= 0x00000010; 2276 return this; 2277 } 2278 /** 2279 * 2280 * 2281 * <pre> 2282 * Optional. The labels to associate with this cluster. 2283 * Label **keys** must contain 1 to 63 characters, and must conform to 2284 * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). 2285 * Label **values** may be empty, but, if present, must contain 1 to 63 2286 * characters, and must conform to [RFC 2287 * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be 2288 * associated with a cluster. 2289 * </pre> 2290 * 2291 * <code>map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2292 */ putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2293 public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) { 2294 internalGetMutableLabels().getMutableMap().putAll(values); 2295 bitField0_ |= 0x00000010; 2296 return this; 2297 } 2298 2299 private com.google.cloud.dataproc.v1.ClusterStatus status_; 2300 private com.google.protobuf.SingleFieldBuilderV3< 2301 com.google.cloud.dataproc.v1.ClusterStatus, 2302 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2303 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> 2304 statusBuilder_; 2305 /** 2306 * 2307 * 2308 * <pre> 2309 * Output only. Cluster status. 2310 * </pre> 2311 * 2312 * <code> 2313 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2314 * </code> 2315 * 2316 * @return Whether the status field is set. 2317 */ hasStatus()2318 public boolean hasStatus() { 2319 return ((bitField0_ & 0x00000020) != 0); 2320 } 2321 /** 2322 * 2323 * 2324 * <pre> 2325 * Output only. Cluster status. 2326 * </pre> 2327 * 2328 * <code> 2329 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2330 * </code> 2331 * 2332 * @return The status. 2333 */ getStatus()2334 public com.google.cloud.dataproc.v1.ClusterStatus getStatus() { 2335 if (statusBuilder_ == null) { 2336 return status_ == null 2337 ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() 2338 : status_; 2339 } else { 2340 return statusBuilder_.getMessage(); 2341 } 2342 } 2343 /** 2344 * 2345 * 2346 * <pre> 2347 * Output only. Cluster status. 2348 * </pre> 2349 * 2350 * <code> 2351 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2352 * </code> 2353 */ setStatus(com.google.cloud.dataproc.v1.ClusterStatus value)2354 public Builder setStatus(com.google.cloud.dataproc.v1.ClusterStatus value) { 2355 if (statusBuilder_ == null) { 2356 if (value == null) { 2357 throw new NullPointerException(); 2358 } 2359 status_ = value; 2360 } else { 2361 statusBuilder_.setMessage(value); 2362 } 2363 bitField0_ |= 0x00000020; 2364 onChanged(); 2365 return this; 2366 } 2367 /** 2368 * 2369 * 2370 * <pre> 2371 * Output only. Cluster status. 2372 * </pre> 2373 * 2374 * <code> 2375 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2376 * </code> 2377 */ setStatus(com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue)2378 public Builder setStatus(com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { 2379 if (statusBuilder_ == null) { 2380 status_ = builderForValue.build(); 2381 } else { 2382 statusBuilder_.setMessage(builderForValue.build()); 2383 } 2384 bitField0_ |= 0x00000020; 2385 onChanged(); 2386 return this; 2387 } 2388 /** 2389 * 2390 * 2391 * <pre> 2392 * Output only. Cluster status. 2393 * </pre> 2394 * 2395 * <code> 2396 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2397 * </code> 2398 */ mergeStatus(com.google.cloud.dataproc.v1.ClusterStatus value)2399 public Builder mergeStatus(com.google.cloud.dataproc.v1.ClusterStatus value) { 2400 if (statusBuilder_ == null) { 2401 if (((bitField0_ & 0x00000020) != 0) 2402 && status_ != null 2403 && status_ != com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()) { 2404 getStatusBuilder().mergeFrom(value); 2405 } else { 2406 status_ = value; 2407 } 2408 } else { 2409 statusBuilder_.mergeFrom(value); 2410 } 2411 bitField0_ |= 0x00000020; 2412 onChanged(); 2413 return this; 2414 } 2415 /** 2416 * 2417 * 2418 * <pre> 2419 * Output only. Cluster status. 2420 * </pre> 2421 * 2422 * <code> 2423 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2424 * </code> 2425 */ clearStatus()2426 public Builder clearStatus() { 2427 bitField0_ = (bitField0_ & ~0x00000020); 2428 status_ = null; 2429 if (statusBuilder_ != null) { 2430 statusBuilder_.dispose(); 2431 statusBuilder_ = null; 2432 } 2433 onChanged(); 2434 return this; 2435 } 2436 /** 2437 * 2438 * 2439 * <pre> 2440 * Output only. Cluster status. 2441 * </pre> 2442 * 2443 * <code> 2444 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2445 * </code> 2446 */ getStatusBuilder()2447 public com.google.cloud.dataproc.v1.ClusterStatus.Builder getStatusBuilder() { 2448 bitField0_ |= 0x00000020; 2449 onChanged(); 2450 return getStatusFieldBuilder().getBuilder(); 2451 } 2452 /** 2453 * 2454 * 2455 * <pre> 2456 * Output only. Cluster status. 2457 * </pre> 2458 * 2459 * <code> 2460 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2461 * </code> 2462 */ getStatusOrBuilder()2463 public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusOrBuilder() { 2464 if (statusBuilder_ != null) { 2465 return statusBuilder_.getMessageOrBuilder(); 2466 } else { 2467 return status_ == null 2468 ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() 2469 : status_; 2470 } 2471 } 2472 /** 2473 * 2474 * 2475 * <pre> 2476 * Output only. Cluster status. 2477 * </pre> 2478 * 2479 * <code> 2480 * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2481 * </code> 2482 */ 2483 private com.google.protobuf.SingleFieldBuilderV3< 2484 com.google.cloud.dataproc.v1.ClusterStatus, 2485 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2486 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> getStatusFieldBuilder()2487 getStatusFieldBuilder() { 2488 if (statusBuilder_ == null) { 2489 statusBuilder_ = 2490 new com.google.protobuf.SingleFieldBuilderV3< 2491 com.google.cloud.dataproc.v1.ClusterStatus, 2492 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2493 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder>( 2494 getStatus(), getParentForChildren(), isClean()); 2495 status_ = null; 2496 } 2497 return statusBuilder_; 2498 } 2499 2500 private java.util.List<com.google.cloud.dataproc.v1.ClusterStatus> statusHistory_ = 2501 java.util.Collections.emptyList(); 2502 ensureStatusHistoryIsMutable()2503 private void ensureStatusHistoryIsMutable() { 2504 if (!((bitField0_ & 0x00000040) != 0)) { 2505 statusHistory_ = 2506 new java.util.ArrayList<com.google.cloud.dataproc.v1.ClusterStatus>(statusHistory_); 2507 bitField0_ |= 0x00000040; 2508 } 2509 } 2510 2511 private com.google.protobuf.RepeatedFieldBuilderV3< 2512 com.google.cloud.dataproc.v1.ClusterStatus, 2513 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2514 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> 2515 statusHistoryBuilder_; 2516 2517 /** 2518 * 2519 * 2520 * <pre> 2521 * Output only. The previous cluster status. 2522 * </pre> 2523 * 2524 * <code> 2525 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2526 * </code> 2527 */ getStatusHistoryList()2528 public java.util.List<com.google.cloud.dataproc.v1.ClusterStatus> getStatusHistoryList() { 2529 if (statusHistoryBuilder_ == null) { 2530 return java.util.Collections.unmodifiableList(statusHistory_); 2531 } else { 2532 return statusHistoryBuilder_.getMessageList(); 2533 } 2534 } 2535 /** 2536 * 2537 * 2538 * <pre> 2539 * Output only. The previous cluster status. 2540 * </pre> 2541 * 2542 * <code> 2543 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2544 * </code> 2545 */ getStatusHistoryCount()2546 public int getStatusHistoryCount() { 2547 if (statusHistoryBuilder_ == null) { 2548 return statusHistory_.size(); 2549 } else { 2550 return statusHistoryBuilder_.getCount(); 2551 } 2552 } 2553 /** 2554 * 2555 * 2556 * <pre> 2557 * Output only. The previous cluster status. 2558 * </pre> 2559 * 2560 * <code> 2561 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2562 * </code> 2563 */ getStatusHistory(int index)2564 public com.google.cloud.dataproc.v1.ClusterStatus getStatusHistory(int index) { 2565 if (statusHistoryBuilder_ == null) { 2566 return statusHistory_.get(index); 2567 } else { 2568 return statusHistoryBuilder_.getMessage(index); 2569 } 2570 } 2571 /** 2572 * 2573 * 2574 * <pre> 2575 * Output only. The previous cluster status. 2576 * </pre> 2577 * 2578 * <code> 2579 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2580 * </code> 2581 */ setStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value)2582 public Builder setStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value) { 2583 if (statusHistoryBuilder_ == null) { 2584 if (value == null) { 2585 throw new NullPointerException(); 2586 } 2587 ensureStatusHistoryIsMutable(); 2588 statusHistory_.set(index, value); 2589 onChanged(); 2590 } else { 2591 statusHistoryBuilder_.setMessage(index, value); 2592 } 2593 return this; 2594 } 2595 /** 2596 * 2597 * 2598 * <pre> 2599 * Output only. The previous cluster status. 2600 * </pre> 2601 * 2602 * <code> 2603 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2604 * </code> 2605 */ setStatusHistory( int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue)2606 public Builder setStatusHistory( 2607 int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { 2608 if (statusHistoryBuilder_ == null) { 2609 ensureStatusHistoryIsMutable(); 2610 statusHistory_.set(index, builderForValue.build()); 2611 onChanged(); 2612 } else { 2613 statusHistoryBuilder_.setMessage(index, builderForValue.build()); 2614 } 2615 return this; 2616 } 2617 /** 2618 * 2619 * 2620 * <pre> 2621 * Output only. The previous cluster status. 2622 * </pre> 2623 * 2624 * <code> 2625 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2626 * </code> 2627 */ addStatusHistory(com.google.cloud.dataproc.v1.ClusterStatus value)2628 public Builder addStatusHistory(com.google.cloud.dataproc.v1.ClusterStatus value) { 2629 if (statusHistoryBuilder_ == null) { 2630 if (value == null) { 2631 throw new NullPointerException(); 2632 } 2633 ensureStatusHistoryIsMutable(); 2634 statusHistory_.add(value); 2635 onChanged(); 2636 } else { 2637 statusHistoryBuilder_.addMessage(value); 2638 } 2639 return this; 2640 } 2641 /** 2642 * 2643 * 2644 * <pre> 2645 * Output only. The previous cluster status. 2646 * </pre> 2647 * 2648 * <code> 2649 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2650 * </code> 2651 */ addStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value)2652 public Builder addStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value) { 2653 if (statusHistoryBuilder_ == null) { 2654 if (value == null) { 2655 throw new NullPointerException(); 2656 } 2657 ensureStatusHistoryIsMutable(); 2658 statusHistory_.add(index, value); 2659 onChanged(); 2660 } else { 2661 statusHistoryBuilder_.addMessage(index, value); 2662 } 2663 return this; 2664 } 2665 /** 2666 * 2667 * 2668 * <pre> 2669 * Output only. The previous cluster status. 2670 * </pre> 2671 * 2672 * <code> 2673 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2674 * </code> 2675 */ addStatusHistory( com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue)2676 public Builder addStatusHistory( 2677 com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { 2678 if (statusHistoryBuilder_ == null) { 2679 ensureStatusHistoryIsMutable(); 2680 statusHistory_.add(builderForValue.build()); 2681 onChanged(); 2682 } else { 2683 statusHistoryBuilder_.addMessage(builderForValue.build()); 2684 } 2685 return this; 2686 } 2687 /** 2688 * 2689 * 2690 * <pre> 2691 * Output only. The previous cluster status. 2692 * </pre> 2693 * 2694 * <code> 2695 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2696 * </code> 2697 */ addStatusHistory( int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue)2698 public Builder addStatusHistory( 2699 int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { 2700 if (statusHistoryBuilder_ == null) { 2701 ensureStatusHistoryIsMutable(); 2702 statusHistory_.add(index, builderForValue.build()); 2703 onChanged(); 2704 } else { 2705 statusHistoryBuilder_.addMessage(index, builderForValue.build()); 2706 } 2707 return this; 2708 } 2709 /** 2710 * 2711 * 2712 * <pre> 2713 * Output only. The previous cluster status. 2714 * </pre> 2715 * 2716 * <code> 2717 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2718 * </code> 2719 */ addAllStatusHistory( java.lang.Iterable<? extends com.google.cloud.dataproc.v1.ClusterStatus> values)2720 public Builder addAllStatusHistory( 2721 java.lang.Iterable<? extends com.google.cloud.dataproc.v1.ClusterStatus> values) { 2722 if (statusHistoryBuilder_ == null) { 2723 ensureStatusHistoryIsMutable(); 2724 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusHistory_); 2725 onChanged(); 2726 } else { 2727 statusHistoryBuilder_.addAllMessages(values); 2728 } 2729 return this; 2730 } 2731 /** 2732 * 2733 * 2734 * <pre> 2735 * Output only. The previous cluster status. 2736 * </pre> 2737 * 2738 * <code> 2739 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2740 * </code> 2741 */ clearStatusHistory()2742 public Builder clearStatusHistory() { 2743 if (statusHistoryBuilder_ == null) { 2744 statusHistory_ = java.util.Collections.emptyList(); 2745 bitField0_ = (bitField0_ & ~0x00000040); 2746 onChanged(); 2747 } else { 2748 statusHistoryBuilder_.clear(); 2749 } 2750 return this; 2751 } 2752 /** 2753 * 2754 * 2755 * <pre> 2756 * Output only. The previous cluster status. 2757 * </pre> 2758 * 2759 * <code> 2760 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2761 * </code> 2762 */ removeStatusHistory(int index)2763 public Builder removeStatusHistory(int index) { 2764 if (statusHistoryBuilder_ == null) { 2765 ensureStatusHistoryIsMutable(); 2766 statusHistory_.remove(index); 2767 onChanged(); 2768 } else { 2769 statusHistoryBuilder_.remove(index); 2770 } 2771 return this; 2772 } 2773 /** 2774 * 2775 * 2776 * <pre> 2777 * Output only. The previous cluster status. 2778 * </pre> 2779 * 2780 * <code> 2781 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2782 * </code> 2783 */ getStatusHistoryBuilder(int index)2784 public com.google.cloud.dataproc.v1.ClusterStatus.Builder getStatusHistoryBuilder(int index) { 2785 return getStatusHistoryFieldBuilder().getBuilder(index); 2786 } 2787 /** 2788 * 2789 * 2790 * <pre> 2791 * Output only. The previous cluster status. 2792 * </pre> 2793 * 2794 * <code> 2795 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2796 * </code> 2797 */ getStatusHistoryOrBuilder( int index)2798 public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusHistoryOrBuilder( 2799 int index) { 2800 if (statusHistoryBuilder_ == null) { 2801 return statusHistory_.get(index); 2802 } else { 2803 return statusHistoryBuilder_.getMessageOrBuilder(index); 2804 } 2805 } 2806 /** 2807 * 2808 * 2809 * <pre> 2810 * Output only. The previous cluster status. 2811 * </pre> 2812 * 2813 * <code> 2814 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2815 * </code> 2816 */ 2817 public java.util.List<? extends com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> getStatusHistoryOrBuilderList()2818 getStatusHistoryOrBuilderList() { 2819 if (statusHistoryBuilder_ != null) { 2820 return statusHistoryBuilder_.getMessageOrBuilderList(); 2821 } else { 2822 return java.util.Collections.unmodifiableList(statusHistory_); 2823 } 2824 } 2825 /** 2826 * 2827 * 2828 * <pre> 2829 * Output only. The previous cluster status. 2830 * </pre> 2831 * 2832 * <code> 2833 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2834 * </code> 2835 */ addStatusHistoryBuilder()2836 public com.google.cloud.dataproc.v1.ClusterStatus.Builder addStatusHistoryBuilder() { 2837 return getStatusHistoryFieldBuilder() 2838 .addBuilder(com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()); 2839 } 2840 /** 2841 * 2842 * 2843 * <pre> 2844 * Output only. The previous cluster status. 2845 * </pre> 2846 * 2847 * <code> 2848 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2849 * </code> 2850 */ addStatusHistoryBuilder(int index)2851 public com.google.cloud.dataproc.v1.ClusterStatus.Builder addStatusHistoryBuilder(int index) { 2852 return getStatusHistoryFieldBuilder() 2853 .addBuilder(index, com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()); 2854 } 2855 /** 2856 * 2857 * 2858 * <pre> 2859 * Output only. The previous cluster status. 2860 * </pre> 2861 * 2862 * <code> 2863 * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2864 * </code> 2865 */ 2866 public java.util.List<com.google.cloud.dataproc.v1.ClusterStatus.Builder> getStatusHistoryBuilderList()2867 getStatusHistoryBuilderList() { 2868 return getStatusHistoryFieldBuilder().getBuilderList(); 2869 } 2870 2871 private com.google.protobuf.RepeatedFieldBuilderV3< 2872 com.google.cloud.dataproc.v1.ClusterStatus, 2873 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2874 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> getStatusHistoryFieldBuilder()2875 getStatusHistoryFieldBuilder() { 2876 if (statusHistoryBuilder_ == null) { 2877 statusHistoryBuilder_ = 2878 new com.google.protobuf.RepeatedFieldBuilderV3< 2879 com.google.cloud.dataproc.v1.ClusterStatus, 2880 com.google.cloud.dataproc.v1.ClusterStatus.Builder, 2881 com.google.cloud.dataproc.v1.ClusterStatusOrBuilder>( 2882 statusHistory_, 2883 ((bitField0_ & 0x00000040) != 0), 2884 getParentForChildren(), 2885 isClean()); 2886 statusHistory_ = null; 2887 } 2888 return statusHistoryBuilder_; 2889 } 2890 2891 private java.lang.Object clusterUuid_ = ""; 2892 /** 2893 * 2894 * 2895 * <pre> 2896 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 2897 * generates this value when it creates the cluster. 2898 * </pre> 2899 * 2900 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2901 * 2902 * @return The clusterUuid. 2903 */ getClusterUuid()2904 public java.lang.String getClusterUuid() { 2905 java.lang.Object ref = clusterUuid_; 2906 if (!(ref instanceof java.lang.String)) { 2907 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2908 java.lang.String s = bs.toStringUtf8(); 2909 clusterUuid_ = s; 2910 return s; 2911 } else { 2912 return (java.lang.String) ref; 2913 } 2914 } 2915 /** 2916 * 2917 * 2918 * <pre> 2919 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 2920 * generates this value when it creates the cluster. 2921 * </pre> 2922 * 2923 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2924 * 2925 * @return The bytes for clusterUuid. 2926 */ getClusterUuidBytes()2927 public com.google.protobuf.ByteString getClusterUuidBytes() { 2928 java.lang.Object ref = clusterUuid_; 2929 if (ref instanceof String) { 2930 com.google.protobuf.ByteString b = 2931 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2932 clusterUuid_ = b; 2933 return b; 2934 } else { 2935 return (com.google.protobuf.ByteString) ref; 2936 } 2937 } 2938 /** 2939 * 2940 * 2941 * <pre> 2942 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 2943 * generates this value when it creates the cluster. 2944 * </pre> 2945 * 2946 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2947 * 2948 * @param value The clusterUuid to set. 2949 * @return This builder for chaining. 2950 */ setClusterUuid(java.lang.String value)2951 public Builder setClusterUuid(java.lang.String value) { 2952 if (value == null) { 2953 throw new NullPointerException(); 2954 } 2955 clusterUuid_ = value; 2956 bitField0_ |= 0x00000080; 2957 onChanged(); 2958 return this; 2959 } 2960 /** 2961 * 2962 * 2963 * <pre> 2964 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 2965 * generates this value when it creates the cluster. 2966 * </pre> 2967 * 2968 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2969 * 2970 * @return This builder for chaining. 2971 */ clearClusterUuid()2972 public Builder clearClusterUuid() { 2973 clusterUuid_ = getDefaultInstance().getClusterUuid(); 2974 bitField0_ = (bitField0_ & ~0x00000080); 2975 onChanged(); 2976 return this; 2977 } 2978 /** 2979 * 2980 * 2981 * <pre> 2982 * Output only. A cluster UUID (Unique Universal Identifier). Dataproc 2983 * generates this value when it creates the cluster. 2984 * </pre> 2985 * 2986 * <code>string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2987 * 2988 * @param value The bytes for clusterUuid to set. 2989 * @return This builder for chaining. 2990 */ setClusterUuidBytes(com.google.protobuf.ByteString value)2991 public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { 2992 if (value == null) { 2993 throw new NullPointerException(); 2994 } 2995 checkByteStringIsUtf8(value); 2996 clusterUuid_ = value; 2997 bitField0_ |= 0x00000080; 2998 onChanged(); 2999 return this; 3000 } 3001 3002 private com.google.cloud.dataproc.v1.ClusterMetrics metrics_; 3003 private com.google.protobuf.SingleFieldBuilderV3< 3004 com.google.cloud.dataproc.v1.ClusterMetrics, 3005 com.google.cloud.dataproc.v1.ClusterMetrics.Builder, 3006 com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder> 3007 metricsBuilder_; 3008 /** 3009 * 3010 * 3011 * <pre> 3012 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3013 * **Beta Feature**: This report is available for testing purposes only. It 3014 * may be changed before final release. 3015 * </pre> 3016 * 3017 * <code> 3018 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3019 * </code> 3020 * 3021 * @return Whether the metrics field is set. 3022 */ hasMetrics()3023 public boolean hasMetrics() { 3024 return ((bitField0_ & 0x00000100) != 0); 3025 } 3026 /** 3027 * 3028 * 3029 * <pre> 3030 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3031 * **Beta Feature**: This report is available for testing purposes only. It 3032 * may be changed before final release. 3033 * </pre> 3034 * 3035 * <code> 3036 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3037 * </code> 3038 * 3039 * @return The metrics. 3040 */ getMetrics()3041 public com.google.cloud.dataproc.v1.ClusterMetrics getMetrics() { 3042 if (metricsBuilder_ == null) { 3043 return metrics_ == null 3044 ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() 3045 : metrics_; 3046 } else { 3047 return metricsBuilder_.getMessage(); 3048 } 3049 } 3050 /** 3051 * 3052 * 3053 * <pre> 3054 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3055 * **Beta Feature**: This report is available for testing purposes only. It 3056 * may be changed before final release. 3057 * </pre> 3058 * 3059 * <code> 3060 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3061 * </code> 3062 */ setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value)3063 public Builder setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value) { 3064 if (metricsBuilder_ == null) { 3065 if (value == null) { 3066 throw new NullPointerException(); 3067 } 3068 metrics_ = value; 3069 } else { 3070 metricsBuilder_.setMessage(value); 3071 } 3072 bitField0_ |= 0x00000100; 3073 onChanged(); 3074 return this; 3075 } 3076 /** 3077 * 3078 * 3079 * <pre> 3080 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3081 * **Beta Feature**: This report is available for testing purposes only. It 3082 * may be changed before final release. 3083 * </pre> 3084 * 3085 * <code> 3086 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3087 * </code> 3088 */ setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics.Builder builderForValue)3089 public Builder setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics.Builder builderForValue) { 3090 if (metricsBuilder_ == null) { 3091 metrics_ = builderForValue.build(); 3092 } else { 3093 metricsBuilder_.setMessage(builderForValue.build()); 3094 } 3095 bitField0_ |= 0x00000100; 3096 onChanged(); 3097 return this; 3098 } 3099 /** 3100 * 3101 * 3102 * <pre> 3103 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3104 * **Beta Feature**: This report is available for testing purposes only. It 3105 * may be changed before final release. 3106 * </pre> 3107 * 3108 * <code> 3109 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3110 * </code> 3111 */ mergeMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value)3112 public Builder mergeMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value) { 3113 if (metricsBuilder_ == null) { 3114 if (((bitField0_ & 0x00000100) != 0) 3115 && metrics_ != null 3116 && metrics_ != com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance()) { 3117 getMetricsBuilder().mergeFrom(value); 3118 } else { 3119 metrics_ = value; 3120 } 3121 } else { 3122 metricsBuilder_.mergeFrom(value); 3123 } 3124 bitField0_ |= 0x00000100; 3125 onChanged(); 3126 return this; 3127 } 3128 /** 3129 * 3130 * 3131 * <pre> 3132 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3133 * **Beta Feature**: This report is available for testing purposes only. It 3134 * may be changed before final release. 3135 * </pre> 3136 * 3137 * <code> 3138 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3139 * </code> 3140 */ clearMetrics()3141 public Builder clearMetrics() { 3142 bitField0_ = (bitField0_ & ~0x00000100); 3143 metrics_ = null; 3144 if (metricsBuilder_ != null) { 3145 metricsBuilder_.dispose(); 3146 metricsBuilder_ = null; 3147 } 3148 onChanged(); 3149 return this; 3150 } 3151 /** 3152 * 3153 * 3154 * <pre> 3155 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3156 * **Beta Feature**: This report is available for testing purposes only. It 3157 * may be changed before final release. 3158 * </pre> 3159 * 3160 * <code> 3161 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3162 * </code> 3163 */ getMetricsBuilder()3164 public com.google.cloud.dataproc.v1.ClusterMetrics.Builder getMetricsBuilder() { 3165 bitField0_ |= 0x00000100; 3166 onChanged(); 3167 return getMetricsFieldBuilder().getBuilder(); 3168 } 3169 /** 3170 * 3171 * 3172 * <pre> 3173 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3174 * **Beta Feature**: This report is available for testing purposes only. It 3175 * may be changed before final release. 3176 * </pre> 3177 * 3178 * <code> 3179 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3180 * </code> 3181 */ getMetricsOrBuilder()3182 public com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder getMetricsOrBuilder() { 3183 if (metricsBuilder_ != null) { 3184 return metricsBuilder_.getMessageOrBuilder(); 3185 } else { 3186 return metrics_ == null 3187 ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() 3188 : metrics_; 3189 } 3190 } 3191 /** 3192 * 3193 * 3194 * <pre> 3195 * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. 3196 * **Beta Feature**: This report is available for testing purposes only. It 3197 * may be changed before final release. 3198 * </pre> 3199 * 3200 * <code> 3201 * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3202 * </code> 3203 */ 3204 private com.google.protobuf.SingleFieldBuilderV3< 3205 com.google.cloud.dataproc.v1.ClusterMetrics, 3206 com.google.cloud.dataproc.v1.ClusterMetrics.Builder, 3207 com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder> getMetricsFieldBuilder()3208 getMetricsFieldBuilder() { 3209 if (metricsBuilder_ == null) { 3210 metricsBuilder_ = 3211 new com.google.protobuf.SingleFieldBuilderV3< 3212 com.google.cloud.dataproc.v1.ClusterMetrics, 3213 com.google.cloud.dataproc.v1.ClusterMetrics.Builder, 3214 com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder>( 3215 getMetrics(), getParentForChildren(), isClean()); 3216 metrics_ = null; 3217 } 3218 return metricsBuilder_; 3219 } 3220 3221 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3222 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3223 return super.setUnknownFields(unknownFields); 3224 } 3225 3226 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3227 public final Builder mergeUnknownFields( 3228 final com.google.protobuf.UnknownFieldSet unknownFields) { 3229 return super.mergeUnknownFields(unknownFields); 3230 } 3231 3232 // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.Cluster) 3233 } 3234 3235 // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.Cluster) 3236 private static final com.google.cloud.dataproc.v1.Cluster DEFAULT_INSTANCE; 3237 3238 static { 3239 DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.Cluster(); 3240 } 3241 getDefaultInstance()3242 public static com.google.cloud.dataproc.v1.Cluster getDefaultInstance() { 3243 return DEFAULT_INSTANCE; 3244 } 3245 3246 private static final com.google.protobuf.Parser<Cluster> PARSER = 3247 new com.google.protobuf.AbstractParser<Cluster>() { 3248 @java.lang.Override 3249 public Cluster parsePartialFrom( 3250 com.google.protobuf.CodedInputStream input, 3251 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3252 throws com.google.protobuf.InvalidProtocolBufferException { 3253 Builder builder = newBuilder(); 3254 try { 3255 builder.mergeFrom(input, extensionRegistry); 3256 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3257 throw e.setUnfinishedMessage(builder.buildPartial()); 3258 } catch (com.google.protobuf.UninitializedMessageException e) { 3259 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3260 } catch (java.io.IOException e) { 3261 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3262 .setUnfinishedMessage(builder.buildPartial()); 3263 } 3264 return builder.buildPartial(); 3265 } 3266 }; 3267 parser()3268 public static com.google.protobuf.Parser<Cluster> parser() { 3269 return PARSER; 3270 } 3271 3272 @java.lang.Override getParserForType()3273 public com.google.protobuf.Parser<Cluster> getParserForType() { 3274 return PARSER; 3275 } 3276 3277 @java.lang.Override getDefaultInstanceForType()3278 public com.google.cloud.dataproc.v1.Cluster getDefaultInstanceForType() { 3279 return DEFAULT_INSTANCE; 3280 } 3281 } 3282