Class OpDef.ArgDef.Builder

  • All Implemented Interfaces:
    Cloneable, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, OpDef.ArgDefOrBuilder
    Enclosing class:
    OpDef.ArgDef

    public static final class OpDef.ArgDef.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
    implements OpDef.ArgDefOrBuilder
     For describing inputs and outputs.
     
    Protobuf type tensorflow.OpDef.ArgDef
    • Method Detail

      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • clear

        public OpDef.ArgDef.Builder clear()
        Specified by:
        clear in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clear in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clear in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • getDescriptorForType

        public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • getDefaultInstanceForType

        public OpDef.ArgDef getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public OpDef.ArgDef build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public OpDef.ArgDef buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

        public OpDef.ArgDef.Builder clone()
        Specified by:
        clone in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clone in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clone in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • setField

        public OpDef.ArgDef.Builder setField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • clearField

        public OpDef.ArgDef.Builder clearField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • clearOneof

        public OpDef.ArgDef.Builder clearOneof​(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearOneof in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • setRepeatedField

        public OpDef.ArgDef.Builder setRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • addRepeatedField

        public OpDef.ArgDef.Builder addRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • mergeFrom

        public OpDef.ArgDef.Builder mergeFrom​(org.nd4j.shade.protobuf.Message other)
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<OpDef.ArgDef.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • mergeFrom

        public OpDef.ArgDef.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                              org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<OpDef.ArgDef.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
         
        string name = 1;
        Specified by:
        getName in interface OpDef.ArgDefOrBuilder
        Returns:
        The name.
      • getNameBytes

        public org.nd4j.shade.protobuf.ByteString getNameBytes()
         Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
         
        string name = 1;
        Specified by:
        getNameBytes in interface OpDef.ArgDefOrBuilder
        Returns:
        The bytes for name.
      • setName

        public OpDef.ArgDef.Builder setName​(String value)
         Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public OpDef.ArgDef.Builder clearName()
         Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public OpDef.ArgDef.Builder setNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDescriptionBytes

        public org.nd4j.shade.protobuf.ByteString getDescriptionBytes()
         Human readable description.
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface OpDef.ArgDefOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public OpDef.ArgDef.Builder setDescription​(String value)
         Human readable description.
         
        string description = 2;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public OpDef.ArgDef.Builder clearDescription()
         Human readable description.
         
        string description = 2;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public OpDef.ArgDef.Builder setDescriptionBytes​(org.nd4j.shade.protobuf.ByteString value)
         Human readable description.
         
        string description = 2;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getTypeValue

        public int getTypeValue()
         Describes the type of one or more tensors that are accepted/produced
         by this input/output arg.  The only legal combinations are:
         * For a single tensor: either the "type" field is set or the
           "type_attr" field is set to the name of an attr with type "type".
         * For a sequence of tensors with the same type: the "number_attr"
           field will be set to the name of an attr with type "int", and
           either the "type" or "type_attr" field will be set as for
           single tensors.
         * For a sequence of tensors, the "type_list_attr" field will be set
           to the name of an attr with type "list(type)".
         
        .tensorflow.DataType type = 3;
        Specified by:
        getTypeValue in interface OpDef.ArgDefOrBuilder
        Returns:
        The enum numeric value on the wire for type.
      • setTypeValue

        public OpDef.ArgDef.Builder setTypeValue​(int value)
         Describes the type of one or more tensors that are accepted/produced
         by this input/output arg.  The only legal combinations are:
         * For a single tensor: either the "type" field is set or the
           "type_attr" field is set to the name of an attr with type "type".
         * For a sequence of tensors with the same type: the "number_attr"
           field will be set to the name of an attr with type "int", and
           either the "type" or "type_attr" field will be set as for
           single tensors.
         * For a sequence of tensors, the "type_list_attr" field will be set
           to the name of an attr with type "list(type)".
         
        .tensorflow.DataType type = 3;
        Parameters:
        value - The enum numeric value on the wire for type to set.
        Returns:
        This builder for chaining.
      • getType

        public DataType getType()
         Describes the type of one or more tensors that are accepted/produced
         by this input/output arg.  The only legal combinations are:
         * For a single tensor: either the "type" field is set or the
           "type_attr" field is set to the name of an attr with type "type".
         * For a sequence of tensors with the same type: the "number_attr"
           field will be set to the name of an attr with type "int", and
           either the "type" or "type_attr" field will be set as for
           single tensors.
         * For a sequence of tensors, the "type_list_attr" field will be set
           to the name of an attr with type "list(type)".
         
        .tensorflow.DataType type = 3;
        Specified by:
        getType in interface OpDef.ArgDefOrBuilder
        Returns:
        The type.
      • setType

        public OpDef.ArgDef.Builder setType​(DataType value)
         Describes the type of one or more tensors that are accepted/produced
         by this input/output arg.  The only legal combinations are:
         * For a single tensor: either the "type" field is set or the
           "type_attr" field is set to the name of an attr with type "type".
         * For a sequence of tensors with the same type: the "number_attr"
           field will be set to the name of an attr with type "int", and
           either the "type" or "type_attr" field will be set as for
           single tensors.
         * For a sequence of tensors, the "type_list_attr" field will be set
           to the name of an attr with type "list(type)".
         
        .tensorflow.DataType type = 3;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public OpDef.ArgDef.Builder clearType()
         Describes the type of one or more tensors that are accepted/produced
         by this input/output arg.  The only legal combinations are:
         * For a single tensor: either the "type" field is set or the
           "type_attr" field is set to the name of an attr with type "type".
         * For a sequence of tensors with the same type: the "number_attr"
           field will be set to the name of an attr with type "int", and
           either the "type" or "type_attr" field will be set as for
           single tensors.
         * For a sequence of tensors, the "type_list_attr" field will be set
           to the name of an attr with type "list(type)".
         
        .tensorflow.DataType type = 3;
        Returns:
        This builder for chaining.
      • getTypeAttr

        public String getTypeAttr()
         if specified, attr must have type "type"
         
        string type_attr = 4;
        Specified by:
        getTypeAttr in interface OpDef.ArgDefOrBuilder
        Returns:
        The typeAttr.
      • getTypeAttrBytes

        public org.nd4j.shade.protobuf.ByteString getTypeAttrBytes()
         if specified, attr must have type "type"
         
        string type_attr = 4;
        Specified by:
        getTypeAttrBytes in interface OpDef.ArgDefOrBuilder
        Returns:
        The bytes for typeAttr.
      • setTypeAttr

        public OpDef.ArgDef.Builder setTypeAttr​(String value)
         if specified, attr must have type "type"
         
        string type_attr = 4;
        Parameters:
        value - The typeAttr to set.
        Returns:
        This builder for chaining.
      • clearTypeAttr

        public OpDef.ArgDef.Builder clearTypeAttr()
         if specified, attr must have type "type"
         
        string type_attr = 4;
        Returns:
        This builder for chaining.
      • setTypeAttrBytes

        public OpDef.ArgDef.Builder setTypeAttrBytes​(org.nd4j.shade.protobuf.ByteString value)
         if specified, attr must have type "type"
         
        string type_attr = 4;
        Parameters:
        value - The bytes for typeAttr to set.
        Returns:
        This builder for chaining.
      • getNumberAttr

        public String getNumberAttr()
         if specified, attr must have type "int"
         
        string number_attr = 5;
        Specified by:
        getNumberAttr in interface OpDef.ArgDefOrBuilder
        Returns:
        The numberAttr.
      • getNumberAttrBytes

        public org.nd4j.shade.protobuf.ByteString getNumberAttrBytes()
         if specified, attr must have type "int"
         
        string number_attr = 5;
        Specified by:
        getNumberAttrBytes in interface OpDef.ArgDefOrBuilder
        Returns:
        The bytes for numberAttr.
      • setNumberAttr

        public OpDef.ArgDef.Builder setNumberAttr​(String value)
         if specified, attr must have type "int"
         
        string number_attr = 5;
        Parameters:
        value - The numberAttr to set.
        Returns:
        This builder for chaining.
      • clearNumberAttr

        public OpDef.ArgDef.Builder clearNumberAttr()
         if specified, attr must have type "int"
         
        string number_attr = 5;
        Returns:
        This builder for chaining.
      • setNumberAttrBytes

        public OpDef.ArgDef.Builder setNumberAttrBytes​(org.nd4j.shade.protobuf.ByteString value)
         if specified, attr must have type "int"
         
        string number_attr = 5;
        Parameters:
        value - The bytes for numberAttr to set.
        Returns:
        This builder for chaining.
      • getTypeListAttr

        public String getTypeListAttr()
         If specified, attr must have type "list(type)", and none of
         type, type_attr, and number_attr may be specified.
         
        string type_list_attr = 6;
        Specified by:
        getTypeListAttr in interface OpDef.ArgDefOrBuilder
        Returns:
        The typeListAttr.
      • getTypeListAttrBytes

        public org.nd4j.shade.protobuf.ByteString getTypeListAttrBytes()
         If specified, attr must have type "list(type)", and none of
         type, type_attr, and number_attr may be specified.
         
        string type_list_attr = 6;
        Specified by:
        getTypeListAttrBytes in interface OpDef.ArgDefOrBuilder
        Returns:
        The bytes for typeListAttr.
      • setTypeListAttr

        public OpDef.ArgDef.Builder setTypeListAttr​(String value)
         If specified, attr must have type "list(type)", and none of
         type, type_attr, and number_attr may be specified.
         
        string type_list_attr = 6;
        Parameters:
        value - The typeListAttr to set.
        Returns:
        This builder for chaining.
      • clearTypeListAttr

        public OpDef.ArgDef.Builder clearTypeListAttr()
         If specified, attr must have type "list(type)", and none of
         type, type_attr, and number_attr may be specified.
         
        string type_list_attr = 6;
        Returns:
        This builder for chaining.
      • setTypeListAttrBytes

        public OpDef.ArgDef.Builder setTypeListAttrBytes​(org.nd4j.shade.protobuf.ByteString value)
         If specified, attr must have type "list(type)", and none of
         type, type_attr, and number_attr may be specified.
         
        string type_list_attr = 6;
        Parameters:
        value - The bytes for typeListAttr to set.
        Returns:
        This builder for chaining.
      • getIsRef

        public boolean getIsRef()
         For inputs: if true, the inputs are required to be refs.
           By default, inputs can be either refs or non-refs.
         For outputs: if true, outputs are refs, otherwise they are not.
         
        bool is_ref = 16;
        Specified by:
        getIsRef in interface OpDef.ArgDefOrBuilder
        Returns:
        The isRef.
      • setIsRef

        public OpDef.ArgDef.Builder setIsRef​(boolean value)
         For inputs: if true, the inputs are required to be refs.
           By default, inputs can be either refs or non-refs.
         For outputs: if true, outputs are refs, otherwise they are not.
         
        bool is_ref = 16;
        Parameters:
        value - The isRef to set.
        Returns:
        This builder for chaining.
      • clearIsRef

        public OpDef.ArgDef.Builder clearIsRef()
         For inputs: if true, the inputs are required to be refs.
           By default, inputs can be either refs or non-refs.
         For outputs: if true, outputs are refs, otherwise they are not.
         
        bool is_ref = 16;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final OpDef.ArgDef.Builder setUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>
      • mergeUnknownFields

        public final OpDef.ArgDef.Builder mergeUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OpDef.ArgDef.Builder>