All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dataproc.v1.GkeNodePoolTarget Maven / Gradle / Ivy

There is a newer version: 4.53.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dataproc/v1/shared.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.dataproc.v1;

/**
 *
 *
 * 
 * GKE node pools that Dataproc workloads run on.
 * 
* * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolTarget} */ public final class GkeNodePoolTarget extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolTarget) GkeNodePoolTargetOrBuilder { private static final long serialVersionUID = 0L; // Use GkeNodePoolTarget.newBuilder() to construct. private GkeNodePoolTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GkeNodePoolTarget() { nodePool_ = ""; roles_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new GkeNodePoolTarget(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataproc.v1.SharedProto .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataproc.v1.SharedProto .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataproc.v1.GkeNodePoolTarget.class, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder.class); } /** * * *
   * `Role` specifies the tasks that will run on the node pool. Roles can be
   * specific to workloads. Exactly one
   * [GkeNodePoolTarget][google.cloud.dataproc.v1.GkeNodePoolTarget] within the
   * virtual cluster must have the `DEFAULT` role, which is used to run all
   * workloads that are not associated with a node pool.
   * 
* * Protobuf enum {@code google.cloud.dataproc.v1.GkeNodePoolTarget.Role} */ public enum Role implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Role is unspecified.
     * 
* * ROLE_UNSPECIFIED = 0; */ ROLE_UNSPECIFIED(0), /** * * *
     * At least one node pool must have the `DEFAULT` role.
     * Work assigned to a role that is not associated with a node pool
     * is assigned to the node pool with the `DEFAULT` role. For example,
     * work assigned to the `CONTROLLER` role will be assigned to the node pool
     * with the `DEFAULT` role if no node pool has the `CONTROLLER` role.
     * 
* * DEFAULT = 1; */ DEFAULT(1), /** * * *
     * Run work associated with the Dataproc control plane (for example,
     * controllers and webhooks). Very low resource requirements.
     * 
* * CONTROLLER = 2; */ CONTROLLER(2), /** * * *
     * Run work associated with a Spark driver of a job.
     * 
* * SPARK_DRIVER = 3; */ SPARK_DRIVER(3), /** * * *
     * Run work associated with a Spark executor of a job.
     * 
* * SPARK_EXECUTOR = 4; */ SPARK_EXECUTOR(4), UNRECOGNIZED(-1), ; /** * * *
     * Role is unspecified.
     * 
* * ROLE_UNSPECIFIED = 0; */ public static final int ROLE_UNSPECIFIED_VALUE = 0; /** * * *
     * At least one node pool must have the `DEFAULT` role.
     * Work assigned to a role that is not associated with a node pool
     * is assigned to the node pool with the `DEFAULT` role. For example,
     * work assigned to the `CONTROLLER` role will be assigned to the node pool
     * with the `DEFAULT` role if no node pool has the `CONTROLLER` role.
     * 
* * DEFAULT = 1; */ public static final int DEFAULT_VALUE = 1; /** * * *
     * Run work associated with the Dataproc control plane (for example,
     * controllers and webhooks). Very low resource requirements.
     * 
* * CONTROLLER = 2; */ public static final int CONTROLLER_VALUE = 2; /** * * *
     * Run work associated with a Spark driver of a job.
     * 
* * SPARK_DRIVER = 3; */ public static final int SPARK_DRIVER_VALUE = 3; /** * * *
     * Run work associated with a Spark executor of a job.
     * 
* * SPARK_EXECUTOR = 4; */ public static final int SPARK_EXECUTOR_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Role valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Role forNumber(int value) { switch (value) { case 0: return ROLE_UNSPECIFIED; case 1: return DEFAULT; case 2: return CONTROLLER; case 3: return SPARK_DRIVER; case 4: return SPARK_EXECUTOR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Role findValueByNumber(int number) { return Role.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDescriptor().getEnumTypes().get(0); } private static final Role[] VALUES = values(); public static Role valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Role(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.GkeNodePoolTarget.Role) } private int bitField0_; public static final int NODE_POOL_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object nodePool_ = ""; /** * * *
   * Required. The target GKE node pool.
   * Format:
   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
   * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The nodePool. */ @java.lang.Override public java.lang.String getNodePool() { java.lang.Object ref = nodePool_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodePool_ = s; return s; } } /** * * *
   * Required. The target GKE node pool.
   * Format:
   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
   * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for nodePool. */ @java.lang.Override public com.google.protobuf.ByteString getNodePoolBytes() { java.lang.Object ref = nodePool_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); nodePool_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ROLES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List roles_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role> roles_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>() { public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role convert( java.lang.Integer from) { com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role result = com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role.forNumber(from); return result == null ? com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role.UNRECOGNIZED : result; } }; /** * * *
   * Required. The roles associated with the GKE node pool.
   * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the roles. */ @java.lang.Override public java.util.List getRolesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>( roles_, roles_converter_); } /** * * *
   * Required. The roles associated with the GKE node pool.
   * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of roles. */ @java.lang.Override public int getRolesCount() { return roles_.size(); } /** * * *
   * Required. The roles associated with the GKE node pool.
   * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The roles at the given index. */ @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role getRoles(int index) { return roles_converter_.convert(roles_.get(index)); } /** * * *
   * Required. The roles associated with the GKE node pool.
   * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for roles. */ @java.lang.Override public java.util.List getRolesValueList() { return roles_; } /** * * *
   * Required. The roles associated with the GKE node pool.
   * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. */ @java.lang.Override public int getRolesValue(int index) { return roles_.get(index); } private int rolesMemoizedSerializedSize; public static final int NODE_POOL_CONFIG_FIELD_NUMBER = 3; private com.google.cloud.dataproc.v1.GkeNodePoolConfig nodePoolConfig_; /** * * *
   * Input only. The configuration for the GKE node pool.
   *
   * If specified, Dataproc attempts to create a node pool with the
   * specified shape. If one with the same name already exists, it is
   * verified against all specified fields. If a field differs, the
   * virtual cluster creation will fail.
   *
   * If omitted, any node pool with the specified name is used. If a
   * node pool with the specified name does not exist, Dataproc create a
   * node pool with default values.
   *
   * This is an input only field. It will not be returned by the API.
   * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * * * @return Whether the nodePoolConfig field is set. */ @java.lang.Override public boolean hasNodePoolConfig() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Input only. The configuration for the GKE node pool.
   *
   * If specified, Dataproc attempts to create a node pool with the
   * specified shape. If one with the same name already exists, it is
   * verified against all specified fields. If a field differs, the
   * virtual cluster creation will fail.
   *
   * If omitted, any node pool with the specified name is used. If a
   * node pool with the specified name does not exist, Dataproc create a
   * node pool with default values.
   *
   * This is an input only field. It will not be returned by the API.
   * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * * * @return The nodePoolConfig. */ @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolConfig getNodePoolConfig() { return nodePoolConfig_ == null ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() : nodePoolConfig_; } /** * * *
   * Input only. The configuration for the GKE node pool.
   *
   * If specified, Dataproc attempts to create a node pool with the
   * specified shape. If one with the same name already exists, it is
   * verified against all specified fields. If a field differs, the
   * virtual cluster creation will fail.
   *
   * If omitted, any node pool with the specified name is used. If a
   * node pool with the specified name does not exist, Dataproc create a
   * node pool with default values.
   *
   * This is an input only field. It will not be returned by the API.
   * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder getNodePoolConfigOrBuilder() { return nodePoolConfig_ == null ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() : nodePoolConfig_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodePool_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodePool_); } if (getRolesList().size() > 0) { output.writeUInt32NoTag(18); output.writeUInt32NoTag(rolesMemoizedSerializedSize); } for (int i = 0; i < roles_.size(); i++) { output.writeEnumNoTag(roles_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getNodePoolConfig()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodePool_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodePool_); } { int dataSize = 0; for (int i = 0; i < roles_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(roles_.get(i)); } size += dataSize; if (!getRolesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } rolesMemoizedSerializedSize = dataSize; } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNodePoolConfig()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dataproc.v1.GkeNodePoolTarget)) { return super.equals(obj); } com.google.cloud.dataproc.v1.GkeNodePoolTarget other = (com.google.cloud.dataproc.v1.GkeNodePoolTarget) obj; if (!getNodePool().equals(other.getNodePool())) return false; if (!roles_.equals(other.roles_)) return false; if (hasNodePoolConfig() != other.hasNodePoolConfig()) return false; if (hasNodePoolConfig()) { if (!getNodePoolConfig().equals(other.getNodePoolConfig())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NODE_POOL_FIELD_NUMBER; hash = (53 * hash) + getNodePool().hashCode(); if (getRolesCount() > 0) { hash = (37 * hash) + ROLES_FIELD_NUMBER; hash = (53 * hash) + roles_.hashCode(); } if (hasNodePoolConfig()) { hash = (37 * hash) + NODE_POOL_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getNodePoolConfig().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dataproc.v1.GkeNodePoolTarget prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * GKE node pools that Dataproc workloads run on.
   * 
* * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolTarget} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolTarget) com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataproc.v1.SharedProto .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataproc.v1.SharedProto .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataproc.v1.GkeNodePoolTarget.class, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder.class); } // Construct using com.google.cloud.dataproc.v1.GkeNodePoolTarget.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getNodePoolConfigFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; nodePool_ = ""; roles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); nodePoolConfig_ = null; if (nodePoolConfigBuilder_ != null) { nodePoolConfigBuilder_.dispose(); nodePoolConfigBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dataproc.v1.SharedProto .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; } @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolTarget getDefaultInstanceForType() { return com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolTarget build() { com.google.cloud.dataproc.v1.GkeNodePoolTarget result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolTarget buildPartial() { com.google.cloud.dataproc.v1.GkeNodePoolTarget result = new com.google.cloud.dataproc.v1.GkeNodePoolTarget(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.dataproc.v1.GkeNodePoolTarget result) { if (((bitField0_ & 0x00000002) != 0)) { roles_ = java.util.Collections.unmodifiableList(roles_); bitField0_ = (bitField0_ & ~0x00000002); } result.roles_ = roles_; } private void buildPartial0(com.google.cloud.dataproc.v1.GkeNodePoolTarget result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.nodePool_ = nodePool_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.nodePoolConfig_ = nodePoolConfigBuilder_ == null ? nodePoolConfig_ : nodePoolConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dataproc.v1.GkeNodePoolTarget) { return mergeFrom((com.google.cloud.dataproc.v1.GkeNodePoolTarget) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dataproc.v1.GkeNodePoolTarget other) { if (other == com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance()) return this; if (!other.getNodePool().isEmpty()) { nodePool_ = other.nodePool_; bitField0_ |= 0x00000001; onChanged(); } if (!other.roles_.isEmpty()) { if (roles_.isEmpty()) { roles_ = other.roles_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureRolesIsMutable(); roles_.addAll(other.roles_); } onChanged(); } if (other.hasNodePoolConfig()) { mergeNodePoolConfig(other.getNodePoolConfig()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { nodePool_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { int tmpRaw = input.readEnum(); ensureRolesIsMutable(); roles_.add(tmpRaw); break; } // case 16 case 18: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while (input.getBytesUntilLimit() > 0) { int tmpRaw = input.readEnum(); ensureRolesIsMutable(); roles_.add(tmpRaw); } input.popLimit(oldLimit); break; } // case 18 case 26: { input.readMessage(getNodePoolConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object nodePool_ = ""; /** * * *
     * Required. The target GKE node pool.
     * Format:
     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
     * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The nodePool. */ public java.lang.String getNodePool() { java.lang.Object ref = nodePool_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodePool_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The target GKE node pool.
     * Format:
     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
     * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for nodePool. */ public com.google.protobuf.ByteString getNodePoolBytes() { java.lang.Object ref = nodePool_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); nodePool_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The target GKE node pool.
     * Format:
     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
     * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The nodePool to set. * @return This builder for chaining. */ public Builder setNodePool(java.lang.String value) { if (value == null) { throw new NullPointerException(); } nodePool_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. The target GKE node pool.
     * Format:
     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
     * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearNodePool() { nodePool_ = getDefaultInstance().getNodePool(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The target GKE node pool.
     * Format:
     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
     * 
* * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for nodePool to set. * @return This builder for chaining. */ public Builder setNodePoolBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); nodePool_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.util.List roles_ = java.util.Collections.emptyList(); private void ensureRolesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { roles_ = new java.util.ArrayList(roles_); bitField0_ |= 0x00000002; } } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the roles. */ public java.util.List getRolesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>( roles_, roles_converter_); } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of roles. */ public int getRolesCount() { return roles_.size(); } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The roles at the given index. */ public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role getRoles(int index) { return roles_converter_.convert(roles_.get(index)); } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The roles to set. * @return This builder for chaining. */ public Builder setRoles(int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.set(index, value.getNumber()); onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The roles to add. * @return This builder for chaining. */ public Builder addRoles(com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.add(value.getNumber()); onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The roles to add. * @return This builder for chaining. */ public Builder addAllRoles( java.lang.Iterable values) { ensureRolesIsMutable(); for (com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value : values) { roles_.add(value.getNumber()); } onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearRoles() { roles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for roles. */ public java.util.List getRolesValueList() { return java.util.Collections.unmodifiableList(roles_); } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. */ public int getRolesValue(int index) { return roles_.get(index); } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The enum numeric value on the wire for roles to set. * @return This builder for chaining. */ public Builder setRolesValue(int index, int value) { ensureRolesIsMutable(); roles_.set(index, value); onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for roles to add. * @return This builder for chaining. */ public Builder addRolesValue(int value) { ensureRolesIsMutable(); roles_.add(value); onChanged(); return this; } /** * * *
     * Required. The roles associated with the GKE node pool.
     * 
* * * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The enum numeric values on the wire for roles to add. * @return This builder for chaining. */ public Builder addAllRolesValue(java.lang.Iterable values) { ensureRolesIsMutable(); for (int value : values) { roles_.add(value); } onChanged(); return this; } private com.google.cloud.dataproc.v1.GkeNodePoolConfig nodePoolConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dataproc.v1.GkeNodePoolConfig, com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder> nodePoolConfigBuilder_; /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * * * @return Whether the nodePoolConfig field is set. */ public boolean hasNodePoolConfig() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * * * @return The nodePoolConfig. */ public com.google.cloud.dataproc.v1.GkeNodePoolConfig getNodePoolConfig() { if (nodePoolConfigBuilder_ == null) { return nodePoolConfig_ == null ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() : nodePoolConfig_; } else { return nodePoolConfigBuilder_.getMessage(); } } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public Builder setNodePoolConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig value) { if (nodePoolConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } nodePoolConfig_ = value; } else { nodePoolConfigBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public Builder setNodePoolConfig( com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder builderForValue) { if (nodePoolConfigBuilder_ == null) { nodePoolConfig_ = builderForValue.build(); } else { nodePoolConfigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public Builder mergeNodePoolConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig value) { if (nodePoolConfigBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && nodePoolConfig_ != null && nodePoolConfig_ != com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance()) { getNodePoolConfigBuilder().mergeFrom(value); } else { nodePoolConfig_ = value; } } else { nodePoolConfigBuilder_.mergeFrom(value); } if (nodePoolConfig_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public Builder clearNodePoolConfig() { bitField0_ = (bitField0_ & ~0x00000004); nodePoolConfig_ = null; if (nodePoolConfigBuilder_ != null) { nodePoolConfigBuilder_.dispose(); nodePoolConfigBuilder_ = null; } onChanged(); return this; } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder getNodePoolConfigBuilder() { bitField0_ |= 0x00000004; onChanged(); return getNodePoolConfigFieldBuilder().getBuilder(); } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ public com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder getNodePoolConfigOrBuilder() { if (nodePoolConfigBuilder_ != null) { return nodePoolConfigBuilder_.getMessageOrBuilder(); } else { return nodePoolConfig_ == null ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() : nodePoolConfig_; } } /** * * *
     * Input only. The configuration for the GKE node pool.
     *
     * If specified, Dataproc attempts to create a node pool with the
     * specified shape. If one with the same name already exists, it is
     * verified against all specified fields. If a field differs, the
     * virtual cluster creation will fail.
     *
     * If omitted, any node pool with the specified name is used. If a
     * node pool with the specified name does not exist, Dataproc create a
     * node pool with default values.
     *
     * This is an input only field. It will not be returned by the API.
     * 
* * * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dataproc.v1.GkeNodePoolConfig, com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder> getNodePoolConfigFieldBuilder() { if (nodePoolConfigBuilder_ == null) { nodePoolConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dataproc.v1.GkeNodePoolConfig, com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder>( getNodePoolConfig(), getParentForChildren(), isClean()); nodePoolConfig_ = null; } return nodePoolConfigBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.GkeNodePoolTarget) } // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolTarget) private static final com.google.cloud.dataproc.v1.GkeNodePoolTarget DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GkeNodePoolTarget(); } public static com.google.cloud.dataproc.v1.GkeNodePoolTarget getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GkeNodePoolTarget parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dataproc.v1.GkeNodePoolTarget getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy