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

com.clarifai.grpc.api.ModelLayerInfo Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/clarifai/api/resources.proto

package com.clarifai.grpc.api;

/**
 * Protobuf type {@code clarifai.api.ModelLayerInfo}
 */
public final class ModelLayerInfo extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:clarifai.api.ModelLayerInfo)
    ModelLayerInfoOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ModelLayerInfo.newBuilder() to construct.
  private ModelLayerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ModelLayerInfo() {
    dataFieldName_ = "";
    shapes_ = java.util.Collections.emptyList();
    description_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new ModelLayerInfo();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ModelLayerInfo(
      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();

            dataFieldName_ = s;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              shapes_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            shapes_.add(
                input.readMessage(com.clarifai.grpc.api.LayerShape.parser(), extensionRegistry));
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            description_ = s;
            break;
          }
          case 32: {

            requiresLabelFilename_ = input.readBool();
            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)) {
        shapes_ = java.util.Collections.unmodifiableList(shapes_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModelLayerInfo_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModelLayerInfo_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.clarifai.grpc.api.ModelLayerInfo.class, com.clarifai.grpc.api.ModelLayerInfo.Builder.class);
  }

  public static final int DATA_FIELD_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object dataFieldName_;
  /**
   * 
   * The api.Data field this layer will be parsed into
   * 
* * string data_field_name = 1; * @return The dataFieldName. */ @java.lang.Override public java.lang.String getDataFieldName() { java.lang.Object ref = dataFieldName_; 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(); dataFieldName_ = s; return s; } } /** *
   * The api.Data field this layer will be parsed into
   * 
* * string data_field_name = 1; * @return The bytes for dataFieldName. */ @java.lang.Override public com.google.protobuf.ByteString getDataFieldNameBytes() { java.lang.Object ref = dataFieldName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); dataFieldName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SHAPES_FIELD_NUMBER = 2; private java.util.List shapes_; /** *
   * Description of the expected shape. Can support multiple support layer shapes.
   * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ @java.lang.Override public java.util.List getShapesList() { return shapes_; } /** *
   * Description of the expected shape. Can support multiple support layer shapes.
   * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ @java.lang.Override public java.util.List getShapesOrBuilderList() { return shapes_; } /** *
   * Description of the expected shape. Can support multiple support layer shapes.
   * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ @java.lang.Override public int getShapesCount() { return shapes_.size(); } /** *
   * Description of the expected shape. Can support multiple support layer shapes.
   * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ @java.lang.Override public com.clarifai.grpc.api.LayerShape getShapes(int index) { return shapes_.get(index); } /** *
   * Description of the expected shape. Can support multiple support layer shapes.
   * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ @java.lang.Override public com.clarifai.grpc.api.LayerShapeOrBuilder getShapesOrBuilder( int index) { return shapes_.get(index); } public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** *
   * Brief description about the layer if needed
   * 
* * string description = 3; * @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; } } /** *
   * Brief description about the layer if needed
   * 
* * string description = 3; * @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 REQUIRES_LABEL_FILENAME_FIELD_NUMBER = 4; private boolean requiresLabelFilename_; /** *
   * Whether this layer should have a label_filename specified and provided
   * 
* * bool requires_label_filename = 4; * @return The requiresLabelFilename. */ @java.lang.Override public boolean getRequiresLabelFilename() { return requiresLabelFilename_; } 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(dataFieldName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataFieldName_); } for (int i = 0; i < shapes_.size(); i++) { output.writeMessage(2, shapes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } if (requiresLabelFilename_ != false) { output.writeBool(4, requiresLabelFilename_); } 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(dataFieldName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataFieldName_); } for (int i = 0; i < shapes_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, shapes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } if (requiresLabelFilename_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, requiresLabelFilename_); } 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.ModelLayerInfo)) { return super.equals(obj); } com.clarifai.grpc.api.ModelLayerInfo other = (com.clarifai.grpc.api.ModelLayerInfo) obj; if (!getDataFieldName() .equals(other.getDataFieldName())) return false; if (!getShapesList() .equals(other.getShapesList())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (getRequiresLabelFilename() != other.getRequiresLabelFilename()) 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) + DATA_FIELD_NAME_FIELD_NUMBER; hash = (53 * hash) + getDataFieldName().hashCode(); if (getShapesCount() > 0) { hash = (37 * hash) + SHAPES_FIELD_NUMBER; hash = (53 * hash) + getShapesList().hashCode(); } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + REQUIRES_LABEL_FILENAME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRequiresLabelFilename()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.ModelLayerInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.ModelLayerInfo 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.ModelLayerInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.ModelLayerInfo 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.ModelLayerInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.ModelLayerInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.ModelLayerInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.ModelLayerInfo 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.ModelLayerInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.ModelLayerInfo 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.ModelLayerInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.ModelLayerInfo 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.ModelLayerInfo 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; } /** * Protobuf type {@code clarifai.api.ModelLayerInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.ModelLayerInfo) com.clarifai.grpc.api.ModelLayerInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModelLayerInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModelLayerInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.ModelLayerInfo.class, com.clarifai.grpc.api.ModelLayerInfo.Builder.class); } // Construct using com.clarifai.grpc.api.ModelLayerInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getShapesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); dataFieldName_ = ""; if (shapesBuilder_ == null) { shapes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { shapesBuilder_.clear(); } description_ = ""; requiresLabelFilename_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModelLayerInfo_descriptor; } @java.lang.Override public com.clarifai.grpc.api.ModelLayerInfo getDefaultInstanceForType() { return com.clarifai.grpc.api.ModelLayerInfo.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.ModelLayerInfo build() { com.clarifai.grpc.api.ModelLayerInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.ModelLayerInfo buildPartial() { com.clarifai.grpc.api.ModelLayerInfo result = new com.clarifai.grpc.api.ModelLayerInfo(this); int from_bitField0_ = bitField0_; result.dataFieldName_ = dataFieldName_; if (shapesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { shapes_ = java.util.Collections.unmodifiableList(shapes_); bitField0_ = (bitField0_ & ~0x00000001); } result.shapes_ = shapes_; } else { result.shapes_ = shapesBuilder_.build(); } result.description_ = description_; result.requiresLabelFilename_ = requiresLabelFilename_; 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.ModelLayerInfo) { return mergeFrom((com.clarifai.grpc.api.ModelLayerInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.ModelLayerInfo other) { if (other == com.clarifai.grpc.api.ModelLayerInfo.getDefaultInstance()) return this; if (!other.getDataFieldName().isEmpty()) { dataFieldName_ = other.dataFieldName_; onChanged(); } if (shapesBuilder_ == null) { if (!other.shapes_.isEmpty()) { if (shapes_.isEmpty()) { shapes_ = other.shapes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureShapesIsMutable(); shapes_.addAll(other.shapes_); } onChanged(); } } else { if (!other.shapes_.isEmpty()) { if (shapesBuilder_.isEmpty()) { shapesBuilder_.dispose(); shapesBuilder_ = null; shapes_ = other.shapes_; bitField0_ = (bitField0_ & ~0x00000001); shapesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getShapesFieldBuilder() : null; } else { shapesBuilder_.addAllMessages(other.shapes_); } } } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (other.getRequiresLabelFilename() != false) { setRequiresLabelFilename(other.getRequiresLabelFilename()); } 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.ModelLayerInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.ModelLayerInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object dataFieldName_ = ""; /** *
     * The api.Data field this layer will be parsed into
     * 
* * string data_field_name = 1; * @return The dataFieldName. */ public java.lang.String getDataFieldName() { java.lang.Object ref = dataFieldName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); dataFieldName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The api.Data field this layer will be parsed into
     * 
