Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* A nodepool is a set of nodes dedicated for a given user's compute needs.
* This compute will typically be consumed by runners and in the future other objects
* like UI modules may be assigned to node pools.
*
*
* Protobuf type {@code clarifai.api.Nodepool}
*/
public final class Nodepool extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Nodepool)
NodepoolOrBuilder {
private static final long serialVersionUID = 0L;
// Use Nodepool.newBuilder() to construct.
private Nodepool(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Nodepool() {
id_ = "";
userId_ = "";
capacityTypes_ = java.util.Collections.emptyList();
instanceTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Nodepool();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Nodepool(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
userId_ = s;
break;
}
case 26: {
com.clarifai.grpc.api.CloudRegion.Builder subBuilder = null;
if (cloudRegion_ != null) {
subBuilder = cloudRegion_.toBuilder();
}
cloudRegion_ = input.readMessage(com.clarifai.grpc.api.CloudRegion.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cloudRegion_);
cloudRegion_ = subBuilder.buildPartial();
}
break;
}
case 32: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
capacityTypes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
capacityTypes_.add(rawValue);
break;
}
case 34: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
capacityTypes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
capacityTypes_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
instanceTypes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
instanceTypes_.add(s);
break;
}
case 72: {
minInstances_ = input.readUInt32();
break;
}
case 80: {
maxInstances_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
capacityTypes_ = java.util.Collections.unmodifiableList(capacityTypes_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
instanceTypes_ = instanceTypes_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Nodepool_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Nodepool_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Nodepool.class, com.clarifai.grpc.api.Nodepool.Builder.class);
}
/**
*
* Type of nodes that are ok for instances in this pool.
* If both spot and on-demand are provided then the runner will be able to run on either
* with a preference for spot until they are not available.
*
*
* Protobuf enum {@code clarifai.api.Nodepool.CapacityType}
*/
public enum CapacityType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UKNOWN_CAPACITY_TYPE = 0;
*/
UKNOWN_CAPACITY_TYPE(0),
/**
* ONDEMAND_TYPE = 1;
*/
ONDEMAND_TYPE(1),
/**
* SPOT_TYPE = 2;
*/
SPOT_TYPE(2),
UNRECOGNIZED(-1),
;
/**
* UKNOWN_CAPACITY_TYPE = 0;
*/
public static final int UKNOWN_CAPACITY_TYPE_VALUE = 0;
/**
* ONDEMAND_TYPE = 1;
*/
public static final int ONDEMAND_TYPE_VALUE = 1;
/**
* SPOT_TYPE = 2;
*/
public static final int SPOT_TYPE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CapacityType 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 CapacityType forNumber(int value) {
switch (value) {
case 0: return UKNOWN_CAPACITY_TYPE;
case 1: return ONDEMAND_TYPE;
case 2: return SPOT_TYPE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CapacityType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CapacityType findValueByNumber(int number) {
return CapacityType.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.clarifai.grpc.api.Nodepool.getDescriptor().getEnumTypes().get(0);
}
private static final CapacityType[] VALUES = values();
public static CapacityType 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 CapacityType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:clarifai.api.Nodepool.CapacityType)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object userId_;
/**
*
*
* .clarifai.api.CloudRegion cloud_region = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.CloudRegionOrBuilder getCloudRegionOrBuilder() {
return getCloudRegion();
}
public static final int CAPACITY_TYPES_FIELD_NUMBER = 4;
private java.util.List capacityTypes_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.clarifai.grpc.api.Nodepool.CapacityType> capacityTypes_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.clarifai.grpc.api.Nodepool.CapacityType>() {
public com.clarifai.grpc.api.Nodepool.CapacityType convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.Nodepool.CapacityType result = com.clarifai.grpc.api.Nodepool.CapacityType.valueOf(from);
return result == null ? com.clarifai.grpc.api.Nodepool.CapacityType.UNRECOGNIZED : result;
}
};
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return A list containing the capacityTypes.
*/
@java.lang.Override
public java.util.List getCapacityTypesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.clarifai.grpc.api.Nodepool.CapacityType>(capacityTypes_, capacityTypes_converter_);
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return The count of capacityTypes.
*/
@java.lang.Override
public int getCapacityTypesCount() {
return capacityTypes_.size();
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index of the element to return.
* @return The capacityTypes at the given index.
*/
@java.lang.Override
public com.clarifai.grpc.api.Nodepool.CapacityType getCapacityTypes(int index) {
return capacityTypes_converter_.convert(capacityTypes_.get(index));
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return A list containing the enum numeric values on the wire for capacityTypes.
*/
@java.lang.Override
public java.util.List
getCapacityTypesValueList() {
return capacityTypes_;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of capacityTypes at the given index.
*/
@java.lang.Override
public int getCapacityTypesValue(int index) {
return capacityTypes_.get(index);
}
private int capacityTypesMemoizedSerializedSize;
public static final int INSTANCE_TYPES_FIELD_NUMBER = 8;
private com.google.protobuf.LazyStringList instanceTypes_;
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @return A list containing the instanceTypes.
*/
public com.google.protobuf.ProtocolStringList
getInstanceTypesList() {
return instanceTypes_;
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @return The count of instanceTypes.
*/
public int getInstanceTypesCount() {
return instanceTypes_.size();
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param index The index of the element to return.
* @return The instanceTypes at the given index.
*/
public java.lang.String getInstanceTypes(int index) {
return instanceTypes_.get(index);
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param index The index of the value to return.
* @return The bytes of the instanceTypes at the given index.
*/
public com.google.protobuf.ByteString
getInstanceTypesBytes(int index) {
return instanceTypes_.getByteString(index);
}
public static final int MIN_INSTANCES_FIELD_NUMBER = 9;
private int minInstances_;
/**
*
* Minimum number of instances in this nodepool. This allows the nodeool to scale down to this
* amount. A nodepool needs a minimum of 1 instance.
*
*
* uint32 min_instances = 9;
* @return The minInstances.
*/
@java.lang.Override
public int getMinInstances() {
return minInstances_;
}
public static final int MAX_INSTANCES_FIELD_NUMBER = 10;
private int maxInstances_;
/**
*
* An upper limit on the number of instances in this nodepool. This allows the nodepool to scale
* up to this amount.
*
*
* uint32 max_instances = 10;
* @return The maxInstances.
*/
@java.lang.Override
public int getMaxInstances() {
return maxInstances_;
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userId_);
}
if (cloudRegion_ != null) {
output.writeMessage(3, getCloudRegion());
}
if (getCapacityTypesList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(capacityTypesMemoizedSerializedSize);
}
for (int i = 0; i < capacityTypes_.size(); i++) {
output.writeEnumNoTag(capacityTypes_.get(i));
}
for (int i = 0; i < instanceTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, instanceTypes_.getRaw(i));
}
if (minInstances_ != 0) {
output.writeUInt32(9, minInstances_);
}
if (maxInstances_ != 0) {
output.writeUInt32(10, maxInstances_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userId_);
}
if (cloudRegion_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCloudRegion());
}
{
int dataSize = 0;
for (int i = 0; i < capacityTypes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(capacityTypes_.get(i));
}
size += dataSize;
if (!getCapacityTypesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}capacityTypesMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < instanceTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(instanceTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getInstanceTypesList().size();
}
if (minInstances_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(9, minInstances_);
}
if (maxInstances_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(10, maxInstances_);
}
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.clarifai.grpc.api.Nodepool)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Nodepool other = (com.clarifai.grpc.api.Nodepool) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getUserId()
.equals(other.getUserId())) return false;
if (hasCloudRegion() != other.hasCloudRegion()) return false;
if (hasCloudRegion()) {
if (!getCloudRegion()
.equals(other.getCloudRegion())) return false;
}
if (!capacityTypes_.equals(other.capacityTypes_)) return false;
if (!getInstanceTypesList()
.equals(other.getInstanceTypesList())) return false;
if (getMinInstances()
!= other.getMinInstances()) return false;
if (getMaxInstances()
!= other.getMaxInstances()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + USER_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserId().hashCode();
if (hasCloudRegion()) {
hash = (37 * hash) + CLOUD_REGION_FIELD_NUMBER;
hash = (53 * hash) + getCloudRegion().hashCode();
}
if (getCapacityTypesCount() > 0) {
hash = (37 * hash) + CAPACITY_TYPES_FIELD_NUMBER;
hash = (53 * hash) + capacityTypes_.hashCode();
}
if (getInstanceTypesCount() > 0) {
hash = (37 * hash) + INSTANCE_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getInstanceTypesList().hashCode();
}
hash = (37 * hash) + MIN_INSTANCES_FIELD_NUMBER;
hash = (53 * hash) + getMinInstances();
hash = (37 * hash) + MAX_INSTANCES_FIELD_NUMBER;
hash = (53 * hash) + getMaxInstances();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Nodepool parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Nodepool parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Nodepool 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.clarifai.grpc.api.Nodepool parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Nodepool 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.clarifai.grpc.api.Nodepool parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Nodepool 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.clarifai.grpc.api.Nodepool 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;
}
/**
*
* A nodepool is a set of nodes dedicated for a given user's compute needs.
* This compute will typically be consumed by runners and in the future other objects
* like UI modules may be assigned to node pools.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* The user defined ID of the nodepool.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object userId_ = "";
/**
*
*
* .clarifai.api.CloudRegion cloud_region = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CloudRegion, com.clarifai.grpc.api.CloudRegion.Builder, com.clarifai.grpc.api.CloudRegionOrBuilder>
getCloudRegionFieldBuilder() {
if (cloudRegionBuilder_ == null) {
cloudRegionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CloudRegion, com.clarifai.grpc.api.CloudRegion.Builder, com.clarifai.grpc.api.CloudRegionOrBuilder>(
getCloudRegion(),
getParentForChildren(),
isClean());
cloudRegion_ = null;
}
return cloudRegionBuilder_;
}
private java.util.List capacityTypes_ =
java.util.Collections.emptyList();
private void ensureCapacityTypesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
capacityTypes_ = new java.util.ArrayList(capacityTypes_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return A list containing the capacityTypes.
*/
public java.util.List getCapacityTypesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.clarifai.grpc.api.Nodepool.CapacityType>(capacityTypes_, capacityTypes_converter_);
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return The count of capacityTypes.
*/
public int getCapacityTypesCount() {
return capacityTypes_.size();
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index of the element to return.
* @return The capacityTypes at the given index.
*/
public com.clarifai.grpc.api.Nodepool.CapacityType getCapacityTypes(int index) {
return capacityTypes_converter_.convert(capacityTypes_.get(index));
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index to set the value at.
* @param value The capacityTypes to set.
* @return This builder for chaining.
*/
public Builder setCapacityTypes(
int index, com.clarifai.grpc.api.Nodepool.CapacityType value) {
if (value == null) {
throw new NullPointerException();
}
ensureCapacityTypesIsMutable();
capacityTypes_.set(index, value.getNumber());
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param value The capacityTypes to add.
* @return This builder for chaining.
*/
public Builder addCapacityTypes(com.clarifai.grpc.api.Nodepool.CapacityType value) {
if (value == null) {
throw new NullPointerException();
}
ensureCapacityTypesIsMutable();
capacityTypes_.add(value.getNumber());
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param values The capacityTypes to add.
* @return This builder for chaining.
*/
public Builder addAllCapacityTypes(
java.lang.Iterable extends com.clarifai.grpc.api.Nodepool.CapacityType> values) {
ensureCapacityTypesIsMutable();
for (com.clarifai.grpc.api.Nodepool.CapacityType value : values) {
capacityTypes_.add(value.getNumber());
}
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return This builder for chaining.
*/
public Builder clearCapacityTypes() {
capacityTypes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @return A list containing the enum numeric values on the wire for capacityTypes.
*/
public java.util.List
getCapacityTypesValueList() {
return java.util.Collections.unmodifiableList(capacityTypes_);
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of capacityTypes at the given index.
*/
public int getCapacityTypesValue(int index) {
return capacityTypes_.get(index);
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for capacityTypes to set.
* @return This builder for chaining.
*/
public Builder setCapacityTypesValue(
int index, int value) {
ensureCapacityTypesIsMutable();
capacityTypes_.set(index, value);
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param value The enum numeric value on the wire for capacityTypes to add.
* @return This builder for chaining.
*/
public Builder addCapacityTypesValue(int value) {
ensureCapacityTypesIsMutable();
capacityTypes_.add(value);
onChanged();
return this;
}
/**
* repeated .clarifai.api.Nodepool.CapacityType capacity_types = 4;
* @param values The enum numeric values on the wire for capacityTypes to add.
* @return This builder for chaining.
*/
public Builder addAllCapacityTypesValue(
java.lang.Iterable values) {
ensureCapacityTypesIsMutable();
for (int value : values) {
capacityTypes_.add(value);
}
onChanged();
return this;
}
private com.google.protobuf.LazyStringList instanceTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureInstanceTypesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
instanceTypes_ = new com.google.protobuf.LazyStringArrayList(instanceTypes_);
bitField0_ |= 0x00000002;
}
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @return A list containing the instanceTypes.
*/
public com.google.protobuf.ProtocolStringList
getInstanceTypesList() {
return instanceTypes_.getUnmodifiableView();
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @return The count of instanceTypes.
*/
public int getInstanceTypesCount() {
return instanceTypes_.size();
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param index The index of the element to return.
* @return The instanceTypes at the given index.
*/
public java.lang.String getInstanceTypes(int index) {
return instanceTypes_.get(index);
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param index The index of the value to return.
* @return The bytes of the instanceTypes at the given index.
*/
public com.google.protobuf.ByteString
getInstanceTypesBytes(int index) {
return instanceTypes_.getByteString(index);
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param index The index to set the value at.
* @param value The instanceTypes to set.
* @return This builder for chaining.
*/
public Builder setInstanceTypes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceTypesIsMutable();
instanceTypes_.set(index, value);
onChanged();
return this;
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param value The instanceTypes to add.
* @return This builder for chaining.
*/
public Builder addInstanceTypes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceTypesIsMutable();
instanceTypes_.add(value);
onChanged();
return this;
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param values The instanceTypes to add.
* @return This builder for chaining.
*/
public Builder addAllInstanceTypes(
java.lang.Iterable values) {
ensureInstanceTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, instanceTypes_);
onChanged();
return this;
}
/**
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*////////////////////////////////////
* The instance types that will be available in this pool of nodes.
* Clarifai offers multiple different choices that combine cpu cores, memory and accelerator.
*
*
* repeated string instance_types = 8;
* @param value The bytes of the instanceTypes to add.
* @return This builder for chaining.
*/
public Builder addInstanceTypesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureInstanceTypesIsMutable();
instanceTypes_.add(value);
onChanged();
return this;
}
private int minInstances_ ;
/**
*
* Minimum number of instances in this nodepool. This allows the nodeool to scale down to this
* amount. A nodepool needs a minimum of 1 instance.
*
*
* uint32 min_instances = 9;
* @return The minInstances.
*/
@java.lang.Override
public int getMinInstances() {
return minInstances_;
}
/**
*
* Minimum number of instances in this nodepool. This allows the nodeool to scale down to this
* amount. A nodepool needs a minimum of 1 instance.
*
*
* uint32 min_instances = 9;
* @param value The minInstances to set.
* @return This builder for chaining.
*/
public Builder setMinInstances(int value) {
minInstances_ = value;
onChanged();
return this;
}
/**
*
* Minimum number of instances in this nodepool. This allows the nodeool to scale down to this
* amount. A nodepool needs a minimum of 1 instance.
*
*
* uint32 min_instances = 9;
* @return This builder for chaining.
*/
public Builder clearMinInstances() {
minInstances_ = 0;
onChanged();
return this;
}
private int maxInstances_ ;
/**
*
* An upper limit on the number of instances in this nodepool. This allows the nodepool to scale
* up to this amount.
*
*
* uint32 max_instances = 10;
* @return The maxInstances.
*/
@java.lang.Override
public int getMaxInstances() {
return maxInstances_;
}
/**
*
* An upper limit on the number of instances in this nodepool. This allows the nodepool to scale
* up to this amount.
*
*
* uint32 max_instances = 10;
* @param value The maxInstances to set.
* @return This builder for chaining.
*/
public Builder setMaxInstances(int value) {
maxInstances_ = value;
onChanged();
return this;
}
/**
*
* An upper limit on the number of instances in this nodepool. This allows the nodepool to scale
* up to this amount.
*
*
* uint32 max_instances = 10;
* @return This builder for chaining.
*/
public Builder clearMaxInstances() {
maxInstances_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.Nodepool)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Nodepool)
private static final com.clarifai.grpc.api.Nodepool DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Nodepool();
}
public static com.clarifai.grpc.api.Nodepool getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Nodepool parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Nodepool(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.Nodepool getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}