Package ai.onnx.proto

Class OnnxMl.AttributeProto

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
ai.onnx.proto.OnnxMl.AttributeProto
All Implemented Interfaces:
OnnxMl.AttributeProtoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
OnnxMl

public static final class OnnxMl.AttributeProto extends com.google.protobuf.GeneratedMessageV3 implements OnnxMl.AttributeProtoOrBuilder
 Attributes
 A named attribute containing either singular float, integer, string, graph,
 and tensor values, or repeated float, integer, string, graph, and tensor values.
 An AttributeProto MUST contain the name field, and *only one* of the
 following content fields, effectively enforcing a C/C++ union equivalent.
 
Protobuf type onnx.AttributeProto
See Also:
  • Field Details

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasName

      public boolean hasName()
       The name field MUST be present for this version of the IR.
       
      optional string name = 1;
      Specified by:
      hasName in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The name field MUST be present for this version of the IR.
       
      optional string name = 1;
      Specified by:
      getName in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name field MUST be present for this version of the IR.
       
      optional string name = 1;
      Specified by:
      getNameBytes in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The bytes for name.
    • hasRefAttrName

      public boolean hasRefAttrName()
       if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
       In this case, this AttributeProto does not contain data, and it's a reference of attribute
       in parent scope.
       NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
       
      optional string ref_attr_name = 21;
      Specified by:
      hasRefAttrName in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the refAttrName field is set.
    • getRefAttrName

      public String getRefAttrName()
       if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
       In this case, this AttributeProto does not contain data, and it's a reference of attribute
       in parent scope.
       NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
       
      optional string ref_attr_name = 21;
      Specified by:
      getRefAttrName in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The refAttrName.
    • getRefAttrNameBytes

      public com.google.protobuf.ByteString getRefAttrNameBytes()
       if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.
       In this case, this AttributeProto does not contain data, and it's a reference of attribute
       in parent scope.
       NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.
       
      optional string ref_attr_name = 21;
      Specified by:
      getRefAttrNameBytes in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The bytes for refAttrName.
    • hasDocString

      public boolean hasDocString()
       A human-readable documentation for this attribute. Markdown is allowed.
       
      optional string doc_string = 13;
      Specified by:
      hasDocString in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the docString field is set.
    • getDocString

      public String getDocString()
       A human-readable documentation for this attribute. Markdown is allowed.
       
      optional string doc_string = 13;
      Specified by:
      getDocString in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The docString.
    • getDocStringBytes

      public com.google.protobuf.ByteString getDocStringBytes()
       A human-readable documentation for this attribute. Markdown is allowed.
       
      optional string doc_string = 13;
      Specified by:
      getDocStringBytes in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The bytes for docString.
    • hasType

      public boolean hasType()
       The type field MUST be present for this version of the IR.
       For 0.0.1 versions of the IR, this field was not defined, and
       implementations needed to use has_field heuristics to determine
       which value field was in use.  For IR_VERSION 0.0.2 or later, this
       field MUST be set and match the f|i|s|t|... field in use.  This
       change was made to accommodate proto3 implementations.
       
      optional .onnx.AttributeProto.AttributeType type = 20;
      Specified by:
      hasType in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the type field is set.
    • getType

       The type field MUST be present for this version of the IR.
       For 0.0.1 versions of the IR, this field was not defined, and
       implementations needed to use has_field heuristics to determine
       which value field was in use.  For IR_VERSION 0.0.2 or later, this
       field MUST be set and match the f|i|s|t|... field in use.  This
       change was made to accommodate proto3 implementations.
       
      optional .onnx.AttributeProto.AttributeType type = 20;
      Specified by:
      getType in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The type.
    • hasF

      public boolean hasF()
       Exactly ONE of the following fields must be present for this version of the IR
       
      optional float f = 2;
      Specified by:
      hasF in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the f field is set.
    • getF

      public float getF()
       Exactly ONE of the following fields must be present for this version of the IR
       
      optional float f = 2;
      Specified by:
      getF in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The f.
    • hasI

      public boolean hasI()
       int
       
      optional int64 i = 3;
      Specified by:
      hasI in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the i field is set.
    • getI

      public long getI()
       int
       
      optional int64 i = 3;
      Specified by:
      getI in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The i.
    • hasS

      public boolean hasS()
       UTF-8 string
       
      optional bytes s = 4;
      Specified by:
      hasS in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the s field is set.
    • getS

      public com.google.protobuf.ByteString getS()
       UTF-8 string
       
      optional bytes s = 4;
      Specified by:
      getS in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The s.
    • hasT

      public boolean hasT()
       tensor value
       
      optional .onnx.TensorProto t = 5;
      Specified by:
      hasT in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the t field is set.
    • getT

      public OnnxMl.TensorProto getT()
       tensor value
       
      optional .onnx.TensorProto t = 5;
      Specified by:
      getT in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The t.
    • getTOrBuilder

      public OnnxMl.TensorProtoOrBuilder getTOrBuilder()
       tensor value
       
      optional .onnx.TensorProto t = 5;
      Specified by:
      getTOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • hasG

      public boolean hasG()
       graph
       
      optional .onnx.GraphProto g = 6;
      Specified by:
      hasG in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the g field is set.
    • getG

      public OnnxMl.GraphProto getG()
       graph
       
      optional .onnx.GraphProto g = 6;
      Specified by:
      getG in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The g.
    • getGOrBuilder

      public OnnxMl.GraphProtoOrBuilder getGOrBuilder()
       graph
       
      optional .onnx.GraphProto g = 6;
      Specified by:
      getGOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • hasSparseTensor

      public boolean hasSparseTensor()
       sparse tensor value
       
      optional .onnx.SparseTensorProto sparse_tensor = 22;
      Specified by:
      hasSparseTensor in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      Whether the sparseTensor field is set.
    • getSparseTensor

      public OnnxMl.SparseTensorProto getSparseTensor()
       sparse tensor value
       
      optional .onnx.SparseTensorProto sparse_tensor = 22;
      Specified by:
      getSparseTensor in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The sparseTensor.
    • getSparseTensorOrBuilder

      public OnnxMl.SparseTensorProtoOrBuilder getSparseTensorOrBuilder()
       sparse tensor value
       
      optional .onnx.SparseTensorProto sparse_tensor = 22;
      Specified by:
      getSparseTensorOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • getFloatsList

      public List<Float> getFloatsList()
       list of floats
       
      repeated float floats = 7;
      Specified by:
      getFloatsList in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      A list containing the floats.
    • getFloatsCount

      public int getFloatsCount()
       list of floats
       
      repeated float floats = 7;
      Specified by:
      getFloatsCount in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The count of floats.
    • getFloats

      public float getFloats(int index)
       list of floats
       
      repeated float floats = 7;
      Specified by:
      getFloats in interface OnnxMl.AttributeProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The floats at the given index.
    • getIntsList

      public List<Long> getIntsList()
       list of ints
       
      repeated int64 ints = 8;
      Specified by:
      getIntsList in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      A list containing the ints.
    • getIntsCount

      public int getIntsCount()
       list of ints
       
      repeated int64 ints = 8;
      Specified by:
      getIntsCount in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The count of ints.
    • getInts

      public long getInts(int index)
       list of ints
       
      repeated int64 ints = 8;
      Specified by:
      getInts in interface OnnxMl.AttributeProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The ints at the given index.
    • getStringsList

      public List<com.google.protobuf.ByteString> getStringsList()
       list of UTF-8 strings
       
      repeated bytes strings = 9;
      Specified by:
      getStringsList in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      A list containing the strings.
    • getStringsCount

      public int getStringsCount()
       list of UTF-8 strings
       
      repeated bytes strings = 9;
      Specified by:
      getStringsCount in interface OnnxMl.AttributeProtoOrBuilder
      Returns:
      The count of strings.
    • getStrings

      public com.google.protobuf.ByteString getStrings(int index)
       list of UTF-8 strings
       
      repeated bytes strings = 9;
      Specified by:
      getStrings in interface OnnxMl.AttributeProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The strings at the given index.
    • getTensorsList

      public List<OnnxMl.TensorProto> getTensorsList()
       list of tensors
       
      repeated .onnx.TensorProto tensors = 10;
      Specified by:
      getTensorsList in interface OnnxMl.AttributeProtoOrBuilder
    • getTensorsOrBuilderList

      public List<? extends OnnxMl.TensorProtoOrBuilder> getTensorsOrBuilderList()
       list of tensors
       
      repeated .onnx.TensorProto tensors = 10;
      Specified by:
      getTensorsOrBuilderList in interface OnnxMl.AttributeProtoOrBuilder
    • getTensorsCount

      public int getTensorsCount()
       list of tensors
       
      repeated .onnx.TensorProto tensors = 10;
      Specified by:
      getTensorsCount in interface OnnxMl.AttributeProtoOrBuilder
    • getTensors

      public OnnxMl.TensorProto getTensors(int index)
       list of tensors
       
      repeated .onnx.TensorProto tensors = 10;
      Specified by:
      getTensors in interface OnnxMl.AttributeProtoOrBuilder
    • getTensorsOrBuilder

      public OnnxMl.TensorProtoOrBuilder getTensorsOrBuilder(int index)
       list of tensors
       
      repeated .onnx.TensorProto tensors = 10;
      Specified by:
      getTensorsOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • getGraphsList

      public List<OnnxMl.GraphProto> getGraphsList()
       list of graph
       
      repeated .onnx.GraphProto graphs = 11;
      Specified by:
      getGraphsList in interface OnnxMl.AttributeProtoOrBuilder
    • getGraphsOrBuilderList

      public List<? extends OnnxMl.GraphProtoOrBuilder> getGraphsOrBuilderList()
       list of graph
       
      repeated .onnx.GraphProto graphs = 11;
      Specified by:
      getGraphsOrBuilderList in interface OnnxMl.AttributeProtoOrBuilder
    • getGraphsCount

      public int getGraphsCount()
       list of graph
       
      repeated .onnx.GraphProto graphs = 11;
      Specified by:
      getGraphsCount in interface OnnxMl.AttributeProtoOrBuilder
    • getGraphs

      public OnnxMl.GraphProto getGraphs(int index)
       list of graph
       
      repeated .onnx.GraphProto graphs = 11;
      Specified by:
      getGraphs in interface OnnxMl.AttributeProtoOrBuilder
    • getGraphsOrBuilder

      public OnnxMl.GraphProtoOrBuilder getGraphsOrBuilder(int index)
       list of graph
       
      repeated .onnx.GraphProto graphs = 11;
      Specified by:
      getGraphsOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • getSparseTensorsList

      public List<OnnxMl.SparseTensorProto> getSparseTensorsList()
       list of sparse tensors
       
      repeated .onnx.SparseTensorProto sparse_tensors = 23;
      Specified by:
      getSparseTensorsList in interface OnnxMl.AttributeProtoOrBuilder
    • getSparseTensorsOrBuilderList

      public List<? extends OnnxMl.SparseTensorProtoOrBuilder> getSparseTensorsOrBuilderList()
       list of sparse tensors
       
      repeated .onnx.SparseTensorProto sparse_tensors = 23;
      Specified by:
      getSparseTensorsOrBuilderList in interface OnnxMl.AttributeProtoOrBuilder
    • getSparseTensorsCount

      public int getSparseTensorsCount()
       list of sparse tensors
       
      repeated .onnx.SparseTensorProto sparse_tensors = 23;
      Specified by:
      getSparseTensorsCount in interface OnnxMl.AttributeProtoOrBuilder
    • getSparseTensors

      public OnnxMl.SparseTensorProto getSparseTensors(int index)
       list of sparse tensors
       
      repeated .onnx.SparseTensorProto sparse_tensors = 23;
      Specified by:
      getSparseTensors in interface OnnxMl.AttributeProtoOrBuilder
    • getSparseTensorsOrBuilder

      public OnnxMl.SparseTensorProtoOrBuilder getSparseTensorsOrBuilder(int index)
       list of sparse tensors
       
      repeated .onnx.SparseTensorProto sparse_tensors = 23;
      Specified by:
      getSparseTensorsOrBuilder in interface OnnxMl.AttributeProtoOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OnnxMl.AttributeProto parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OnnxMl.AttributeProto parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.AttributeProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OnnxMl.AttributeProto.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OnnxMl.AttributeProto.Builder newBuilder()
    • newBuilder

      public static OnnxMl.AttributeProto.Builder newBuilder(OnnxMl.AttributeProto prototype)
    • toBuilder

      public OnnxMl.AttributeProto.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OnnxMl.AttributeProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static OnnxMl.AttributeProto getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OnnxMl.AttributeProto> parser()
    • getParserForType

      public com.google.protobuf.Parser<OnnxMl.AttributeProto> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public OnnxMl.AttributeProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder