// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/container/v1/cluster_service.proto

package com.google.container.v1;

/**
 * <pre>
 * ClusterUpdate describes an update to the cluster. Exactly one update can
 * be applied to a cluster with each request, so at most one field can be
 * provided.
 * </pre>
 *
 * Protobuf type {@code google.container.v1.ClusterUpdate}
 */
public  final class ClusterUpdate extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.container.v1.ClusterUpdate)
    ClusterUpdateOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ClusterUpdate.newBuilder() to construct.
  private ClusterUpdate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ClusterUpdate() {
    desiredNodeVersion_ = "";
    desiredMonitoringService_ = "";
    desiredNodePoolId_ = "";
    desiredImageType_ = "";
    desiredLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    desiredMasterVersion_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ClusterUpdate(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            desiredNodeVersion_ = s;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            desiredMonitoringService_ = s;
            break;
          }
          case 50: {
            com.google.container.v1.AddonsConfig.Builder subBuilder = null;
            if (desiredAddonsConfig_ != null) {
              subBuilder = desiredAddonsConfig_.toBuilder();
            }
            desiredAddonsConfig_ = input.readMessage(com.google.container.v1.AddonsConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(desiredAddonsConfig_);
              desiredAddonsConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            desiredNodePoolId_ = s;
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();

            desiredImageType_ = s;
            break;
          }
          case 74: {
            com.google.container.v1.NodePoolAutoscaling.Builder subBuilder = null;
            if (desiredNodePoolAutoscaling_ != null) {
              subBuilder = desiredNodePoolAutoscaling_.toBuilder();
            }
            desiredNodePoolAutoscaling_ = input.readMessage(com.google.container.v1.NodePoolAutoscaling.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(desiredNodePoolAutoscaling_);
              desiredNodePoolAutoscaling_ = subBuilder.buildPartial();
            }

            break;
          }
          case 82: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
              desiredLocations_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000040;
            }
            desiredLocations_.add(s);
            break;
          }
          case 98: {
            com.google.container.v1.MasterAuthorizedNetworksConfig.Builder subBuilder = null;
            if (desiredMasterAuthorizedNetworksConfig_ != null) {
              subBuilder = desiredMasterAuthorizedNetworksConfig_.toBuilder();
            }
            desiredMasterAuthorizedNetworksConfig_ = input.readMessage(com.google.container.v1.MasterAuthorizedNetworksConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(desiredMasterAuthorizedNetworksConfig_);
              desiredMasterAuthorizedNetworksConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 802: {
            java.lang.String s = input.readStringRequireUtf8();

            desiredMasterVersion_ = s;
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
        desiredLocations_ = desiredLocations_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.container.v1.ClusterServiceProto.internal_static_google_container_v1_ClusterUpdate_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.container.v1.ClusterServiceProto.internal_static_google_container_v1_ClusterUpdate_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.container.v1.ClusterUpdate.class, com.google.container.v1.ClusterUpdate.Builder.class);
  }

  private int bitField0_;
  public static final int DESIRED_NODE_VERSION_FIELD_NUMBER = 4;
  private volatile java.lang.Object desiredNodeVersion_;
  /**
   * <pre>
   * The Kubernetes version to change the nodes to (typically an
   * upgrade). Use `-` to upgrade to the latest version supported by
   * the server.
   * </pre>
   *
   * <code>string desired_node_version = 4;</code>
   */
  public java.lang.String getDesiredNodeVersion() {
    java.lang.Object ref = desiredNodeVersion_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      desiredNodeVersion_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The Kubernetes version to change the nodes to (typically an
   * upgrade). Use `-` to upgrade to the latest version supported by
   * the server.
   * </pre>
   *
   * <code>string desired_node_version = 4;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredNodeVersionBytes() {
    java.lang.Object ref = desiredNodeVersion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      desiredNodeVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESIRED_MONITORING_SERVICE_FIELD_NUMBER = 5;
  private volatile java.lang.Object desiredMonitoringService_;
  /**
   * <pre>
   * The monitoring service the cluster should use to write metrics.
   * Currently available options:
   * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
   * * "none" - no metrics will be exported from the cluster
   * </pre>
   *
   * <code>string desired_monitoring_service = 5;</code>
   */
  public java.lang.String getDesiredMonitoringService() {
    java.lang.Object ref = desiredMonitoringService_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      desiredMonitoringService_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The monitoring service the cluster should use to write metrics.
   * Currently available options:
   * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
   * * "none" - no metrics will be exported from the cluster
   * </pre>
   *
   * <code>string desired_monitoring_service = 5;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredMonitoringServiceBytes() {
    java.lang.Object ref = desiredMonitoringService_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      desiredMonitoringService_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESIRED_ADDONS_CONFIG_FIELD_NUMBER = 6;
  private com.google.container.v1.AddonsConfig desiredAddonsConfig_;
  /**
   * <pre>
   * Configurations for the various addons available to run in the cluster.
   * </pre>
   *
   * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
   */
  public boolean hasDesiredAddonsConfig() {
    return desiredAddonsConfig_ != null;
  }
  /**
   * <pre>
   * Configurations for the various addons available to run in the cluster.
   * </pre>
   *
   * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
   */
  public com.google.container.v1.AddonsConfig getDesiredAddonsConfig() {
    return desiredAddonsConfig_ == null ? com.google.container.v1.AddonsConfig.getDefaultInstance() : desiredAddonsConfig_;
  }
  /**
   * <pre>
   * Configurations for the various addons available to run in the cluster.
   * </pre>
   *
   * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
   */
  public com.google.container.v1.AddonsConfigOrBuilder getDesiredAddonsConfigOrBuilder() {
    return getDesiredAddonsConfig();
  }

  public static final int DESIRED_NODE_POOL_ID_FIELD_NUMBER = 7;
  private volatile java.lang.Object desiredNodePoolId_;
  /**
   * <pre>
   * The node pool to be upgraded. This field is mandatory if
   * "desired_node_version", "desired_image_family" or
   * "desired_node_pool_autoscaling" is specified and there is more than one
   * node pool on the cluster.
   * </pre>
   *
   * <code>string desired_node_pool_id = 7;</code>
   */
  public java.lang.String getDesiredNodePoolId() {
    java.lang.Object ref = desiredNodePoolId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      desiredNodePoolId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The node pool to be upgraded. This field is mandatory if
   * "desired_node_version", "desired_image_family" or
   * "desired_node_pool_autoscaling" is specified and there is more than one
   * node pool on the cluster.
   * </pre>
   *
   * <code>string desired_node_pool_id = 7;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredNodePoolIdBytes() {
    java.lang.Object ref = desiredNodePoolId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      desiredNodePoolId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESIRED_IMAGE_TYPE_FIELD_NUMBER = 8;
  private volatile java.lang.Object desiredImageType_;
  /**
   * <pre>
   * The desired image type for the node pool.
   * NOTE: Set the "desired_node_pool" field as well.
   * </pre>
   *
   * <code>string desired_image_type = 8;</code>
   */
  public java.lang.String getDesiredImageType() {
    java.lang.Object ref = desiredImageType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      desiredImageType_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The desired image type for the node pool.
   * NOTE: Set the "desired_node_pool" field as well.
   * </pre>
   *
   * <code>string desired_image_type = 8;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredImageTypeBytes() {
    java.lang.Object ref = desiredImageType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      desiredImageType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESIRED_NODE_POOL_AUTOSCALING_FIELD_NUMBER = 9;
  private com.google.container.v1.NodePoolAutoscaling desiredNodePoolAutoscaling_;
  /**
   * <pre>
   * Autoscaler configuration for the node pool specified in
   * desired_node_pool_id. If there is only one pool in the
   * cluster and desired_node_pool_id is not provided then
   * the change applies to that single node pool.
   * </pre>
   *
   * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
   */
  public boolean hasDesiredNodePoolAutoscaling() {
    return desiredNodePoolAutoscaling_ != null;
  }
  /**
   * <pre>
   * Autoscaler configuration for the node pool specified in
   * desired_node_pool_id. If there is only one pool in the
   * cluster and desired_node_pool_id is not provided then
   * the change applies to that single node pool.
   * </pre>
   *
   * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
   */
  public com.google.container.v1.NodePoolAutoscaling getDesiredNodePoolAutoscaling() {
    return desiredNodePoolAutoscaling_ == null ? com.google.container.v1.NodePoolAutoscaling.getDefaultInstance() : desiredNodePoolAutoscaling_;
  }
  /**
   * <pre>
   * Autoscaler configuration for the node pool specified in
   * desired_node_pool_id. If there is only one pool in the
   * cluster and desired_node_pool_id is not provided then
   * the change applies to that single node pool.
   * </pre>
   *
   * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
   */
  public com.google.container.v1.NodePoolAutoscalingOrBuilder getDesiredNodePoolAutoscalingOrBuilder() {
    return getDesiredNodePoolAutoscaling();
  }

  public static final int DESIRED_LOCATIONS_FIELD_NUMBER = 10;
  private com.google.protobuf.LazyStringList desiredLocations_;
  /**
   * <pre>
   * The desired list of Google Compute Engine
   * [locations](/compute/docs/zones#available) in which the cluster's nodes
   * should be located. Changing the locations a cluster is in will result
   * in nodes being either created or removed from the cluster, depending on
   * whether locations are being added or removed.
   * This list must always include the cluster's primary zone.
   * </pre>
   *
   * <code>repeated string desired_locations = 10;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getDesiredLocationsList() {
    return desiredLocations_;
  }
  /**
   * <pre>
   * The desired list of Google Compute Engine
   * [locations](/compute/docs/zones#available) in which the cluster's nodes
   * should be located. Changing the locations a cluster is in will result
   * in nodes being either created or removed from the cluster, depending on
   * whether locations are being added or removed.
   * This list must always include the cluster's primary zone.
   * </pre>
   *
   * <code>repeated string desired_locations = 10;</code>
   */
  public int getDesiredLocationsCount() {
    return desiredLocations_.size();
  }
  /**
   * <pre>
   * The desired list of Google Compute Engine
   * [locations](/compute/docs/zones#available) in which the cluster's nodes
   * should be located. Changing the locations a cluster is in will result
   * in nodes being either created or removed from the cluster, depending on
   * whether locations are being added or removed.
   * This list must always include the cluster's primary zone.
   * </pre>
   *
   * <code>repeated string desired_locations = 10;</code>
   */
  public java.lang.String getDesiredLocations(int index) {
    return desiredLocations_.get(index);
  }
  /**
   * <pre>
   * The desired list of Google Compute Engine
   * [locations](/compute/docs/zones#available) in which the cluster's nodes
   * should be located. Changing the locations a cluster is in will result
   * in nodes being either created or removed from the cluster, depending on
   * whether locations are being added or removed.
   * This list must always include the cluster's primary zone.
   * </pre>
   *
   * <code>repeated string desired_locations = 10;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredLocationsBytes(int index) {
    return desiredLocations_.getByteString(index);
  }

  public static final int DESIRED_MASTER_AUTHORIZED_NETWORKS_CONFIG_FIELD_NUMBER = 12;
  private com.google.container.v1.MasterAuthorizedNetworksConfig desiredMasterAuthorizedNetworksConfig_;
  /**
   * <pre>
   * Master authorized networks is a Beta feature.
   * The desired configuration options for master authorized networks feature.
   * </pre>
   *
   * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
   */
  public boolean hasDesiredMasterAuthorizedNetworksConfig() {
    return desiredMasterAuthorizedNetworksConfig_ != null;
  }
  /**
   * <pre>
   * Master authorized networks is a Beta feature.
   * The desired configuration options for master authorized networks feature.
   * </pre>
   *
   * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
   */
  public com.google.container.v1.MasterAuthorizedNetworksConfig getDesiredMasterAuthorizedNetworksConfig() {
    return desiredMasterAuthorizedNetworksConfig_ == null ? com.google.container.v1.MasterAuthorizedNetworksConfig.getDefaultInstance() : desiredMasterAuthorizedNetworksConfig_;
  }
  /**
   * <pre>
   * Master authorized networks is a Beta feature.
   * The desired configuration options for master authorized networks feature.
   * </pre>
   *
   * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
   */
  public com.google.container.v1.MasterAuthorizedNetworksConfigOrBuilder getDesiredMasterAuthorizedNetworksConfigOrBuilder() {
    return getDesiredMasterAuthorizedNetworksConfig();
  }

  public static final int DESIRED_MASTER_VERSION_FIELD_NUMBER = 100;
  private volatile java.lang.Object desiredMasterVersion_;
  /**
   * <pre>
   * The Kubernetes version to change the master to. The only valid value is the
   * latest supported version. Use "-" to have the server automatically select
   * the latest version.
   * </pre>
   *
   * <code>string desired_master_version = 100;</code>
   */
  public java.lang.String getDesiredMasterVersion() {
    java.lang.Object ref = desiredMasterVersion_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      desiredMasterVersion_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The Kubernetes version to change the master to. The only valid value is the
   * latest supported version. Use "-" to have the server automatically select
   * the latest version.
   * </pre>
   *
   * <code>string desired_master_version = 100;</code>
   */
  public com.google.protobuf.ByteString
      getDesiredMasterVersionBytes() {
    java.lang.Object ref = desiredMasterVersion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      desiredMasterVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getDesiredNodeVersionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, desiredNodeVersion_);
    }
    if (!getDesiredMonitoringServiceBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, desiredMonitoringService_);
    }
    if (desiredAddonsConfig_ != null) {
      output.writeMessage(6, getDesiredAddonsConfig());
    }
    if (!getDesiredNodePoolIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, desiredNodePoolId_);
    }
    if (!getDesiredImageTypeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, desiredImageType_);
    }
    if (desiredNodePoolAutoscaling_ != null) {
      output.writeMessage(9, getDesiredNodePoolAutoscaling());
    }
    for (int i = 0; i < desiredLocations_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, desiredLocations_.getRaw(i));
    }
    if (desiredMasterAuthorizedNetworksConfig_ != null) {
      output.writeMessage(12, getDesiredMasterAuthorizedNetworksConfig());
    }
    if (!getDesiredMasterVersionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 100, desiredMasterVersion_);
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getDesiredNodeVersionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, desiredNodeVersion_);
    }
    if (!getDesiredMonitoringServiceBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, desiredMonitoringService_);
    }
    if (desiredAddonsConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getDesiredAddonsConfig());
    }
    if (!getDesiredNodePoolIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, desiredNodePoolId_);
    }
    if (!getDesiredImageTypeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, desiredImageType_);
    }
    if (desiredNodePoolAutoscaling_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getDesiredNodePoolAutoscaling());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < desiredLocations_.size(); i++) {
        dataSize += computeStringSizeNoTag(desiredLocations_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getDesiredLocationsList().size();
    }
    if (desiredMasterAuthorizedNetworksConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, getDesiredMasterAuthorizedNetworksConfig());
    }
    if (!getDesiredMasterVersionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, desiredMasterVersion_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.container.v1.ClusterUpdate)) {
      return super.equals(obj);
    }
    com.google.container.v1.ClusterUpdate other = (com.google.container.v1.ClusterUpdate) obj;

    boolean result = true;
    result = result && getDesiredNodeVersion()
        .equals(other.getDesiredNodeVersion());
    result = result && getDesiredMonitoringService()
        .equals(other.getDesiredMonitoringService());
    result = result && (hasDesiredAddonsConfig() == other.hasDesiredAddonsConfig());
    if (hasDesiredAddonsConfig()) {
      result = result && getDesiredAddonsConfig()
          .equals(other.getDesiredAddonsConfig());
    }
    result = result && getDesiredNodePoolId()
        .equals(other.getDesiredNodePoolId());
    result = result && getDesiredImageType()
        .equals(other.getDesiredImageType());
    result = result && (hasDesiredNodePoolAutoscaling() == other.hasDesiredNodePoolAutoscaling());
    if (hasDesiredNodePoolAutoscaling()) {
      result = result && getDesiredNodePoolAutoscaling()
          .equals(other.getDesiredNodePoolAutoscaling());
    }
    result = result && getDesiredLocationsList()
        .equals(other.getDesiredLocationsList());
    result = result && (hasDesiredMasterAuthorizedNetworksConfig() == other.hasDesiredMasterAuthorizedNetworksConfig());
    if (hasDesiredMasterAuthorizedNetworksConfig()) {
      result = result && getDesiredMasterAuthorizedNetworksConfig()
          .equals(other.getDesiredMasterAuthorizedNetworksConfig());
    }
    result = result && getDesiredMasterVersion()
        .equals(other.getDesiredMasterVersion());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + DESIRED_NODE_VERSION_FIELD_NUMBER;
    hash = (53 * hash) + getDesiredNodeVersion().hashCode();
    hash = (37 * hash) + DESIRED_MONITORING_SERVICE_FIELD_NUMBER;
    hash = (53 * hash) + getDesiredMonitoringService().hashCode();
    if (hasDesiredAddonsConfig()) {
      hash = (37 * hash) + DESIRED_ADDONS_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getDesiredAddonsConfig().hashCode();
    }
    hash = (37 * hash) + DESIRED_NODE_POOL_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDesiredNodePoolId().hashCode();
    hash = (37 * hash) + DESIRED_IMAGE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getDesiredImageType().hashCode();
    if (hasDesiredNodePoolAutoscaling()) {
      hash = (37 * hash) + DESIRED_NODE_POOL_AUTOSCALING_FIELD_NUMBER;
      hash = (53 * hash) + getDesiredNodePoolAutoscaling().hashCode();
    }
    if (getDesiredLocationsCount() > 0) {
      hash = (37 * hash) + DESIRED_LOCATIONS_FIELD_NUMBER;
      hash = (53 * hash) + getDesiredLocationsList().hashCode();
    }
    if (hasDesiredMasterAuthorizedNetworksConfig()) {
      hash = (37 * hash) + DESIRED_MASTER_AUTHORIZED_NETWORKS_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getDesiredMasterAuthorizedNetworksConfig().hashCode();
    }
    hash = (37 * hash) + DESIRED_MASTER_VERSION_FIELD_NUMBER;
    hash = (53 * hash) + getDesiredMasterVersion().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.container.v1.ClusterUpdate parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.google.container.v1.ClusterUpdate parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.container.v1.ClusterUpdate parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.container.v1.ClusterUpdate parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.container.v1.ClusterUpdate prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * ClusterUpdate describes an update to the cluster. Exactly one update can
   * be applied to a cluster with each request, so at most one field can be
   * provided.
   * </pre>
   *
   * Protobuf type {@code google.container.v1.ClusterUpdate}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.container.v1.ClusterUpdate)
      com.google.container.v1.ClusterUpdateOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.container.v1.ClusterServiceProto.internal_static_google_container_v1_ClusterUpdate_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.container.v1.ClusterServiceProto.internal_static_google_container_v1_ClusterUpdate_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.container.v1.ClusterUpdate.class, com.google.container.v1.ClusterUpdate.Builder.class);
    }

    // Construct using com.google.container.v1.ClusterUpdate.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      desiredNodeVersion_ = "";

      desiredMonitoringService_ = "";

      if (desiredAddonsConfigBuilder_ == null) {
        desiredAddonsConfig_ = null;
      } else {
        desiredAddonsConfig_ = null;
        desiredAddonsConfigBuilder_ = null;
      }
      desiredNodePoolId_ = "";

      desiredImageType_ = "";

      if (desiredNodePoolAutoscalingBuilder_ == null) {
        desiredNodePoolAutoscaling_ = null;
      } else {
        desiredNodePoolAutoscaling_ = null;
        desiredNodePoolAutoscalingBuilder_ = null;
      }
      desiredLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000040);
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        desiredMasterAuthorizedNetworksConfig_ = null;
      } else {
        desiredMasterAuthorizedNetworksConfig_ = null;
        desiredMasterAuthorizedNetworksConfigBuilder_ = null;
      }
      desiredMasterVersion_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.container.v1.ClusterServiceProto.internal_static_google_container_v1_ClusterUpdate_descriptor;
    }

    public com.google.container.v1.ClusterUpdate getDefaultInstanceForType() {
      return com.google.container.v1.ClusterUpdate.getDefaultInstance();
    }

    public com.google.container.v1.ClusterUpdate build() {
      com.google.container.v1.ClusterUpdate result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.container.v1.ClusterUpdate buildPartial() {
      com.google.container.v1.ClusterUpdate result = new com.google.container.v1.ClusterUpdate(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.desiredNodeVersion_ = desiredNodeVersion_;
      result.desiredMonitoringService_ = desiredMonitoringService_;
      if (desiredAddonsConfigBuilder_ == null) {
        result.desiredAddonsConfig_ = desiredAddonsConfig_;
      } else {
        result.desiredAddonsConfig_ = desiredAddonsConfigBuilder_.build();
      }
      result.desiredNodePoolId_ = desiredNodePoolId_;
      result.desiredImageType_ = desiredImageType_;
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        result.desiredNodePoolAutoscaling_ = desiredNodePoolAutoscaling_;
      } else {
        result.desiredNodePoolAutoscaling_ = desiredNodePoolAutoscalingBuilder_.build();
      }
      if (((bitField0_ & 0x00000040) == 0x00000040)) {
        desiredLocations_ = desiredLocations_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000040);
      }
      result.desiredLocations_ = desiredLocations_;
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        result.desiredMasterAuthorizedNetworksConfig_ = desiredMasterAuthorizedNetworksConfig_;
      } else {
        result.desiredMasterAuthorizedNetworksConfig_ = desiredMasterAuthorizedNetworksConfigBuilder_.build();
      }
      result.desiredMasterVersion_ = desiredMasterVersion_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.container.v1.ClusterUpdate) {
        return mergeFrom((com.google.container.v1.ClusterUpdate)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.container.v1.ClusterUpdate other) {
      if (other == com.google.container.v1.ClusterUpdate.getDefaultInstance()) return this;
      if (!other.getDesiredNodeVersion().isEmpty()) {
        desiredNodeVersion_ = other.desiredNodeVersion_;
        onChanged();
      }
      if (!other.getDesiredMonitoringService().isEmpty()) {
        desiredMonitoringService_ = other.desiredMonitoringService_;
        onChanged();
      }
      if (other.hasDesiredAddonsConfig()) {
        mergeDesiredAddonsConfig(other.getDesiredAddonsConfig());
      }
      if (!other.getDesiredNodePoolId().isEmpty()) {
        desiredNodePoolId_ = other.desiredNodePoolId_;
        onChanged();
      }
      if (!other.getDesiredImageType().isEmpty()) {
        desiredImageType_ = other.desiredImageType_;
        onChanged();
      }
      if (other.hasDesiredNodePoolAutoscaling()) {
        mergeDesiredNodePoolAutoscaling(other.getDesiredNodePoolAutoscaling());
      }
      if (!other.desiredLocations_.isEmpty()) {
        if (desiredLocations_.isEmpty()) {
          desiredLocations_ = other.desiredLocations_;
          bitField0_ = (bitField0_ & ~0x00000040);
        } else {
          ensureDesiredLocationsIsMutable();
          desiredLocations_.addAll(other.desiredLocations_);
        }
        onChanged();
      }
      if (other.hasDesiredMasterAuthorizedNetworksConfig()) {
        mergeDesiredMasterAuthorizedNetworksConfig(other.getDesiredMasterAuthorizedNetworksConfig());
      }
      if (!other.getDesiredMasterVersion().isEmpty()) {
        desiredMasterVersion_ = other.desiredMasterVersion_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.container.v1.ClusterUpdate parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.container.v1.ClusterUpdate) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object desiredNodeVersion_ = "";
    /**
     * <pre>
     * The Kubernetes version to change the nodes to (typically an
     * upgrade). Use `-` to upgrade to the latest version supported by
     * the server.
     * </pre>
     *
     * <code>string desired_node_version = 4;</code>
     */
    public java.lang.String getDesiredNodeVersion() {
      java.lang.Object ref = desiredNodeVersion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        desiredNodeVersion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The Kubernetes version to change the nodes to (typically an
     * upgrade). Use `-` to upgrade to the latest version supported by
     * the server.
     * </pre>
     *
     * <code>string desired_node_version = 4;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredNodeVersionBytes() {
      java.lang.Object ref = desiredNodeVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        desiredNodeVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The Kubernetes version to change the nodes to (typically an
     * upgrade). Use `-` to upgrade to the latest version supported by
     * the server.
     * </pre>
     *
     * <code>string desired_node_version = 4;</code>
     */
    public Builder setDesiredNodeVersion(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      desiredNodeVersion_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The Kubernetes version to change the nodes to (typically an
     * upgrade). Use `-` to upgrade to the latest version supported by
     * the server.
     * </pre>
     *
     * <code>string desired_node_version = 4;</code>
     */
    public Builder clearDesiredNodeVersion() {
      
      desiredNodeVersion_ = getDefaultInstance().getDesiredNodeVersion();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The Kubernetes version to change the nodes to (typically an
     * upgrade). Use `-` to upgrade to the latest version supported by
     * the server.
     * </pre>
     *
     * <code>string desired_node_version = 4;</code>
     */
    public Builder setDesiredNodeVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      desiredNodeVersion_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object desiredMonitoringService_ = "";
    /**
     * <pre>
     * The monitoring service the cluster should use to write metrics.
     * Currently available options:
     * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
     * * "none" - no metrics will be exported from the cluster
     * </pre>
     *
     * <code>string desired_monitoring_service = 5;</code>
     */
    public java.lang.String getDesiredMonitoringService() {
      java.lang.Object ref = desiredMonitoringService_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        desiredMonitoringService_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The monitoring service the cluster should use to write metrics.
     * Currently available options:
     * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
     * * "none" - no metrics will be exported from the cluster
     * </pre>
     *
     * <code>string desired_monitoring_service = 5;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredMonitoringServiceBytes() {
      java.lang.Object ref = desiredMonitoringService_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        desiredMonitoringService_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The monitoring service the cluster should use to write metrics.
     * Currently available options:
     * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
     * * "none" - no metrics will be exported from the cluster
     * </pre>
     *
     * <code>string desired_monitoring_service = 5;</code>
     */
    public Builder setDesiredMonitoringService(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      desiredMonitoringService_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The monitoring service the cluster should use to write metrics.
     * Currently available options:
     * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
     * * "none" - no metrics will be exported from the cluster
     * </pre>
     *
     * <code>string desired_monitoring_service = 5;</code>
     */
    public Builder clearDesiredMonitoringService() {
      
      desiredMonitoringService_ = getDefaultInstance().getDesiredMonitoringService();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The monitoring service the cluster should use to write metrics.
     * Currently available options:
     * * "monitoring.googleapis.com" - the Google Cloud Monitoring service
     * * "none" - no metrics will be exported from the cluster
     * </pre>
     *
     * <code>string desired_monitoring_service = 5;</code>
     */
    public Builder setDesiredMonitoringServiceBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      desiredMonitoringService_ = value;
      onChanged();
      return this;
    }

    private com.google.container.v1.AddonsConfig desiredAddonsConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.AddonsConfig, com.google.container.v1.AddonsConfig.Builder, com.google.container.v1.AddonsConfigOrBuilder> desiredAddonsConfigBuilder_;
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public boolean hasDesiredAddonsConfig() {
      return desiredAddonsConfigBuilder_ != null || desiredAddonsConfig_ != null;
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public com.google.container.v1.AddonsConfig getDesiredAddonsConfig() {
      if (desiredAddonsConfigBuilder_ == null) {
        return desiredAddonsConfig_ == null ? com.google.container.v1.AddonsConfig.getDefaultInstance() : desiredAddonsConfig_;
      } else {
        return desiredAddonsConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public Builder setDesiredAddonsConfig(com.google.container.v1.AddonsConfig value) {
      if (desiredAddonsConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        desiredAddonsConfig_ = value;
        onChanged();
      } else {
        desiredAddonsConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public Builder setDesiredAddonsConfig(
        com.google.container.v1.AddonsConfig.Builder builderForValue) {
      if (desiredAddonsConfigBuilder_ == null) {
        desiredAddonsConfig_ = builderForValue.build();
        onChanged();
      } else {
        desiredAddonsConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public Builder mergeDesiredAddonsConfig(com.google.container.v1.AddonsConfig value) {
      if (desiredAddonsConfigBuilder_ == null) {
        if (desiredAddonsConfig_ != null) {
          desiredAddonsConfig_ =
            com.google.container.v1.AddonsConfig.newBuilder(desiredAddonsConfig_).mergeFrom(value).buildPartial();
        } else {
          desiredAddonsConfig_ = value;
        }
        onChanged();
      } else {
        desiredAddonsConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public Builder clearDesiredAddonsConfig() {
      if (desiredAddonsConfigBuilder_ == null) {
        desiredAddonsConfig_ = null;
        onChanged();
      } else {
        desiredAddonsConfig_ = null;
        desiredAddonsConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public com.google.container.v1.AddonsConfig.Builder getDesiredAddonsConfigBuilder() {
      
      onChanged();
      return getDesiredAddonsConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    public com.google.container.v1.AddonsConfigOrBuilder getDesiredAddonsConfigOrBuilder() {
      if (desiredAddonsConfigBuilder_ != null) {
        return desiredAddonsConfigBuilder_.getMessageOrBuilder();
      } else {
        return desiredAddonsConfig_ == null ?
            com.google.container.v1.AddonsConfig.getDefaultInstance() : desiredAddonsConfig_;
      }
    }
    /**
     * <pre>
     * Configurations for the various addons available to run in the cluster.
     * </pre>
     *
     * <code>.google.container.v1.AddonsConfig desired_addons_config = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.AddonsConfig, com.google.container.v1.AddonsConfig.Builder, com.google.container.v1.AddonsConfigOrBuilder> 
        getDesiredAddonsConfigFieldBuilder() {
      if (desiredAddonsConfigBuilder_ == null) {
        desiredAddonsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.container.v1.AddonsConfig, com.google.container.v1.AddonsConfig.Builder, com.google.container.v1.AddonsConfigOrBuilder>(
                getDesiredAddonsConfig(),
                getParentForChildren(),
                isClean());
        desiredAddonsConfig_ = null;
      }
      return desiredAddonsConfigBuilder_;
    }

    private java.lang.Object desiredNodePoolId_ = "";
    /**
     * <pre>
     * The node pool to be upgraded. This field is mandatory if
     * "desired_node_version", "desired_image_family" or
     * "desired_node_pool_autoscaling" is specified and there is more than one
     * node pool on the cluster.
     * </pre>
     *
     * <code>string desired_node_pool_id = 7;</code>
     */
    public java.lang.String getDesiredNodePoolId() {
      java.lang.Object ref = desiredNodePoolId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        desiredNodePoolId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The node pool to be upgraded. This field is mandatory if
     * "desired_node_version", "desired_image_family" or
     * "desired_node_pool_autoscaling" is specified and there is more than one
     * node pool on the cluster.
     * </pre>
     *
     * <code>string desired_node_pool_id = 7;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredNodePoolIdBytes() {
      java.lang.Object ref = desiredNodePoolId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        desiredNodePoolId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The node pool to be upgraded. This field is mandatory if
     * "desired_node_version", "desired_image_family" or
     * "desired_node_pool_autoscaling" is specified and there is more than one
     * node pool on the cluster.
     * </pre>
     *
     * <code>string desired_node_pool_id = 7;</code>
     */
    public Builder setDesiredNodePoolId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      desiredNodePoolId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The node pool to be upgraded. This field is mandatory if
     * "desired_node_version", "desired_image_family" or
     * "desired_node_pool_autoscaling" is specified and there is more than one
     * node pool on the cluster.
     * </pre>
     *
     * <code>string desired_node_pool_id = 7;</code>
     */
    public Builder clearDesiredNodePoolId() {
      
      desiredNodePoolId_ = getDefaultInstance().getDesiredNodePoolId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The node pool to be upgraded. This field is mandatory if
     * "desired_node_version", "desired_image_family" or
     * "desired_node_pool_autoscaling" is specified and there is more than one
     * node pool on the cluster.
     * </pre>
     *
     * <code>string desired_node_pool_id = 7;</code>
     */
    public Builder setDesiredNodePoolIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      desiredNodePoolId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object desiredImageType_ = "";
    /**
     * <pre>
     * The desired image type for the node pool.
     * NOTE: Set the "desired_node_pool" field as well.
     * </pre>
     *
     * <code>string desired_image_type = 8;</code>
     */
    public java.lang.String getDesiredImageType() {
      java.lang.Object ref = desiredImageType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        desiredImageType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The desired image type for the node pool.
     * NOTE: Set the "desired_node_pool" field as well.
     * </pre>
     *
     * <code>string desired_image_type = 8;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredImageTypeBytes() {
      java.lang.Object ref = desiredImageType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        desiredImageType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The desired image type for the node pool.
     * NOTE: Set the "desired_node_pool" field as well.
     * </pre>
     *
     * <code>string desired_image_type = 8;</code>
     */
    public Builder setDesiredImageType(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      desiredImageType_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired image type for the node pool.
     * NOTE: Set the "desired_node_pool" field as well.
     * </pre>
     *
     * <code>string desired_image_type = 8;</code>
     */
    public Builder clearDesiredImageType() {
      
      desiredImageType_ = getDefaultInstance().getDesiredImageType();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired image type for the node pool.
     * NOTE: Set the "desired_node_pool" field as well.
     * </pre>
     *
     * <code>string desired_image_type = 8;</code>
     */
    public Builder setDesiredImageTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      desiredImageType_ = value;
      onChanged();
      return this;
    }

    private com.google.container.v1.NodePoolAutoscaling desiredNodePoolAutoscaling_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.NodePoolAutoscaling, com.google.container.v1.NodePoolAutoscaling.Builder, com.google.container.v1.NodePoolAutoscalingOrBuilder> desiredNodePoolAutoscalingBuilder_;
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public boolean hasDesiredNodePoolAutoscaling() {
      return desiredNodePoolAutoscalingBuilder_ != null || desiredNodePoolAutoscaling_ != null;
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public com.google.container.v1.NodePoolAutoscaling getDesiredNodePoolAutoscaling() {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        return desiredNodePoolAutoscaling_ == null ? com.google.container.v1.NodePoolAutoscaling.getDefaultInstance() : desiredNodePoolAutoscaling_;
      } else {
        return desiredNodePoolAutoscalingBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public Builder setDesiredNodePoolAutoscaling(com.google.container.v1.NodePoolAutoscaling value) {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        desiredNodePoolAutoscaling_ = value;
        onChanged();
      } else {
        desiredNodePoolAutoscalingBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public Builder setDesiredNodePoolAutoscaling(
        com.google.container.v1.NodePoolAutoscaling.Builder builderForValue) {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        desiredNodePoolAutoscaling_ = builderForValue.build();
        onChanged();
      } else {
        desiredNodePoolAutoscalingBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public Builder mergeDesiredNodePoolAutoscaling(com.google.container.v1.NodePoolAutoscaling value) {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        if (desiredNodePoolAutoscaling_ != null) {
          desiredNodePoolAutoscaling_ =
            com.google.container.v1.NodePoolAutoscaling.newBuilder(desiredNodePoolAutoscaling_).mergeFrom(value).buildPartial();
        } else {
          desiredNodePoolAutoscaling_ = value;
        }
        onChanged();
      } else {
        desiredNodePoolAutoscalingBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public Builder clearDesiredNodePoolAutoscaling() {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        desiredNodePoolAutoscaling_ = null;
        onChanged();
      } else {
        desiredNodePoolAutoscaling_ = null;
        desiredNodePoolAutoscalingBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public com.google.container.v1.NodePoolAutoscaling.Builder getDesiredNodePoolAutoscalingBuilder() {
      
      onChanged();
      return getDesiredNodePoolAutoscalingFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    public com.google.container.v1.NodePoolAutoscalingOrBuilder getDesiredNodePoolAutoscalingOrBuilder() {
      if (desiredNodePoolAutoscalingBuilder_ != null) {
        return desiredNodePoolAutoscalingBuilder_.getMessageOrBuilder();
      } else {
        return desiredNodePoolAutoscaling_ == null ?
            com.google.container.v1.NodePoolAutoscaling.getDefaultInstance() : desiredNodePoolAutoscaling_;
      }
    }
    /**
     * <pre>
     * Autoscaler configuration for the node pool specified in
     * desired_node_pool_id. If there is only one pool in the
     * cluster and desired_node_pool_id is not provided then
     * the change applies to that single node pool.
     * </pre>
     *
     * <code>.google.container.v1.NodePoolAutoscaling desired_node_pool_autoscaling = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.NodePoolAutoscaling, com.google.container.v1.NodePoolAutoscaling.Builder, com.google.container.v1.NodePoolAutoscalingOrBuilder> 
        getDesiredNodePoolAutoscalingFieldBuilder() {
      if (desiredNodePoolAutoscalingBuilder_ == null) {
        desiredNodePoolAutoscalingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.container.v1.NodePoolAutoscaling, com.google.container.v1.NodePoolAutoscaling.Builder, com.google.container.v1.NodePoolAutoscalingOrBuilder>(
                getDesiredNodePoolAutoscaling(),
                getParentForChildren(),
                isClean());
        desiredNodePoolAutoscaling_ = null;
      }
      return desiredNodePoolAutoscalingBuilder_;
    }

    private com.google.protobuf.LazyStringList desiredLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureDesiredLocationsIsMutable() {
      if (!((bitField0_ & 0x00000040) == 0x00000040)) {
        desiredLocations_ = new com.google.protobuf.LazyStringArrayList(desiredLocations_);
        bitField0_ |= 0x00000040;
       }
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getDesiredLocationsList() {
      return desiredLocations_.getUnmodifiableView();
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public int getDesiredLocationsCount() {
      return desiredLocations_.size();
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public java.lang.String getDesiredLocations(int index) {
      return desiredLocations_.get(index);
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredLocationsBytes(int index) {
      return desiredLocations_.getByteString(index);
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public Builder setDesiredLocations(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureDesiredLocationsIsMutable();
      desiredLocations_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public Builder addDesiredLocations(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureDesiredLocationsIsMutable();
      desiredLocations_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public Builder addAllDesiredLocations(
        java.lang.Iterable<java.lang.String> values) {
      ensureDesiredLocationsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, desiredLocations_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public Builder clearDesiredLocations() {
      desiredLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The desired list of Google Compute Engine
     * [locations](/compute/docs/zones#available) in which the cluster's nodes
     * should be located. Changing the locations a cluster is in will result
     * in nodes being either created or removed from the cluster, depending on
     * whether locations are being added or removed.
     * This list must always include the cluster's primary zone.
     * </pre>
     *
     * <code>repeated string desired_locations = 10;</code>
     */
    public Builder addDesiredLocationsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureDesiredLocationsIsMutable();
      desiredLocations_.add(value);
      onChanged();
      return this;
    }

    private com.google.container.v1.MasterAuthorizedNetworksConfig desiredMasterAuthorizedNetworksConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.MasterAuthorizedNetworksConfig, com.google.container.v1.MasterAuthorizedNetworksConfig.Builder, com.google.container.v1.MasterAuthorizedNetworksConfigOrBuilder> desiredMasterAuthorizedNetworksConfigBuilder_;
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public boolean hasDesiredMasterAuthorizedNetworksConfig() {
      return desiredMasterAuthorizedNetworksConfigBuilder_ != null || desiredMasterAuthorizedNetworksConfig_ != null;
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public com.google.container.v1.MasterAuthorizedNetworksConfig getDesiredMasterAuthorizedNetworksConfig() {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        return desiredMasterAuthorizedNetworksConfig_ == null ? com.google.container.v1.MasterAuthorizedNetworksConfig.getDefaultInstance() : desiredMasterAuthorizedNetworksConfig_;
      } else {
        return desiredMasterAuthorizedNetworksConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public Builder setDesiredMasterAuthorizedNetworksConfig(com.google.container.v1.MasterAuthorizedNetworksConfig value) {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        desiredMasterAuthorizedNetworksConfig_ = value;
        onChanged();
      } else {
        desiredMasterAuthorizedNetworksConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public Builder setDesiredMasterAuthorizedNetworksConfig(
        com.google.container.v1.MasterAuthorizedNetworksConfig.Builder builderForValue) {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        desiredMasterAuthorizedNetworksConfig_ = builderForValue.build();
        onChanged();
      } else {
        desiredMasterAuthorizedNetworksConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public Builder mergeDesiredMasterAuthorizedNetworksConfig(com.google.container.v1.MasterAuthorizedNetworksConfig value) {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        if (desiredMasterAuthorizedNetworksConfig_ != null) {
          desiredMasterAuthorizedNetworksConfig_ =
            com.google.container.v1.MasterAuthorizedNetworksConfig.newBuilder(desiredMasterAuthorizedNetworksConfig_).mergeFrom(value).buildPartial();
        } else {
          desiredMasterAuthorizedNetworksConfig_ = value;
        }
        onChanged();
      } else {
        desiredMasterAuthorizedNetworksConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public Builder clearDesiredMasterAuthorizedNetworksConfig() {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        desiredMasterAuthorizedNetworksConfig_ = null;
        onChanged();
      } else {
        desiredMasterAuthorizedNetworksConfig_ = null;
        desiredMasterAuthorizedNetworksConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public com.google.container.v1.MasterAuthorizedNetworksConfig.Builder getDesiredMasterAuthorizedNetworksConfigBuilder() {
      
      onChanged();
      return getDesiredMasterAuthorizedNetworksConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    public com.google.container.v1.MasterAuthorizedNetworksConfigOrBuilder getDesiredMasterAuthorizedNetworksConfigOrBuilder() {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ != null) {
        return desiredMasterAuthorizedNetworksConfigBuilder_.getMessageOrBuilder();
      } else {
        return desiredMasterAuthorizedNetworksConfig_ == null ?
            com.google.container.v1.MasterAuthorizedNetworksConfig.getDefaultInstance() : desiredMasterAuthorizedNetworksConfig_;
      }
    }
    /**
     * <pre>
     * Master authorized networks is a Beta feature.
     * The desired configuration options for master authorized networks feature.
     * </pre>
     *
     * <code>.google.container.v1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.container.v1.MasterAuthorizedNetworksConfig, com.google.container.v1.MasterAuthorizedNetworksConfig.Builder, com.google.container.v1.MasterAuthorizedNetworksConfigOrBuilder> 
        getDesiredMasterAuthorizedNetworksConfigFieldBuilder() {
      if (desiredMasterAuthorizedNetworksConfigBuilder_ == null) {
        desiredMasterAuthorizedNetworksConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.container.v1.MasterAuthorizedNetworksConfig, com.google.container.v1.MasterAuthorizedNetworksConfig.Builder, com.google.container.v1.MasterAuthorizedNetworksConfigOrBuilder>(
                getDesiredMasterAuthorizedNetworksConfig(),
                getParentForChildren(),
                isClean());
        desiredMasterAuthorizedNetworksConfig_ = null;
      }
      return desiredMasterAuthorizedNetworksConfigBuilder_;
    }

    private java.lang.Object desiredMasterVersion_ = "";
    /**
     * <pre>
     * The Kubernetes version to change the master to. The only valid value is the
     * latest supported version. Use "-" to have the server automatically select
     * the latest version.
     * </pre>
     *
     * <code>string desired_master_version = 100;</code>
     */
    public java.lang.String getDesiredMasterVersion() {
      java.lang.Object ref = desiredMasterVersion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        desiredMasterVersion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The Kubernetes version to change the master to. The only valid value is the
     * latest supported version. Use "-" to have the server automatically select
     * the latest version.
     * </pre>
     *
     * <code>string desired_master_version = 100;</code>
     */
    public com.google.protobuf.ByteString
        getDesiredMasterVersionBytes() {
      java.lang.Object ref = desiredMasterVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        desiredMasterVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The Kubernetes version to change the master to. The only valid value is the
     * latest supported version. Use "-" to have the server automatically select
     * the latest version.
     * </pre>
     *
     * <code>string desired_master_version = 100;</code>
     */
    public Builder setDesiredMasterVersion(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      desiredMasterVersion_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The Kubernetes version to change the master to. The only valid value is the
     * latest supported version. Use "-" to have the server automatically select
     * the latest version.
     * </pre>
     *
     * <code>string desired_master_version = 100;</code>
     */
    public Builder clearDesiredMasterVersion() {
      
      desiredMasterVersion_ = getDefaultInstance().getDesiredMasterVersion();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The Kubernetes version to change the master to. The only valid value is the
     * latest supported version. Use "-" to have the server automatically select
     * the latest version.
     * </pre>
     *
     * <code>string desired_master_version = 100;</code>
     */
    public Builder setDesiredMasterVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      desiredMasterVersion_ = value;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:google.container.v1.ClusterUpdate)
  }

  // @@protoc_insertion_point(class_scope:google.container.v1.ClusterUpdate)
  private static final com.google.container.v1.ClusterUpdate DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.container.v1.ClusterUpdate();
  }

  public static com.google.container.v1.ClusterUpdate getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ClusterUpdate>
      PARSER = new com.google.protobuf.AbstractParser<ClusterUpdate>() {
    public ClusterUpdate parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ClusterUpdate(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ClusterUpdate> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ClusterUpdate> getParserForType() {
    return PARSER;
  }

  public com.google.container.v1.ClusterUpdate getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