* * string data_field_name = 1; * @return The bytes for dataFieldName. */ public com.google.protobuf.ByteString getDataFieldNameBytes() { java.lang.Object ref = dataFieldName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); dataFieldName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The api.Data field this layer will be parsed into
     * 
* * string data_field_name = 1; * @param value The dataFieldName to set. * @return This builder for chaining. */ public Builder setDataFieldName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } dataFieldName_ = value; onChanged(); return this; } /** *
     * The api.Data field this layer will be parsed into
     * 
* * string data_field_name = 1; * @return This builder for chaining. */ public Builder clearDataFieldName() { dataFieldName_ = getDefaultInstance().getDataFieldName(); onChanged(); return this; } /** *
     * The api.Data field this layer will be parsed into
     * 
* * string data_field_name = 1; * @param value The bytes for dataFieldName to set. * @return This builder for chaining. */ public Builder setDataFieldNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); dataFieldName_ = value; onChanged(); return this; } private java.util.List shapes_ = java.util.Collections.emptyList(); private void ensureShapesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { shapes_ = new java.util.ArrayList(shapes_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.LayerShape, com.clarifai.grpc.api.LayerShape.Builder, com.clarifai.grpc.api.LayerShapeOrBuilder> shapesBuilder_; /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public java.util.List getShapesList() { if (shapesBuilder_ == null) { return java.util.Collections.unmodifiableList(shapes_); } else { return shapesBuilder_.getMessageList(); } } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public int getShapesCount() { if (shapesBuilder_ == null) { return shapes_.size(); } else { return shapesBuilder_.getCount(); } } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public com.clarifai.grpc.api.LayerShape getShapes(int index) { if (shapesBuilder_ == null) { return shapes_.get(index); } else { return shapesBuilder_.getMessage(index); } } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder setShapes( int index, com.clarifai.grpc.api.LayerShape value) { if (shapesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureShapesIsMutable(); shapes_.set(index, value); onChanged(); } else { shapesBuilder_.setMessage(index, value); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder setShapes( int index, com.clarifai.grpc.api.LayerShape.Builder builderForValue) { if (shapesBuilder_ == null) { ensureShapesIsMutable(); shapes_.set(index, builderForValue.build()); onChanged(); } else { shapesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder addShapes(com.clarifai.grpc.api.LayerShape value) { if (shapesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureShapesIsMutable(); shapes_.add(value); onChanged(); } else { shapesBuilder_.addMessage(value); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder addShapes( int index, com.clarifai.grpc.api.LayerShape value) { if (shapesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureShapesIsMutable(); shapes_.add(index, value); onChanged(); } else { shapesBuilder_.addMessage(index, value); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder addShapes( com.clarifai.grpc.api.LayerShape.Builder builderForValue) { if (shapesBuilder_ == null) { ensureShapesIsMutable(); shapes_.add(builderForValue.build()); onChanged(); } else { shapesBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder addShapes( int index, com.clarifai.grpc.api.LayerShape.Builder builderForValue) { if (shapesBuilder_ == null) { ensureShapesIsMutable(); shapes_.add(index, builderForValue.build()); onChanged(); } else { shapesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder addAllShapes( java.lang.Iterable values) { if (shapesBuilder_ == null) { ensureShapesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, shapes_); onChanged(); } else { shapesBuilder_.addAllMessages(values); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder clearShapes() { if (shapesBuilder_ == null) { shapes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { shapesBuilder_.clear(); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public Builder removeShapes(int index) { if (shapesBuilder_ == null) { ensureShapesIsMutable(); shapes_.remove(index); onChanged(); } else { shapesBuilder_.remove(index); } return this; } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public com.clarifai.grpc.api.LayerShape.Builder getShapesBuilder( int index) { return getShapesFieldBuilder().getBuilder(index); } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public com.clarifai.grpc.api.LayerShapeOrBuilder getShapesOrBuilder( int index) { if (shapesBuilder_ == null) { return shapes_.get(index); } else { return shapesBuilder_.getMessageOrBuilder(index); } } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public java.util.List getShapesOrBuilderList() { if (shapesBuilder_ != null) { return shapesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(shapes_); } } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public com.clarifai.grpc.api.LayerShape.Builder addShapesBuilder() { return getShapesFieldBuilder().addBuilder( com.clarifai.grpc.api.LayerShape.getDefaultInstance()); } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public com.clarifai.grpc.api.LayerShape.Builder addShapesBuilder( int index) { return getShapesFieldBuilder().addBuilder( index, com.clarifai.grpc.api.LayerShape.getDefaultInstance()); } /** *
     * Description of the expected shape. Can support multiple support layer shapes.
     * 
* * repeated .clarifai.api.LayerShape shapes = 2; */ public java.util.List getShapesBuilderList() { return getShapesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.LayerShape, com.clarifai.grpc.api.LayerShape.Builder, com.clarifai.grpc.api.LayerShapeOrBuilder> getShapesFieldBuilder() { if (shapesBuilder_ == null) { shapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.LayerShape, com.clarifai.grpc.api.LayerShape.Builder, com.clarifai.grpc.api.LayerShapeOrBuilder>( shapes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); shapes_ = null; } return shapesBuilder_; } private java.lang.Object description_ = ""; /** *
     * Brief description about the layer if needed
     * 
* * string description = 3; * @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; } } /** *
     * Brief description about the layer if needed
     * 
* * string description = 3; * @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; } } /** *
     * Brief description about the layer if needed
     * 
* * string description = 3; * @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; } /** *
     * Brief description about the layer if needed
     * 
* * string description = 3; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * Brief description about the layer if needed
     * 
* * string description = 3; * @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 boolean requiresLabelFilename_ ; /** *
     * Whether this layer should have a label_filename specified and provided
     * 
* * bool requires_label_filename = 4; * @return The requiresLabelFilename. */ @java.lang.Override public boolean getRequiresLabelFilename() { return requiresLabelFilename_; } /** *
     * Whether this layer should have a label_filename specified and provided
     * 
* * bool requires_label_filename = 4; * @param value The requiresLabelFilename to set. * @return This builder for chaining. */ public Builder setRequiresLabelFilename(boolean value) { requiresLabelFilename_ = value; onChanged(); return this; } /** *
     * Whether this layer should have a label_filename specified and provided
     * 
* * bool requires_label_filename = 4; * @return This builder for chaining. */ public Builder clearRequiresLabelFilename() { requiresLabelFilename_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:clarifai.api.ModelLayerInfo) } // @@protoc_insertion_point(class_scope:clarifai.api.ModelLayerInfo) private static final com.clarifai.grpc.api.ModelLayerInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.ModelLayerInfo(); } public static com.clarifai.grpc.api.ModelLayerInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ModelLayerInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ModelLayerInfo(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.ModelLayerInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy