Class UpdateClusterRequest

  • All Implemented Interfaces:
    UpdateClusterRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class UpdateClusterRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements UpdateClusterRequestOrBuilder
     A request to update a cluster.
     
    Protobuf type google.cloud.dataproc.v1.UpdateClusterRequest
    See Also:
    Serialized Form
    • Field Detail

      • PROJECT_ID_FIELD_NUMBER

        public static final int PROJECT_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CLUSTER_NAME_FIELD_NUMBER

        public static final int CLUSTER_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER

        public static final int GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • UPDATE_MASK_FIELD_NUMBER

        public static final int UPDATE_MASK_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUEST_ID_FIELD_NUMBER

        public static final int REQUEST_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getProjectId

        public String getProjectId()
         Required. The ID of the Google Cloud Platform project the
         cluster belongs to.
         
        string project_id = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getProjectId in interface UpdateClusterRequestOrBuilder
        Returns:
        The projectId.
      • getProjectIdBytes

        public com.google.protobuf.ByteString getProjectIdBytes()
         Required. The ID of the Google Cloud Platform project the
         cluster belongs to.
         
        string project_id = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getProjectIdBytes in interface UpdateClusterRequestOrBuilder
        Returns:
        The bytes for projectId.
      • getRegion

        public String getRegion()
         Required. The Dataproc region in which to handle the request.
         
        string region = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRegion in interface UpdateClusterRequestOrBuilder
        Returns:
        The region.
      • getRegionBytes

        public com.google.protobuf.ByteString getRegionBytes()
         Required. The Dataproc region in which to handle the request.
         
        string region = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRegionBytes in interface UpdateClusterRequestOrBuilder
        Returns:
        The bytes for region.
      • getClusterNameBytes

        public com.google.protobuf.ByteString getClusterNameBytes()
         Required. The cluster name.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getClusterNameBytes in interface UpdateClusterRequestOrBuilder
        Returns:
        The bytes for clusterName.
      • hasCluster

        public boolean hasCluster()
         Required. The changes to the cluster.
         
        .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasCluster in interface UpdateClusterRequestOrBuilder
        Returns:
        Whether the cluster field is set.
      • getCluster

        public Cluster getCluster()
         Required. The changes to the cluster.
         
        .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCluster in interface UpdateClusterRequestOrBuilder
        Returns:
        The cluster.
      • hasGracefulDecommissionTimeout

        public boolean hasGracefulDecommissionTimeout()
         Optional. Timeout for graceful YARN decommissioning. Graceful
         decommissioning allows removing nodes from the cluster without
         interrupting jobs in progress. Timeout specifies how long to wait for jobs
         in progress to finish before forcefully removing nodes (and potentially
         interrupting jobs). Default timeout is 0 (for forceful decommission), and
         the maximum allowed timeout is 1 day. (see JSON representation of
         [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
        
         Only supported on Dataproc image versions 1.2 and higher.
         
        .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasGracefulDecommissionTimeout in interface UpdateClusterRequestOrBuilder
        Returns:
        Whether the gracefulDecommissionTimeout field is set.
      • getGracefulDecommissionTimeout

        public com.google.protobuf.Duration getGracefulDecommissionTimeout()
         Optional. Timeout for graceful YARN decommissioning. Graceful
         decommissioning allows removing nodes from the cluster without
         interrupting jobs in progress. Timeout specifies how long to wait for jobs
         in progress to finish before forcefully removing nodes (and potentially
         interrupting jobs). Default timeout is 0 (for forceful decommission), and
         the maximum allowed timeout is 1 day. (see JSON representation of
         [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
        
         Only supported on Dataproc image versions 1.2 and higher.
         
        .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getGracefulDecommissionTimeout in interface UpdateClusterRequestOrBuilder
        Returns:
        The gracefulDecommissionTimeout.
      • getGracefulDecommissionTimeoutOrBuilder

        public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder()
         Optional. Timeout for graceful YARN decommissioning. Graceful
         decommissioning allows removing nodes from the cluster without
         interrupting jobs in progress. Timeout specifies how long to wait for jobs
         in progress to finish before forcefully removing nodes (and potentially
         interrupting jobs). Default timeout is 0 (for forceful decommission), and
         the maximum allowed timeout is 1 day. (see JSON representation of
         [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
        
         Only supported on Dataproc image versions 1.2 and higher.
         
        .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getGracefulDecommissionTimeoutOrBuilder in interface UpdateClusterRequestOrBuilder
      • hasUpdateMask

        public boolean hasUpdateMask()
         Required. Specifies the path, relative to `Cluster`, of
         the field to update. For example, to change the number of workers
         in a cluster to 5, the `update_mask` parameter would be
         specified as `config.worker_config.num_instances`,
         and the `PATCH` request body would specify the new value, as follows:
        
             {
               "config":{
                 "workerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         Similarly, to change the number of preemptible workers in a cluster to 5,
         the `update_mask` parameter would be
         `config.secondary_worker_config.num_instances`, and the `PATCH` request
         body would be set as follows:
        
             {
               "config":{
                 "secondaryWorkerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         <strong>Note:</strong> Currently, only the following fields can be updated:
        
          <table>
          <tbody>
          <tr>
          <td><strong>Mask</strong></td>
          <td><strong>Purpose</strong></td>
          </tr>
          <tr>
          <td><strong><em>labels</em></strong></td>
          <td>Update labels</td>
          </tr>
          <tr>
          <td><strong><em>config.worker_config.num_instances</em></strong></td>
          <td>Resize primary worker group</td>
          </tr>
          <tr>
          <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
          <td>Resize secondary worker group</td>
          </tr>
          <tr>
          <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
          change autoscaling policies</td>
          </tr>
          </tbody>
          </table>
         
        .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasUpdateMask in interface UpdateClusterRequestOrBuilder
        Returns:
        Whether the updateMask field is set.
      • getUpdateMask

        public com.google.protobuf.FieldMask getUpdateMask()
         Required. Specifies the path, relative to `Cluster`, of
         the field to update. For example, to change the number of workers
         in a cluster to 5, the `update_mask` parameter would be
         specified as `config.worker_config.num_instances`,
         and the `PATCH` request body would specify the new value, as follows:
        
             {
               "config":{
                 "workerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         Similarly, to change the number of preemptible workers in a cluster to 5,
         the `update_mask` parameter would be
         `config.secondary_worker_config.num_instances`, and the `PATCH` request
         body would be set as follows:
        
             {
               "config":{
                 "secondaryWorkerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         <strong>Note:</strong> Currently, only the following fields can be updated:
        
          <table>
          <tbody>
          <tr>
          <td><strong>Mask</strong></td>
          <td><strong>Purpose</strong></td>
          </tr>
          <tr>
          <td><strong><em>labels</em></strong></td>
          <td>Update labels</td>
          </tr>
          <tr>
          <td><strong><em>config.worker_config.num_instances</em></strong></td>
          <td>Resize primary worker group</td>
          </tr>
          <tr>
          <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
          <td>Resize secondary worker group</td>
          </tr>
          <tr>
          <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
          change autoscaling policies</td>
          </tr>
          </tbody>
          </table>
         
        .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpdateMask in interface UpdateClusterRequestOrBuilder
        Returns:
        The updateMask.
      • getUpdateMaskOrBuilder

        public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder()
         Required. Specifies the path, relative to `Cluster`, of
         the field to update. For example, to change the number of workers
         in a cluster to 5, the `update_mask` parameter would be
         specified as `config.worker_config.num_instances`,
         and the `PATCH` request body would specify the new value, as follows:
        
             {
               "config":{
                 "workerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         Similarly, to change the number of preemptible workers in a cluster to 5,
         the `update_mask` parameter would be
         `config.secondary_worker_config.num_instances`, and the `PATCH` request
         body would be set as follows:
        
             {
               "config":{
                 "secondaryWorkerConfig":{
                   "numInstances":"5"
                 }
               }
             }
         <strong>Note:</strong> Currently, only the following fields can be updated:
        
          <table>
          <tbody>
          <tr>
          <td><strong>Mask</strong></td>
          <td><strong>Purpose</strong></td>
          </tr>
          <tr>
          <td><strong><em>labels</em></strong></td>
          <td>Update labels</td>
          </tr>
          <tr>
          <td><strong><em>config.worker_config.num_instances</em></strong></td>
          <td>Resize primary worker group</td>
          </tr>
          <tr>
          <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
          <td>Resize secondary worker group</td>
          </tr>
          <tr>
          <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
          change autoscaling policies</td>
          </tr>
          </tbody>
          </table>
         
        .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpdateMaskOrBuilder in interface UpdateClusterRequestOrBuilder
      • getRequestId

        public String getRequestId()
         Optional. A unique ID used to identify the request. If the server
         receives two
         [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
         with the same id, then the second request will be ignored and the
         first [google.longrunning.Operation][google.longrunning.Operation] created
         and stored in the backend is returned.
        
         It is recommended to always set this value to a
         [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
        
         The ID must contain only letters (a-z, A-Z), numbers (0-9),
         underscores (_), and hyphens (-). The maximum length is 40 characters.
         
        string request_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRequestId in interface UpdateClusterRequestOrBuilder
        Returns:
        The requestId.
      • getRequestIdBytes

        public com.google.protobuf.ByteString getRequestIdBytes()
         Optional. A unique ID used to identify the request. If the server
         receives two
         [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
         with the same id, then the second request will be ignored and the
         first [google.longrunning.Operation][google.longrunning.Operation] created
         and stored in the backend is returned.
        
         It is recommended to always set this value to a
         [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
        
         The ID must contain only letters (a-z, A-Z), numbers (0-9),
         underscores (_), and hyphens (-). The maximum length is 40 characters.
         
        string request_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRequestIdBytes in interface UpdateClusterRequestOrBuilder
        Returns:
        The bytes for requestId.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static UpdateClusterRequest parseFrom​(ByteBuffer data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static UpdateClusterRequest parseFrom​(ByteBuffer data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static UpdateClusterRequest parseFrom​(com.google.protobuf.ByteString data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static UpdateClusterRequest parseFrom​(com.google.protobuf.ByteString data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static UpdateClusterRequest parseFrom​(byte[] data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static UpdateClusterRequest parseFrom​(byte[] data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public UpdateClusterRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public UpdateClusterRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected UpdateClusterRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<UpdateClusterRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public UpdateClusterRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder