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

com.clarifai.grpc.api.Deployment 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;

/**
 * 
 * A deployment allows you to configure how runners for a particular type of resource will
 * scale up and down. These are unique per user_id, nodepool and model so for differnet nodepools
 * you can scale differently.
 * 
* * Protobuf type {@code clarifai.api.Deployment} */ public final class Deployment extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.Deployment) DeploymentOrBuilder { private static final long serialVersionUID = 0L; // Use Deployment.newBuilder() to construct. private Deployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Deployment() { id_ = ""; userId_ = ""; nodepools_ = java.util.Collections.emptyList(); schedulingChoice_ = 0; description_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Deployment(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Deployment( 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.AutoscaleConfig.Builder subBuilder = null; if (autoscaleConfig_ != null) { subBuilder = autoscaleConfig_.toBuilder(); } autoscaleConfig_ = input.readMessage(com.clarifai.grpc.api.AutoscaleConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(autoscaleConfig_); autoscaleConfig_ = subBuilder.buildPartial(); } break; } case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { nodepools_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } nodepools_.add( input.readMessage(com.clarifai.grpc.api.Nodepool.parser(), extensionRegistry)); break; } case 56: { int rawValue = input.readEnum(); schedulingChoice_ = rawValue; break; } case 66: { com.clarifai.grpc.api.Visibility.Builder subBuilder = null; if (visibility_ != null) { subBuilder = visibility_.toBuilder(); } visibility_ = input.readMessage(com.clarifai.grpc.api.Visibility.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(visibility_); visibility_ = subBuilder.buildPartial(); } break; } case 74: { com.google.protobuf.Struct.Builder subBuilder = null; if (metadata_ != null) { subBuilder = metadata_.toBuilder(); } metadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(metadata_); metadata_ = subBuilder.buildPartial(); } break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; break; } case 90: { com.clarifai.grpc.api.Worker.Builder subBuilder = null; if (worker_ != null) { subBuilder = worker_.toBuilder(); } worker_ = input.readMessage(com.clarifai.grpc.api.Worker.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(worker_); worker_ = subBuilder.buildPartial(); } break; } case 98: { 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 106: { 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { nodepools_ = java.util.Collections.unmodifiableList(nodepools_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Deployment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Deployment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Deployment.class, com.clarifai.grpc.api.Deployment.Builder.class); } /** *
   * In some scenarios it may not be obvous how we should schedule a resource to underlying nodes
   * within the nodepool(s) above. The SchedulerChoice allows us to specify how to decide which
   * nodepool to use when there are multiple nodepools and how to decide which type of node
   * within a nodepool if there are multiple types.
   * If here are multiple nondepools then a decision on which to use comes into play
   * if it is not specified in the prediction request.
   * Even with a single nodepool a choice may come up such as when a resource that needs scheduling
   * has not specified the accelerator types it supports and the nodepool has multiple types.
   * 
* * Protobuf enum {@code clarifai.api.Deployment.SchedulingChoice} */ public enum SchedulingChoice implements com.google.protobuf.ProtocolMessageEnum { /** * UNKNOWN_SCHEDULING_CHOICE = 0; */ UNKNOWN_SCHEDULING_CHOICE(0), /** *
     * fail if there is any ambiguity.
     * 
* * FAIL = 1; */ FAIL(1), /** *
     * randomly pick amongst the nodepools/nodes to assign.
     * 
* * RANDOM = 2; */ RANDOM(2), /** *
     * choose the compute that is cheaper
     * 
* * PRICE = 3; */ PRICE(3), /** *
     * schedule to the fastest known iption.
     * 
* * PERFORMANCE = 4; */ PERFORMANCE(4), /** *
     * optimize based on network latency.
     * 
* * NETWORK = 5; */ NETWORK(5), /** *
     * send to the least used nodepool based on it's capacity.
     * 
* * UTILIZATION = 6; */ UTILIZATION(6), /** *
     * choose spot instances over on-demand
     * 
* * PREFER_SPOT = 7; */ PREFER_SPOT(7), /** *
     * choose on-demand instances over spot.
     * 
* * PREFER_ONDEMAND = 8; */ PREFER_ONDEMAND(8), UNRECOGNIZED(-1), ; /** * UNKNOWN_SCHEDULING_CHOICE = 0; */ public static final int UNKNOWN_SCHEDULING_CHOICE_VALUE = 0; /** *
     * fail if there is any ambiguity.
     * 
* * FAIL = 1; */ public static final int FAIL_VALUE = 1; /** *
     * randomly pick amongst the nodepools/nodes to assign.
     * 
* * RANDOM = 2; */ public static final int RANDOM_VALUE = 2; /** *
     * choose the compute that is cheaper
     * 
* * PRICE = 3; */ public static final int PRICE_VALUE = 3; /** *
     * schedule to the fastest known iption.
     * 
* * PERFORMANCE = 4; */ public static final int PERFORMANCE_VALUE = 4; /** *
     * optimize based on network latency.
     * 
* * NETWORK = 5; */ public static final int NETWORK_VALUE = 5; /** *
     * send to the least used nodepool based on it's capacity.
     * 
* * UTILIZATION = 6; */ public static final int UTILIZATION_VALUE = 6; /** *
     * choose spot instances over on-demand
     * 
* * PREFER_SPOT = 7; */ public static final int PREFER_SPOT_VALUE = 7; /** *
     * choose on-demand instances over spot.
     * 
* * PREFER_ONDEMAND = 8; */ public static final int PREFER_ONDEMAND_VALUE = 8; 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 SchedulingChoice 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 SchedulingChoice forNumber(int value) { switch (value) { case 0: return UNKNOWN_SCHEDULING_CHOICE; case 1: return FAIL; case 2: return RANDOM; case 3: return PRICE; case 4: return PERFORMANCE; case 5: return NETWORK; case 6: return UTILIZATION; case 7: return PREFER_SPOT; case 8: return PREFER_ONDEMAND; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< SchedulingChoice> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public SchedulingChoice findValueByNumber(int number) { return SchedulingChoice.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.Deployment.getDescriptor().getEnumTypes().get(0); } private static final SchedulingChoice[] VALUES = values(); public static SchedulingChoice 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 SchedulingChoice(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:clarifai.api.Deployment.SchedulingChoice) } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** *
   * An id for this configured deployment.
   * 
* * 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; } } /** *
   * An id for this configured deployment.
   * 
* * 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_; /** *
   * The user who owns the deployment. These live in the user/org account.
   * 
* * string user_id = 2; * @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 who owns the deployment. These live in the user/org account.
   * 
* * string user_id = 2; * @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 AUTOSCALE_CONFIG_FIELD_NUMBER = 3; private com.clarifai.grpc.api.AutoscaleConfig autoscaleConfig_; /** *
   * How to autoscale the object.
   * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; * @return Whether the autoscaleConfig field is set. */ @java.lang.Override public boolean hasAutoscaleConfig() { return autoscaleConfig_ != null; } /** *
   * How to autoscale the object.
   * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; * @return The autoscaleConfig. */ @java.lang.Override public com.clarifai.grpc.api.AutoscaleConfig getAutoscaleConfig() { return autoscaleConfig_ == null ? com.clarifai.grpc.api.AutoscaleConfig.getDefaultInstance() : autoscaleConfig_; } /** *
   * How to autoscale the object.
   * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ @java.lang.Override public com.clarifai.grpc.api.AutoscaleConfigOrBuilder getAutoscaleConfigOrBuilder() { return getAutoscaleConfig(); } public static final int NODEPOOLS_FIELD_NUMBER = 4; private java.util.List nodepools_; /** *
   * You can configure different autoscaling per nodepool(s).
   * These nodepools have to be also owned by the same user_id/org as this deployment.
   * If there is more than one nodepool we use the model's ComputeInfo to match
   * with what the nodepool provides to decide which one can handle it combined with the
   * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
   * we need a way to rank scheduling choices when we don't know how to decide (like a model
   * supports
   * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ @java.lang.Override public java.util.List getNodepoolsList() { return nodepools_; } /** *
   * You can configure different autoscaling per nodepool(s).
   * These nodepools have to be also owned by the same user_id/org as this deployment.
   * If there is more than one nodepool we use the model's ComputeInfo to match
   * with what the nodepool provides to decide which one can handle it combined with the
   * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
   * we need a way to rank scheduling choices when we don't know how to decide (like a model
   * supports
   * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ @java.lang.Override public java.util.List getNodepoolsOrBuilderList() { return nodepools_; } /** *
   * You can configure different autoscaling per nodepool(s).
   * These nodepools have to be also owned by the same user_id/org as this deployment.
   * If there is more than one nodepool we use the model's ComputeInfo to match
   * with what the nodepool provides to decide which one can handle it combined with the
   * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
   * we need a way to rank scheduling choices when we don't know how to decide (like a model
   * supports
   * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ @java.lang.Override public int getNodepoolsCount() { return nodepools_.size(); } /** *
   * You can configure different autoscaling per nodepool(s).
   * These nodepools have to be also owned by the same user_id/org as this deployment.
   * If there is more than one nodepool we use the model's ComputeInfo to match
   * with what the nodepool provides to decide which one can handle it combined with the
   * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
   * we need a way to rank scheduling choices when we don't know how to decide (like a model
   * supports
   * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ @java.lang.Override public com.clarifai.grpc.api.Nodepool getNodepools(int index) { return nodepools_.get(index); } /** *
   * You can configure different autoscaling per nodepool(s).
   * These nodepools have to be also owned by the same user_id/org as this deployment.
   * If there is more than one nodepool we use the model's ComputeInfo to match
   * with what the nodepool provides to decide which one can handle it combined with the
   * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
   * we need a way to rank scheduling choices when we don't know how to decide (like a model
   * supports
   * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ @java.lang.Override public com.clarifai.grpc.api.NodepoolOrBuilder getNodepoolsOrBuilder( int index) { return nodepools_.get(index); } public static final int SCHEDULING_CHOICE_FIELD_NUMBER = 7; private int schedulingChoice_; /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @return The enum numeric value on the wire for schedulingChoice. */ @java.lang.Override public int getSchedulingChoiceValue() { return schedulingChoice_; } /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @return The schedulingChoice. */ @java.lang.Override public com.clarifai.grpc.api.Deployment.SchedulingChoice getSchedulingChoice() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.Deployment.SchedulingChoice result = com.clarifai.grpc.api.Deployment.SchedulingChoice.valueOf(schedulingChoice_); return result == null ? com.clarifai.grpc.api.Deployment.SchedulingChoice.UNRECOGNIZED : result; } public static final int VISIBILITY_FIELD_NUMBER = 8; private com.clarifai.grpc.api.Visibility visibility_; /** *
   * The visibility field represents whether this message is privately/publicly visible.
   * To be visible to the public the App that contains it AND the User that contains the App must
   * also be publicly visible.
   * 
* * .clarifai.api.Visibility visibility = 8; * @return Whether the visibility field is set. */ @java.lang.Override public boolean hasVisibility() { return visibility_ != null; } /** *
   * The visibility field represents whether this message is privately/publicly visible.
   * To be visible to the public the App that contains it AND the User that contains the App must
   * also be publicly visible.
   * 
* * .clarifai.api.Visibility visibility = 8; * @return The visibility. */ @java.lang.Override public com.clarifai.grpc.api.Visibility getVisibility() { return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_; } /** *
   * The visibility field represents whether this message is privately/publicly visible.
   * To be visible to the public the App that contains it AND the User that contains the App must
   * also be publicly visible.
   * 
* * .clarifai.api.Visibility visibility = 8; */ @java.lang.Override public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() { return getVisibility(); } public static final int METADATA_FIELD_NUMBER = 9; private com.google.protobuf.Struct metadata_; /** *
   * To handle arbitrary json metadata:
   * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
   * 
* * .google.protobuf.Struct metadata = 9; * @return Whether the metadata field is set. */ @java.lang.Override public boolean hasMetadata() { return metadata_ != null; } /** *
   * To handle arbitrary json metadata:
   * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
   * 
* * .google.protobuf.Struct metadata = 9; * @return The metadata. */ @java.lang.Override public com.google.protobuf.Struct getMetadata() { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } /** *
   * To handle arbitrary json metadata:
   * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
   * 
* * .google.protobuf.Struct metadata = 9; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { return getMetadata(); } public static final int DESCRIPTION_FIELD_NUMBER = 10; private volatile java.lang.Object description_; /** *
   * Short description of deployment.
   * 
* * string description = 10; * @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 deployment.
   * 
* * string description = 10; * @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 WORKER_FIELD_NUMBER = 11; private com.clarifai.grpc.api.Worker worker_; /** *
   * The thing that the autoscaling config applies to for this nodepool.
   * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
   * 
* * .clarifai.api.Worker worker = 11; * @return Whether the worker field is set. */ @java.lang.Override public boolean hasWorker() { return worker_ != null; } /** *
   * The thing that the autoscaling config applies to for this nodepool.
   * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
   * 
* * .clarifai.api.Worker worker = 11; * @return The worker. */ @java.lang.Override public com.clarifai.grpc.api.Worker getWorker() { return worker_ == null ? com.clarifai.grpc.api.Worker.getDefaultInstance() : worker_; } /** *
   * The thing that the autoscaling config applies to for this nodepool.
   * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
   * 
* * .clarifai.api.Worker worker = 11; */ @java.lang.Override public com.clarifai.grpc.api.WorkerOrBuilder getWorkerOrBuilder() { return getWorker(); } public static final int CREATED_AT_FIELD_NUMBER = 12; private com.google.protobuf.Timestamp createdAt_; /** *
   * When the deployment was created.
   * 
* * .google.protobuf.Timestamp created_at = 12; * @return Whether the createdAt field is set. */ @java.lang.Override public boolean hasCreatedAt() { return createdAt_ != null; } /** *
   * When the deployment was created.
   * 
* * .google.protobuf.Timestamp created_at = 12; * @return The createdAt. */ @java.lang.Override public com.google.protobuf.Timestamp getCreatedAt() { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } /** *
   * When the deployment was created.
   * 
* * .google.protobuf.Timestamp created_at = 12; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { return getCreatedAt(); } public static final int MODIFIED_AT_FIELD_NUMBER = 13; private com.google.protobuf.Timestamp modifiedAt_; /** *
   * When the deployment was last modified.
   * 
* * .google.protobuf.Timestamp modified_at = 13; * @return Whether the modifiedAt field is set. */ @java.lang.Override public boolean hasModifiedAt() { return modifiedAt_ != null; } /** *
   * When the deployment was last modified.
   * 
* * .google.protobuf.Timestamp modified_at = 13; * @return The modifiedAt. */ @java.lang.Override public com.google.protobuf.Timestamp getModifiedAt() { return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_; } /** *
   * When the deployment was last modified.
   * 
* * .google.protobuf.Timestamp modified_at = 13; */ @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(userId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userId_); } if (autoscaleConfig_ != null) { output.writeMessage(3, getAutoscaleConfig()); } for (int i = 0; i < nodepools_.size(); i++) { output.writeMessage(4, nodepools_.get(i)); } if (schedulingChoice_ != com.clarifai.grpc.api.Deployment.SchedulingChoice.UNKNOWN_SCHEDULING_CHOICE.getNumber()) { output.writeEnum(7, schedulingChoice_); } if (visibility_ != null) { output.writeMessage(8, getVisibility()); } if (metadata_ != null) { output.writeMessage(9, getMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, description_); } if (worker_ != null) { output.writeMessage(11, getWorker()); } if (createdAt_ != null) { output.writeMessage(12, getCreatedAt()); } if (modifiedAt_ != null) { output.writeMessage(13, 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(userId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userId_); } if (autoscaleConfig_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getAutoscaleConfig()); } for (int i = 0; i < nodepools_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, nodepools_.get(i)); } if (schedulingChoice_ != com.clarifai.grpc.api.Deployment.SchedulingChoice.UNKNOWN_SCHEDULING_CHOICE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, schedulingChoice_); } if (visibility_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getVisibility()); } if (metadata_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, description_); } if (worker_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, getWorker()); } if (createdAt_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, getCreatedAt()); } if (modifiedAt_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, 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.Deployment)) { return super.equals(obj); } com.clarifai.grpc.api.Deployment other = (com.clarifai.grpc.api.Deployment) obj; if (!getId() .equals(other.getId())) return false; if (!getUserId() .equals(other.getUserId())) return false; if (hasAutoscaleConfig() != other.hasAutoscaleConfig()) return false; if (hasAutoscaleConfig()) { if (!getAutoscaleConfig() .equals(other.getAutoscaleConfig())) return false; } if (!getNodepoolsList() .equals(other.getNodepoolsList())) return false; if (schedulingChoice_ != other.schedulingChoice_) return false; if (hasVisibility() != other.hasVisibility()) return false; if (hasVisibility()) { if (!getVisibility() .equals(other.getVisibility())) return false; } if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() .equals(other.getMetadata())) return false; } if (!getDescription() .equals(other.getDescription())) return false; if (hasWorker() != other.hasWorker()) return false; if (hasWorker()) { if (!getWorker() .equals(other.getWorker())) 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) + USER_ID_FIELD_NUMBER; hash = (53 * hash) + getUserId().hashCode(); if (hasAutoscaleConfig()) { hash = (37 * hash) + AUTOSCALE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getAutoscaleConfig().hashCode(); } if (getNodepoolsCount() > 0) { hash = (37 * hash) + NODEPOOLS_FIELD_NUMBER; hash = (53 * hash) + getNodepoolsList().hashCode(); } hash = (37 * hash) + SCHEDULING_CHOICE_FIELD_NUMBER; hash = (53 * hash) + schedulingChoice_; if (hasVisibility()) { hash = (37 * hash) + VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + getVisibility().hashCode(); } if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); if (hasWorker()) { hash = (37 * hash) + WORKER_FIELD_NUMBER; hash = (53 * hash) + getWorker().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.Deployment parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Deployment 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.Deployment parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Deployment 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.Deployment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Deployment parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Deployment parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Deployment 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.Deployment parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Deployment 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.Deployment parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Deployment 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.Deployment 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 deployment allows you to configure how runners for a particular type of resource will
   * scale up and down. These are unique per user_id, nodepool and model so for differnet nodepools
   * you can scale differently.
   * 
* * Protobuf type {@code clarifai.api.Deployment} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Deployment) com.clarifai.grpc.api.DeploymentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Deployment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Deployment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Deployment.class, com.clarifai.grpc.api.Deployment.Builder.class); } // Construct using com.clarifai.grpc.api.Deployment.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getNodepoolsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; userId_ = ""; if (autoscaleConfigBuilder_ == null) { autoscaleConfig_ = null; } else { autoscaleConfig_ = null; autoscaleConfigBuilder_ = null; } if (nodepoolsBuilder_ == null) { nodepools_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { nodepoolsBuilder_.clear(); } schedulingChoice_ = 0; if (visibilityBuilder_ == null) { visibility_ = null; } else { visibility_ = null; visibilityBuilder_ = null; } if (metadataBuilder_ == null) { metadata_ = null; } else { metadata_ = null; metadataBuilder_ = null; } description_ = ""; if (workerBuilder_ == null) { worker_ = null; } else { worker_ = null; workerBuilder_ = null; } 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_Deployment_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Deployment getDefaultInstanceForType() { return com.clarifai.grpc.api.Deployment.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Deployment build() { com.clarifai.grpc.api.Deployment result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Deployment buildPartial() { com.clarifai.grpc.api.Deployment result = new com.clarifai.grpc.api.Deployment(this); int from_bitField0_ = bitField0_; result.id_ = id_; result.userId_ = userId_; if (autoscaleConfigBuilder_ == null) { result.autoscaleConfig_ = autoscaleConfig_; } else { result.autoscaleConfig_ = autoscaleConfigBuilder_.build(); } if (nodepoolsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { nodepools_ = java.util.Collections.unmodifiableList(nodepools_); bitField0_ = (bitField0_ & ~0x00000001); } result.nodepools_ = nodepools_; } else { result.nodepools_ = nodepoolsBuilder_.build(); } result.schedulingChoice_ = schedulingChoice_; if (visibilityBuilder_ == null) { result.visibility_ = visibility_; } else { result.visibility_ = visibilityBuilder_.build(); } if (metadataBuilder_ == null) { result.metadata_ = metadata_; } else { result.metadata_ = metadataBuilder_.build(); } result.description_ = description_; if (workerBuilder_ == null) { result.worker_ = worker_; } else { result.worker_ = workerBuilder_.build(); } 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.Deployment) { return mergeFrom((com.clarifai.grpc.api.Deployment)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Deployment other) { if (other == com.clarifai.grpc.api.Deployment.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getUserId().isEmpty()) { userId_ = other.userId_; onChanged(); } if (other.hasAutoscaleConfig()) { mergeAutoscaleConfig(other.getAutoscaleConfig()); } if (nodepoolsBuilder_ == null) { if (!other.nodepools_.isEmpty()) { if (nodepools_.isEmpty()) { nodepools_ = other.nodepools_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureNodepoolsIsMutable(); nodepools_.addAll(other.nodepools_); } onChanged(); } } else { if (!other.nodepools_.isEmpty()) { if (nodepoolsBuilder_.isEmpty()) { nodepoolsBuilder_.dispose(); nodepoolsBuilder_ = null; nodepools_ = other.nodepools_; bitField0_ = (bitField0_ & ~0x00000001); nodepoolsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getNodepoolsFieldBuilder() : null; } else { nodepoolsBuilder_.addAllMessages(other.nodepools_); } } } if (other.schedulingChoice_ != 0) { setSchedulingChoiceValue(other.getSchedulingChoiceValue()); } if (other.hasVisibility()) { mergeVisibility(other.getVisibility()); } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (other.hasWorker()) { mergeWorker(other.getWorker()); } 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.Deployment parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Deployment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object id_ = ""; /** *
     * An id for this configured deployment.
     * 
* * 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; } } /** *
     * An id for this configured deployment.
     * 
* * 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; } } /** *
     * An id for this configured deployment.
     * 
* * 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; } /** *
     * An id for this configured deployment.
     * 
* * string id = 1; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
     * An id for this configured deployment.
     * 
* * 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_ = ""; /** *
     * The user who owns the deployment. These live in the user/org account.
     * 
* * string user_id = 2; * @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 who owns the deployment. These live in the user/org account.
     * 
* * string user_id = 2; * @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 who owns the deployment. These live in the user/org account.
     * 
* * string user_id = 2; * @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 who owns the deployment. These live in the user/org account.
     * 
* * string user_id = 2; * @return This builder for chaining. */ public Builder clearUserId() { userId_ = getDefaultInstance().getUserId(); onChanged(); return this; } /** *
     * The user who owns the deployment. These live in the user/org account.
     * 
* * string user_id = 2; * @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.clarifai.grpc.api.AutoscaleConfig autoscaleConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AutoscaleConfig, com.clarifai.grpc.api.AutoscaleConfig.Builder, com.clarifai.grpc.api.AutoscaleConfigOrBuilder> autoscaleConfigBuilder_; /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; * @return Whether the autoscaleConfig field is set. */ public boolean hasAutoscaleConfig() { return autoscaleConfigBuilder_ != null || autoscaleConfig_ != null; } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; * @return The autoscaleConfig. */ public com.clarifai.grpc.api.AutoscaleConfig getAutoscaleConfig() { if (autoscaleConfigBuilder_ == null) { return autoscaleConfig_ == null ? com.clarifai.grpc.api.AutoscaleConfig.getDefaultInstance() : autoscaleConfig_; } else { return autoscaleConfigBuilder_.getMessage(); } } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public Builder setAutoscaleConfig(com.clarifai.grpc.api.AutoscaleConfig value) { if (autoscaleConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } autoscaleConfig_ = value; onChanged(); } else { autoscaleConfigBuilder_.setMessage(value); } return this; } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public Builder setAutoscaleConfig( com.clarifai.grpc.api.AutoscaleConfig.Builder builderForValue) { if (autoscaleConfigBuilder_ == null) { autoscaleConfig_ = builderForValue.build(); onChanged(); } else { autoscaleConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public Builder mergeAutoscaleConfig(com.clarifai.grpc.api.AutoscaleConfig value) { if (autoscaleConfigBuilder_ == null) { if (autoscaleConfig_ != null) { autoscaleConfig_ = com.clarifai.grpc.api.AutoscaleConfig.newBuilder(autoscaleConfig_).mergeFrom(value).buildPartial(); } else { autoscaleConfig_ = value; } onChanged(); } else { autoscaleConfigBuilder_.mergeFrom(value); } return this; } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public Builder clearAutoscaleConfig() { if (autoscaleConfigBuilder_ == null) { autoscaleConfig_ = null; onChanged(); } else { autoscaleConfig_ = null; autoscaleConfigBuilder_ = null; } return this; } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public com.clarifai.grpc.api.AutoscaleConfig.Builder getAutoscaleConfigBuilder() { onChanged(); return getAutoscaleConfigFieldBuilder().getBuilder(); } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ public com.clarifai.grpc.api.AutoscaleConfigOrBuilder getAutoscaleConfigOrBuilder() { if (autoscaleConfigBuilder_ != null) { return autoscaleConfigBuilder_.getMessageOrBuilder(); } else { return autoscaleConfig_ == null ? com.clarifai.grpc.api.AutoscaleConfig.getDefaultInstance() : autoscaleConfig_; } } /** *
     * How to autoscale the object.
     * 
* * .clarifai.api.AutoscaleConfig autoscale_config = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AutoscaleConfig, com.clarifai.grpc.api.AutoscaleConfig.Builder, com.clarifai.grpc.api.AutoscaleConfigOrBuilder> getAutoscaleConfigFieldBuilder() { if (autoscaleConfigBuilder_ == null) { autoscaleConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.AutoscaleConfig, com.clarifai.grpc.api.AutoscaleConfig.Builder, com.clarifai.grpc.api.AutoscaleConfigOrBuilder>( getAutoscaleConfig(), getParentForChildren(), isClean()); autoscaleConfig_ = null; } return autoscaleConfigBuilder_; } private java.util.List nodepools_ = java.util.Collections.emptyList(); private void ensureNodepoolsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { nodepools_ = new java.util.ArrayList(nodepools_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Nodepool, com.clarifai.grpc.api.Nodepool.Builder, com.clarifai.grpc.api.NodepoolOrBuilder> nodepoolsBuilder_; /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public java.util.List getNodepoolsList() { if (nodepoolsBuilder_ == null) { return java.util.Collections.unmodifiableList(nodepools_); } else { return nodepoolsBuilder_.getMessageList(); } } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public int getNodepoolsCount() { if (nodepoolsBuilder_ == null) { return nodepools_.size(); } else { return nodepoolsBuilder_.getCount(); } } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public com.clarifai.grpc.api.Nodepool getNodepools(int index) { if (nodepoolsBuilder_ == null) { return nodepools_.get(index); } else { return nodepoolsBuilder_.getMessage(index); } } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder setNodepools( int index, com.clarifai.grpc.api.Nodepool value) { if (nodepoolsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodepoolsIsMutable(); nodepools_.set(index, value); onChanged(); } else { nodepoolsBuilder_.setMessage(index, value); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder setNodepools( int index, com.clarifai.grpc.api.Nodepool.Builder builderForValue) { if (nodepoolsBuilder_ == null) { ensureNodepoolsIsMutable(); nodepools_.set(index, builderForValue.build()); onChanged(); } else { nodepoolsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder addNodepools(com.clarifai.grpc.api.Nodepool value) { if (nodepoolsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodepoolsIsMutable(); nodepools_.add(value); onChanged(); } else { nodepoolsBuilder_.addMessage(value); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder addNodepools( int index, com.clarifai.grpc.api.Nodepool value) { if (nodepoolsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodepoolsIsMutable(); nodepools_.add(index, value); onChanged(); } else { nodepoolsBuilder_.addMessage(index, value); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder addNodepools( com.clarifai.grpc.api.Nodepool.Builder builderForValue) { if (nodepoolsBuilder_ == null) { ensureNodepoolsIsMutable(); nodepools_.add(builderForValue.build()); onChanged(); } else { nodepoolsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder addNodepools( int index, com.clarifai.grpc.api.Nodepool.Builder builderForValue) { if (nodepoolsBuilder_ == null) { ensureNodepoolsIsMutable(); nodepools_.add(index, builderForValue.build()); onChanged(); } else { nodepoolsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder addAllNodepools( java.lang.Iterable values) { if (nodepoolsBuilder_ == null) { ensureNodepoolsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, nodepools_); onChanged(); } else { nodepoolsBuilder_.addAllMessages(values); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder clearNodepools() { if (nodepoolsBuilder_ == null) { nodepools_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { nodepoolsBuilder_.clear(); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public Builder removeNodepools(int index) { if (nodepoolsBuilder_ == null) { ensureNodepoolsIsMutable(); nodepools_.remove(index); onChanged(); } else { nodepoolsBuilder_.remove(index); } return this; } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public com.clarifai.grpc.api.Nodepool.Builder getNodepoolsBuilder( int index) { return getNodepoolsFieldBuilder().getBuilder(index); } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public com.clarifai.grpc.api.NodepoolOrBuilder getNodepoolsOrBuilder( int index) { if (nodepoolsBuilder_ == null) { return nodepools_.get(index); } else { return nodepoolsBuilder_.getMessageOrBuilder(index); } } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public java.util.List getNodepoolsOrBuilderList() { if (nodepoolsBuilder_ != null) { return nodepoolsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(nodepools_); } } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public com.clarifai.grpc.api.Nodepool.Builder addNodepoolsBuilder() { return getNodepoolsFieldBuilder().addBuilder( com.clarifai.grpc.api.Nodepool.getDefaultInstance()); } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public com.clarifai.grpc.api.Nodepool.Builder addNodepoolsBuilder( int index) { return getNodepoolsFieldBuilder().addBuilder( index, com.clarifai.grpc.api.Nodepool.getDefaultInstance()); } /** *
     * You can configure different autoscaling per nodepool(s).
     * These nodepools have to be also owned by the same user_id/org as this deployment.
     * If there is more than one nodepool we use the model's ComputeInfo to match
     * with what the nodepool provides to decide which one can handle it combined with the
     * NodepoolRank below. Note: even within a single nodepool if it is heterogeneous then
     * we need a way to rank scheduling choices when we don't know how to decide (like a model
     * supports
     * 
* * repeated .clarifai.api.Nodepool nodepools = 4; */ public java.util.List getNodepoolsBuilderList() { return getNodepoolsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Nodepool, com.clarifai.grpc.api.Nodepool.Builder, com.clarifai.grpc.api.NodepoolOrBuilder> getNodepoolsFieldBuilder() { if (nodepoolsBuilder_ == null) { nodepoolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Nodepool, com.clarifai.grpc.api.Nodepool.Builder, com.clarifai.grpc.api.NodepoolOrBuilder>( nodepools_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); nodepools_ = null; } return nodepoolsBuilder_; } private int schedulingChoice_ = 0; /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @return The enum numeric value on the wire for schedulingChoice. */ @java.lang.Override public int getSchedulingChoiceValue() { return schedulingChoice_; } /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @param value The enum numeric value on the wire for schedulingChoice to set. * @return This builder for chaining. */ public Builder setSchedulingChoiceValue(int value) { schedulingChoice_ = value; onChanged(); return this; } /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @return The schedulingChoice. */ @java.lang.Override public com.clarifai.grpc.api.Deployment.SchedulingChoice getSchedulingChoice() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.Deployment.SchedulingChoice result = com.clarifai.grpc.api.Deployment.SchedulingChoice.valueOf(schedulingChoice_); return result == null ? com.clarifai.grpc.api.Deployment.SchedulingChoice.UNRECOGNIZED : result; } /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @param value The schedulingChoice to set. * @return This builder for chaining. */ public Builder setSchedulingChoice(com.clarifai.grpc.api.Deployment.SchedulingChoice value) { if (value == null) { throw new NullPointerException(); } schedulingChoice_ = value.getNumber(); onChanged(); return this; } /** * .clarifai.api.Deployment.SchedulingChoice scheduling_choice = 7; * @return This builder for chaining. */ public Builder clearSchedulingChoice() { schedulingChoice_ = 0; onChanged(); return this; } private com.clarifai.grpc.api.Visibility visibility_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> visibilityBuilder_; /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; * @return Whether the visibility field is set. */ public boolean hasVisibility() { return visibilityBuilder_ != null || visibility_ != null; } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; * @return The visibility. */ public com.clarifai.grpc.api.Visibility getVisibility() { if (visibilityBuilder_ == null) { return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_; } else { return visibilityBuilder_.getMessage(); } } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public Builder setVisibility(com.clarifai.grpc.api.Visibility value) { if (visibilityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } visibility_ = value; onChanged(); } else { visibilityBuilder_.setMessage(value); } return this; } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public Builder setVisibility( com.clarifai.grpc.api.Visibility.Builder builderForValue) { if (visibilityBuilder_ == null) { visibility_ = builderForValue.build(); onChanged(); } else { visibilityBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public Builder mergeVisibility(com.clarifai.grpc.api.Visibility value) { if (visibilityBuilder_ == null) { if (visibility_ != null) { visibility_ = com.clarifai.grpc.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial(); } else { visibility_ = value; } onChanged(); } else { visibilityBuilder_.mergeFrom(value); } return this; } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public Builder clearVisibility() { if (visibilityBuilder_ == null) { visibility_ = null; onChanged(); } else { visibility_ = null; visibilityBuilder_ = null; } return this; } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public com.clarifai.grpc.api.Visibility.Builder getVisibilityBuilder() { onChanged(); return getVisibilityFieldBuilder().getBuilder(); } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() { if (visibilityBuilder_ != null) { return visibilityBuilder_.getMessageOrBuilder(); } else { return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_; } } /** *
     * The visibility field represents whether this message is privately/publicly visible.
     * To be visible to the public the App that contains it AND the User that contains the App must
     * also be publicly visible.
     * 
* * .clarifai.api.Visibility visibility = 8; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> getVisibilityFieldBuilder() { if (visibilityBuilder_ == null) { visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>( getVisibility(), getParentForChildren(), isClean()); visibility_ = null; } return visibilityBuilder_; } private com.google.protobuf.Struct metadata_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; * @return Whether the metadata field is set. */ public boolean hasMetadata() { return metadataBuilder_ != null || metadata_ != null; } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; * @return The metadata. */ public com.google.protobuf.Struct getMetadata() { if (metadataBuilder_ == null) { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } else { return metadataBuilder_.getMessage(); } } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public Builder setMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadata_ = value; onChanged(); } else { metadataBuilder_.setMessage(value); } return this; } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public Builder setMetadata( com.google.protobuf.Struct.Builder builderForValue) { if (metadataBuilder_ == null) { metadata_ = builderForValue.build(); onChanged(); } else { metadataBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public Builder mergeMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { if (metadata_ != null) { metadata_ = com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial(); } else { metadata_ = value; } onChanged(); } else { metadataBuilder_.mergeFrom(value); } return this; } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public Builder clearMetadata() { if (metadataBuilder_ == null) { metadata_ = null; onChanged(); } else { metadata_ = null; metadataBuilder_ = null; } return this; } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public com.google.protobuf.Struct.Builder getMetadataBuilder() { onChanged(); return getMetadataFieldBuilder().getBuilder(); } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { if (metadataBuilder_ != null) { return metadataBuilder_.getMessageOrBuilder(); } else { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } } /** *
     * To handle arbitrary json metadata:
     * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
     * 
* * .google.protobuf.Struct metadata = 9; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getMetadataFieldBuilder() { if (metadataBuilder_ == null) { metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getMetadata(), getParentForChildren(), isClean()); metadata_ = null; } return metadataBuilder_; } private java.lang.Object description_ = ""; /** *
     * Short description of deployment.
     * 
* * string description = 10; * @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 deployment.
     * 
* * string description = 10; * @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 deployment.
     * 
* * string description = 10; * @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 deployment.
     * 
* * string description = 10; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * Short description of deployment.
     * 
* * string description = 10; * @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.Worker worker_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder> workerBuilder_; /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; * @return Whether the worker field is set. */ public boolean hasWorker() { return workerBuilder_ != null || worker_ != null; } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; * @return The worker. */ public com.clarifai.grpc.api.Worker getWorker() { if (workerBuilder_ == null) { return worker_ == null ? com.clarifai.grpc.api.Worker.getDefaultInstance() : worker_; } else { return workerBuilder_.getMessage(); } } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public Builder setWorker(com.clarifai.grpc.api.Worker value) { if (workerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } worker_ = value; onChanged(); } else { workerBuilder_.setMessage(value); } return this; } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public Builder setWorker( com.clarifai.grpc.api.Worker.Builder builderForValue) { if (workerBuilder_ == null) { worker_ = builderForValue.build(); onChanged(); } else { workerBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public Builder mergeWorker(com.clarifai.grpc.api.Worker value) { if (workerBuilder_ == null) { if (worker_ != null) { worker_ = com.clarifai.grpc.api.Worker.newBuilder(worker_).mergeFrom(value).buildPartial(); } else { worker_ = value; } onChanged(); } else { workerBuilder_.mergeFrom(value); } return this; } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public Builder clearWorker() { if (workerBuilder_ == null) { worker_ = null; onChanged(); } else { worker_ = null; workerBuilder_ = null; } return this; } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public com.clarifai.grpc.api.Worker.Builder getWorkerBuilder() { onChanged(); return getWorkerFieldBuilder().getBuilder(); } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ public com.clarifai.grpc.api.WorkerOrBuilder getWorkerOrBuilder() { if (workerBuilder_ != null) { return workerBuilder_.getMessageOrBuilder(); } else { return worker_ == null ? com.clarifai.grpc.api.Worker.getDefaultInstance() : worker_; } } /** *
     * The thing that the autoscaling config applies to for this nodepool.
     * For a given user_id, nodepool_id, and object ID we can only have one deployment as it defines
     * 
* * .clarifai.api.Worker worker = 11; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder> getWorkerFieldBuilder() { if (workerBuilder_ == null) { workerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder>( getWorker(), getParentForChildren(), isClean()); worker_ = null; } return workerBuilder_; } 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 deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; * @return Whether the createdAt field is set. */ public boolean hasCreatedAt() { return createdAtBuilder_ != null || createdAt_ != null; } /** *
     * When the deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; * @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 deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ 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 deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ 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 deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ 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 deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ public Builder clearCreatedAt() { if (createdAtBuilder_ == null) { createdAt_ = null; onChanged(); } else { createdAt_ = null; createdAtBuilder_ = null; } return this; } /** *
     * When the deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() { onChanged(); return getCreatedAtFieldBuilder().getBuilder(); } /** *
     * When the deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { if (createdAtBuilder_ != null) { return createdAtBuilder_.getMessageOrBuilder(); } else { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } } /** *
     * When the deployment was created.
     * 
* * .google.protobuf.Timestamp created_at = 12; */ 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 deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; * @return Whether the modifiedAt field is set. */ public boolean hasModifiedAt() { return modifiedAtBuilder_ != null || modifiedAt_ != null; } /** *
     * When the deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; * @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 deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ 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 deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ 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 deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ 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 deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ public Builder clearModifiedAt() { if (modifiedAtBuilder_ == null) { modifiedAt_ = null; onChanged(); } else { modifiedAt_ = null; modifiedAtBuilder_ = null; } return this; } /** *
     * When the deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() { onChanged(); return getModifiedAtFieldBuilder().getBuilder(); } /** *
     * When the deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() { if (modifiedAtBuilder_ != null) { return modifiedAtBuilder_.getMessageOrBuilder(); } else { return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_; } } /** *
     * When the deployment was last modified.
     * 
* * .google.protobuf.Timestamp modified_at = 13; */ 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.Deployment) } // @@protoc_insertion_point(class_scope:clarifai.api.Deployment) private static final com.clarifai.grpc.api.Deployment DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Deployment(); } public static com.clarifai.grpc.api.Deployment getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Deployment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Deployment(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.Deployment getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy