com.clarifai.grpc.api.ComputeCluster Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* We define a cluster here to be used in Nodepools and by the cloud provider.
* There will be one cloud provider per Cluster.
* This allows us to define Clusters that are VPCs within one physical cloud and have that
* managed by one cloud provider which can list all nodepools for that VPC to deploy them and
* orchestrate work within them.
*
*
* Protobuf type {@code clarifai.api.ComputeCluster}
*/
public final class ComputeCluster extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ComputeCluster)
ComputeClusterOrBuilder {
private static final long serialVersionUID = 0L;
// Use ComputeCluster.newBuilder() to construct.
private ComputeCluster(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ComputeCluster() {
id_ = "";
description_ = "";
region_ = "";
userId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ComputeCluster();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ComputeCluster(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
description_ = s;
break;
}
case 26: {
com.clarifai.grpc.api.CloudProvider.Builder subBuilder = null;
if (cloudProvider_ != null) {
subBuilder = cloudProvider_.toBuilder();
}
cloudProvider_ = input.readMessage(com.clarifai.grpc.api.CloudProvider.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cloudProvider_);
cloudProvider_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
region_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
userId_ = s;
break;
}
case 50: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 58: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (modifiedAt_ != null) {
subBuilder = modifiedAt_.toBuilder();
}
modifiedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modifiedAt_);
modifiedAt_ = subBuilder.buildPartial();
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ComputeCluster_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ComputeCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ComputeCluster.class, com.clarifai.grpc.api.ComputeCluster.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
* 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;
}
}
/**
* 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 DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLOUD_PROVIDER_FIELD_NUMBER = 3;
private com.clarifai.grpc.api.CloudProvider cloudProvider_;
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
* @return Whether the cloudProvider field is set.
*/
@java.lang.Override
public boolean hasCloudProvider() {
return cloudProvider_ != null;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
* @return The cloudProvider.
*/
@java.lang.Override
public com.clarifai.grpc.api.CloudProvider getCloudProvider() {
return cloudProvider_ == null ? com.clarifai.grpc.api.CloudProvider.getDefaultInstance() : cloudProvider_;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.CloudProviderOrBuilder getCloudProviderOrBuilder() {
return getCloudProvider();
}
public static final int REGION_FIELD_NUMBER = 4;
private volatile java.lang.Object region_;
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @return The region.
*/
@java.lang.Override
public java.lang.String getRegion() {
java.lang.Object ref = region_;
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();
region_ = s;
return s;
}
}
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @return The bytes for region.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object userId_;
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @return The userId.
*/
@java.lang.Override
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
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();
userId_ = s;
return s;
}
}
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @return The bytes for userId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 7;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
* @return Whether the modifiedAt field is set.
*/
@java.lang.Override
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
* @return The modifiedAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
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 {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (cloudProvider_ != null) {
output.writeMessage(3, getCloudProvider());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, region_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, userId_);
}
if (createdAt_ != null) {
output.writeMessage(6, getCreatedAt());
}
if (modifiedAt_ != null) {
output.writeMessage(7, getModifiedAt());
}
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(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (cloudProvider_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCloudProvider());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, region_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, userId_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getCreatedAt());
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getModifiedAt());
}
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.ComputeCluster)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ComputeCluster other = (com.clarifai.grpc.api.ComputeCluster) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasCloudProvider() != other.hasCloudProvider()) return false;
if (hasCloudProvider()) {
if (!getCloudProvider()
.equals(other.getCloudProvider())) return false;
}
if (!getRegion()
.equals(other.getRegion())) return false;
if (!getUserId()
.equals(other.getUserId())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (hasModifiedAt() != other.hasModifiedAt()) return false;
if (hasModifiedAt()) {
if (!getModifiedAt()
.equals(other.getModifiedAt())) 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) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasCloudProvider()) {
hash = (37 * hash) + CLOUD_PROVIDER_FIELD_NUMBER;
hash = (53 * hash) + getCloudProvider().hashCode();
}
hash = (37 * hash) + REGION_FIELD_NUMBER;
hash = (53 * hash) + getRegion().hashCode();
hash = (37 * hash) + USER_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserId().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
if (hasModifiedAt()) {
hash = (37 * hash) + MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + getModifiedAt().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ComputeCluster parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ComputeCluster 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.ComputeCluster parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ComputeCluster 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.ComputeCluster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ComputeCluster parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ComputeCluster parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ComputeCluster 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.ComputeCluster parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ComputeCluster 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.ComputeCluster parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ComputeCluster 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.ComputeCluster 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;
}
/**
*
* We define a cluster here to be used in Nodepools and by the cloud provider.
* There will be one cloud provider per Cluster.
* This allows us to define Clusters that are VPCs within one physical cloud and have that
* managed by one cloud provider which can list all nodepools for that VPC to deploy them and
* orchestrate work within them.
*
*
* Protobuf type {@code clarifai.api.ComputeCluster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ComputeCluster)
com.clarifai.grpc.api.ComputeClusterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ComputeCluster_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ComputeCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ComputeCluster.class, com.clarifai.grpc.api.ComputeCluster.Builder.class);
}
// Construct using com.clarifai.grpc.api.ComputeCluster.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
description_ = "";
if (cloudProviderBuilder_ == null) {
cloudProvider_ = null;
} else {
cloudProvider_ = null;
cloudProviderBuilder_ = null;
}
region_ = "";
userId_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ComputeCluster_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ComputeCluster getDefaultInstanceForType() {
return com.clarifai.grpc.api.ComputeCluster.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ComputeCluster build() {
com.clarifai.grpc.api.ComputeCluster result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ComputeCluster buildPartial() {
com.clarifai.grpc.api.ComputeCluster result = new com.clarifai.grpc.api.ComputeCluster(this);
result.id_ = id_;
result.description_ = description_;
if (cloudProviderBuilder_ == null) {
result.cloudProvider_ = cloudProvider_;
} else {
result.cloudProvider_ = cloudProviderBuilder_.build();
}
result.region_ = region_;
result.userId_ = userId_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
onBuilt();
return result;
}
@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.clarifai.grpc.api.ComputeCluster) {
return mergeFrom((com.clarifai.grpc.api.ComputeCluster)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ComputeCluster other) {
if (other == com.clarifai.grpc.api.ComputeCluster.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasCloudProvider()) {
mergeCloudProvider(other.getCloudProvider());
}
if (!other.getRegion().isEmpty()) {
region_ = other.region_;
onChanged();
}
if (!other.getUserId().isEmpty()) {
userId_ = other.userId_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.clarifai.grpc.api.ComputeCluster parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ComputeCluster) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* 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;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* 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 description_ = "";
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Short description of cluster region.
*
*
* string description = 2;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.CloudProvider cloudProvider_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CloudProvider, com.clarifai.grpc.api.CloudProvider.Builder, com.clarifai.grpc.api.CloudProviderOrBuilder> cloudProviderBuilder_;
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
* @return Whether the cloudProvider field is set.
*/
public boolean hasCloudProvider() {
return cloudProviderBuilder_ != null || cloudProvider_ != null;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
* @return The cloudProvider.
*/
public com.clarifai.grpc.api.CloudProvider getCloudProvider() {
if (cloudProviderBuilder_ == null) {
return cloudProvider_ == null ? com.clarifai.grpc.api.CloudProvider.getDefaultInstance() : cloudProvider_;
} else {
return cloudProviderBuilder_.getMessage();
}
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public Builder setCloudProvider(com.clarifai.grpc.api.CloudProvider value) {
if (cloudProviderBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cloudProvider_ = value;
onChanged();
} else {
cloudProviderBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public Builder setCloudProvider(
com.clarifai.grpc.api.CloudProvider.Builder builderForValue) {
if (cloudProviderBuilder_ == null) {
cloudProvider_ = builderForValue.build();
onChanged();
} else {
cloudProviderBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public Builder mergeCloudProvider(com.clarifai.grpc.api.CloudProvider value) {
if (cloudProviderBuilder_ == null) {
if (cloudProvider_ != null) {
cloudProvider_ =
com.clarifai.grpc.api.CloudProvider.newBuilder(cloudProvider_).mergeFrom(value).buildPartial();
} else {
cloudProvider_ = value;
}
onChanged();
} else {
cloudProviderBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public Builder clearCloudProvider() {
if (cloudProviderBuilder_ == null) {
cloudProvider_ = null;
onChanged();
} else {
cloudProvider_ = null;
cloudProviderBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public com.clarifai.grpc.api.CloudProvider.Builder getCloudProviderBuilder() {
onChanged();
return getCloudProviderFieldBuilder().getBuilder();
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
public com.clarifai.grpc.api.CloudProviderOrBuilder getCloudProviderOrBuilder() {
if (cloudProviderBuilder_ != null) {
return cloudProviderBuilder_.getMessageOrBuilder();
} else {
return cloudProvider_ == null ?
com.clarifai.grpc.api.CloudProvider.getDefaultInstance() : cloudProvider_;
}
}
/**
* .clarifai.api.CloudProvider cloud_provider = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CloudProvider, com.clarifai.grpc.api.CloudProvider.Builder, com.clarifai.grpc.api.CloudProviderOrBuilder>
getCloudProviderFieldBuilder() {
if (cloudProviderBuilder_ == null) {
cloudProviderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CloudProvider, com.clarifai.grpc.api.CloudProvider.Builder, com.clarifai.grpc.api.CloudProviderOrBuilder>(
getCloudProvider(),
getParentForChildren(),
isClean());
cloudProvider_ = null;
}
return cloudProviderBuilder_;
}
private java.lang.Object region_ = "";
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @return The region.
*/
public java.lang.String getRegion() {
java.lang.Object ref = region_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
region_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @return The bytes for region.
*/
public com.google.protobuf.ByteString
getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @param value The region to set.
* @return This builder for chaining.
*/
public Builder setRegion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
region_ = value;
onChanged();
return this;
}
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @return This builder for chaining.
*/
public Builder clearRegion() {
region_ = getDefaultInstance().getRegion();
onChanged();
return this;
}
/**
*
* The region. The naming here depends on the cluster choice above and will be validated
* against which clusters+regions that Clarifai currently supports.
*
*
* string region = 4;
* @param value The bytes for region to set.
* @return This builder for chaining.
*/
public Builder setRegionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
region_ = value;
onChanged();
return this;
}
private java.lang.Object userId_ = "";
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @return The userId.
*/
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @return The bytes for userId.
*/
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @param value The userId to set.
* @return This builder for chaining.
*/
public Builder setUserId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userId_ = value;
onChanged();
return this;
}
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @return This builder for chaining.
*/
public Builder clearUserId() {
userId_ = getDefaultInstance().getUserId();
onChanged();
return this;
}
/**
*
* The user/org that this compute cluster belongs to.
*
*
* string user_id = 5;
* @param value The bytes for userId to set.
* @return This builder for chaining.
*/
public Builder setUserIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userId_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the compute cluster was created.
*
*
* .google.protobuf.Timestamp created_at = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private com.google.protobuf.Timestamp modifiedAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> modifiedAtBuilder_;
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
* @return The modifiedAt.
*/
public com.google.protobuf.Timestamp getModifiedAt() {
if (modifiedAtBuilder_ == null) {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
} else {
return modifiedAtBuilder_.getMessage();
}
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public Builder setModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modifiedAt_ = value;
onChanged();
} else {
modifiedAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public Builder mergeModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (modifiedAt_ != null) {
modifiedAt_ =
com.google.protobuf.Timestamp.newBuilder(modifiedAt_).mergeFrom(value).buildPartial();
} else {
modifiedAt_ = value;
}
onChanged();
} else {
modifiedAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* When the compute cluster was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getModifiedAtFieldBuilder() {
if (modifiedAtBuilder_ == null) {
modifiedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getModifiedAt(),
getParentForChildren(),
isClean());
modifiedAt_ = null;
}
return modifiedAtBuilder_;
}
@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.ComputeCluster)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ComputeCluster)
private static final com.clarifai.grpc.api.ComputeCluster DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ComputeCluster();
}
public static com.clarifai.grpc.api.ComputeCluster getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ComputeCluster parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ComputeCluster(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.ComputeCluster getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}