Class ScriptNode.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ScriptNode.Builder>
com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
com.soulfiremc.grpc.generated.ScriptNode.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ScriptNodeOrBuilder, Cloneable
Enclosing class:
ScriptNode

public static final class ScriptNode.Builder extends com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder> implements ScriptNodeOrBuilder
Represents a single node in the visual script graph.
Nodes are the building blocks of scripts, each performing a specific action
or computation when executed.
Protobuf type soulfire.v1.ScriptNode
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • clear

      public ScriptNode.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • getDefaultInstanceForType

      public ScriptNode getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ScriptNode build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ScriptNode buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ScriptNode.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ScriptNode.Builder>
    • mergeFrom

      public ScriptNode.Builder mergeFrom(ScriptNode other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ScriptNode.Builder>
    • mergeFrom

      public ScriptNode.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ScriptNode.Builder>
      Throws:
      IOException
    • getId

      public String getId()
      Unique identifier for this node within the script.
      Used to reference this node in edges and during execution tracking.
      Format: UUID string.
      
      string id = 1;
      Specified by:
      getId in interface ScriptNodeOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
      Unique identifier for this node within the script.
      Used to reference this node in edges and during execution tracking.
      Format: UUID string.
      
      string id = 1;
      Specified by:
      getIdBytes in interface ScriptNodeOrBuilder
      Returns:
      The bytes for id.
    • setId

      public ScriptNode.Builder setId(String value)
      Unique identifier for this node within the script.
      Used to reference this node in edges and during execution tracking.
      Format: UUID string.
      
      string id = 1;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public ScriptNode.Builder clearId()
      Unique identifier for this node within the script.
      Used to reference this node in edges and during execution tracking.
      Format: UUID string.
      
      string id = 1;
      Returns:
      This builder for chaining.
    • setIdBytes

      public ScriptNode.Builder setIdBytes(com.google.protobuf.ByteString value)
      Unique identifier for this node within the script.
      Used to reference this node in edges and during execution tracking.
      Format: UUID string.
      
      string id = 1;
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getType

      public String getType()
      The type identifier for this node, determining its behavior and available ports.
      Examples: "trigger.on_chat", "action.send_message", "control.delay", "logic.condition".
      
      string type = 2;
      Specified by:
      getType in interface ScriptNodeOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
      The type identifier for this node, determining its behavior and available ports.
      Examples: "trigger.on_chat", "action.send_message", "control.delay", "logic.condition".
      
      string type = 2;
      Specified by:
      getTypeBytes in interface ScriptNodeOrBuilder
      Returns:
      The bytes for type.
    • setType

      public ScriptNode.Builder setType(String value)
      The type identifier for this node, determining its behavior and available ports.
      Examples: "trigger.on_chat", "action.send_message", "control.delay", "logic.condition".
      
      string type = 2;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public ScriptNode.Builder clearType()
      The type identifier for this node, determining its behavior and available ports.
      Examples: "trigger.on_chat", "action.send_message", "control.delay", "logic.condition".
      
      string type = 2;
      Returns:
      This builder for chaining.
    • setTypeBytes

      public ScriptNode.Builder setTypeBytes(com.google.protobuf.ByteString value)
      The type identifier for this node, determining its behavior and available ports.
      Examples: "trigger.on_chat", "action.send_message", "control.delay", "logic.condition".
      
      string type = 2;
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • hasPosition

      public boolean hasPosition()
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
      Specified by:
      hasPosition in interface ScriptNodeOrBuilder
      Returns:
      Whether the position field is set.
    • getPosition

      public Position getPosition()
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
      Specified by:
      getPosition in interface ScriptNodeOrBuilder
      Returns:
      The position.
    • setPosition

      public ScriptNode.Builder setPosition(Position value)
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
    • setPosition

      public ScriptNode.Builder setPosition(Position.Builder builderForValue)
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
    • mergePosition

      public ScriptNode.Builder mergePosition(Position value)
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
    • clearPosition

      public ScriptNode.Builder clearPosition()
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
    • getPositionBuilder

      public Position.Builder getPositionBuilder()
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
    • getPositionOrBuilder

      public PositionOrBuilder getPositionOrBuilder()
      The visual position of this node on the editor canvas.
      Persisted to maintain the user's layout when reopening the script.
      
      .soulfire.v1.Position position = 3;
      Specified by:
      getPositionOrBuilder in interface ScriptNodeOrBuilder
    • getDataCount

      public int getDataCount()
      Description copied from interface: ScriptNodeOrBuilder
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
      Specified by:
      getDataCount in interface ScriptNodeOrBuilder
    • containsData

      public boolean containsData(String key)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
      Specified by:
      containsData in interface ScriptNodeOrBuilder
    • getData

      @Deprecated public Map<String, com.google.protobuf.Value> getData()
      Deprecated.
      Use getDataMap() instead.
      Specified by:
      getData in interface ScriptNodeOrBuilder
    • getDataMap

      public Map<String, com.google.protobuf.Value> getDataMap()
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
      Specified by:
      getDataMap in interface ScriptNodeOrBuilder
    • getDataOrDefault

      public com.google.protobuf.Value getDataOrDefault(String key, com.google.protobuf.Value defaultValue)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
      Specified by:
      getDataOrDefault in interface ScriptNodeOrBuilder
    • getDataOrThrow

      public com.google.protobuf.Value getDataOrThrow(String key)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
      Specified by:
      getDataOrThrow in interface ScriptNodeOrBuilder
    • clearData

      public ScriptNode.Builder clearData()
    • removeData

      public ScriptNode.Builder removeData(String key)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
    • getMutableData

      @Deprecated public Map<String, com.google.protobuf.Value> getMutableData()
      Deprecated.
      Use alternate mutation accessors instead.
    • putData

      public ScriptNode.Builder putData(String key, com.google.protobuf.Value value)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
    • putAllData

      public ScriptNode.Builder putAllData(Map<String, com.google.protobuf.Value> values)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
    • putDataBuilderIfAbsent

      public com.google.protobuf.Value.Builder putDataBuilderIfAbsent(String key)
      Configuration data for this node instance.
      Contains node-specific settings and parameter values.
      The structure depends on the node type.
      
      map<string, .google.protobuf.Value> data = 4;
    • getMuted

      public boolean getMuted()
      Whether this node is muted (bypassed during execution).
      When muted, the node passes inputs directly to outputs without processing.
      Visually shown as grayed out with pass-through indicator.
      
      bool muted = 5;
      Specified by:
      getMuted in interface ScriptNodeOrBuilder
      Returns:
      The muted.
    • setMuted

      public ScriptNode.Builder setMuted(boolean value)
      Whether this node is muted (bypassed during execution).
      When muted, the node passes inputs directly to outputs without processing.
      Visually shown as grayed out with pass-through indicator.
      
      bool muted = 5;
      Parameters:
      value - The muted to set.
      Returns:
      This builder for chaining.
    • clearMuted

      public ScriptNode.Builder clearMuted()
      Whether this node is muted (bypassed during execution).
      When muted, the node passes inputs directly to outputs without processing.
      Visually shown as grayed out with pass-through indicator.
      
      bool muted = 5;
      Returns:
      This builder for chaining.
    • getCollapsed

      public boolean getCollapsed()
      Whether this node is collapsed (showing only header).
      Collapsed nodes still function normally but take less visual space.
      
      bool collapsed = 6;
      Specified by:
      getCollapsed in interface ScriptNodeOrBuilder
      Returns:
      The collapsed.
    • setCollapsed

      public ScriptNode.Builder setCollapsed(boolean value)
      Whether this node is collapsed (showing only header).
      Collapsed nodes still function normally but take less visual space.
      
      bool collapsed = 6;
      Parameters:
      value - The collapsed to set.
      Returns:
      This builder for chaining.
    • clearCollapsed

      public ScriptNode.Builder clearCollapsed()
      Whether this node is collapsed (showing only header).
      Collapsed nodes still function normally but take less visual space.
      
      bool collapsed = 6;
      Returns:
      This builder for chaining.
    • hasWidth

      public boolean hasWidth()
      For frame nodes: the width of the frame.
      
      optional double width = 7;
      Specified by:
      hasWidth in interface ScriptNodeOrBuilder
      Returns:
      Whether the width field is set.
    • getWidth

      public double getWidth()
      For frame nodes: the width of the frame.
      
      optional double width = 7;
      Specified by:
      getWidth in interface ScriptNodeOrBuilder
      Returns:
      The width.
    • setWidth

      public ScriptNode.Builder setWidth(double value)
      For frame nodes: the width of the frame.
      
      optional double width = 7;
      Parameters:
      value - The width to set.
      Returns:
      This builder for chaining.
    • clearWidth

      public ScriptNode.Builder clearWidth()
      For frame nodes: the width of the frame.
      
      optional double width = 7;
      Returns:
      This builder for chaining.
    • hasHeight

      public boolean hasHeight()
      For frame nodes: the height of the frame.
      
      optional double height = 8;
      Specified by:
      hasHeight in interface ScriptNodeOrBuilder
      Returns:
      Whether the height field is set.
    • getHeight

      public double getHeight()
      For frame nodes: the height of the frame.
      
      optional double height = 8;
      Specified by:
      getHeight in interface ScriptNodeOrBuilder
      Returns:
      The height.
    • setHeight

      public ScriptNode.Builder setHeight(double value)
      For frame nodes: the height of the frame.
      
      optional double height = 8;
      Parameters:
      value - The height to set.
      Returns:
      This builder for chaining.
    • clearHeight

      public ScriptNode.Builder clearHeight()
      For frame nodes: the height of the frame.
      
      optional double height = 8;
      Returns:
      This builder for chaining.
    • getContainedNodesList

      public com.google.protobuf.ProtocolStringList getContainedNodesList()
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Specified by:
      getContainedNodesList in interface ScriptNodeOrBuilder
      Returns:
      A list containing the containedNodes.
    • getContainedNodesCount

      public int getContainedNodesCount()
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Specified by:
      getContainedNodesCount in interface ScriptNodeOrBuilder
      Returns:
      The count of containedNodes.
    • getContainedNodes

      public String getContainedNodes(int index)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Specified by:
      getContainedNodes in interface ScriptNodeOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The containedNodes at the given index.
    • getContainedNodesBytes

      public com.google.protobuf.ByteString getContainedNodesBytes(int index)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Specified by:
      getContainedNodesBytes in interface ScriptNodeOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the containedNodes at the given index.
    • setContainedNodes

      public ScriptNode.Builder setContainedNodes(int index, String value)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Parameters:
      index - The index to set the value at.
      value - The containedNodes to set.
      Returns:
      This builder for chaining.
    • addContainedNodes

      public ScriptNode.Builder addContainedNodes(String value)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Parameters:
      value - The containedNodes to add.
      Returns:
      This builder for chaining.
    • addAllContainedNodes

      public ScriptNode.Builder addAllContainedNodes(Iterable<String> values)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Parameters:
      values - The containedNodes to add.
      Returns:
      This builder for chaining.
    • clearContainedNodes

      public ScriptNode.Builder clearContainedNodes()
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Returns:
      This builder for chaining.
    • addContainedNodesBytes

      public ScriptNode.Builder addContainedNodesBytes(com.google.protobuf.ByteString value)
      For frame nodes: IDs of nodes contained within this frame.
      Updated automatically based on node positions.
      
      repeated string contained_nodes = 9;
      Parameters:
      value - The bytes of the containedNodes to add.
      Returns:
      This builder for chaining.
    • getLabel

      public String getLabel()
      Optional label override for this node instance.
      If set, displayed instead of the node type's default label.
      
      string label = 10;
      Specified by:
      getLabel in interface ScriptNodeOrBuilder
      Returns:
      The label.
    • getLabelBytes

      public com.google.protobuf.ByteString getLabelBytes()
      Optional label override for this node instance.
      If set, displayed instead of the node type's default label.
      
      string label = 10;
      Specified by:
      getLabelBytes in interface ScriptNodeOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public ScriptNode.Builder setLabel(String value)
      Optional label override for this node instance.
      If set, displayed instead of the node type's default label.
      
      string label = 10;
      Parameters:
      value - The label to set.
      Returns:
      This builder for chaining.
    • clearLabel

      public ScriptNode.Builder clearLabel()
      Optional label override for this node instance.
      If set, displayed instead of the node type's default label.
      
      string label = 10;
      Returns:
      This builder for chaining.
    • setLabelBytes

      public ScriptNode.Builder setLabelBytes(com.google.protobuf.ByteString value)
      Optional label override for this node instance.
      If set, displayed instead of the node type's default label.
      
      string label = 10;
      Parameters:
      value - The bytes for label to set.
      Returns:
      This builder for chaining.
    • hasResolvedType

      public boolean hasResolvedType()
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Specified by:
      hasResolvedType in interface ScriptNodeOrBuilder
      Returns:
      Whether the resolvedType field is set.
    • getResolvedTypeValue

      public int getResolvedTypeValue()
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Specified by:
      getResolvedTypeValue in interface ScriptNodeOrBuilder
      Returns:
      The enum numeric value on the wire for resolvedType.
    • setResolvedTypeValue

      public ScriptNode.Builder setResolvedTypeValue(int value)
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Parameters:
      value - The enum numeric value on the wire for resolvedType to set.
      Returns:
      This builder for chaining.
      Throws:
      IllegalArgumentException - if UNRECOGNIZED is provided.
    • getResolvedType

      public PortType getResolvedType()
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Specified by:
      getResolvedType in interface ScriptNodeOrBuilder
      Returns:
      The resolvedType.
    • setResolvedType

      public ScriptNode.Builder setResolvedType(PortType value)
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Parameters:
      value - The resolvedType to set.
      Returns:
      This builder for chaining.
    • clearResolvedType

      public ScriptNode.Builder clearResolvedType()
      For reroute nodes: the resolved port type based on connections.
      Dynamically updated when connections change.
      
      optional .soulfire.v1.PortType resolved_type = 11;
      Returns:
      This builder for chaining.
    • getParentFrameId

      public String getParentFrameId()
      Parent frame node ID, if this node is inside a frame.
      
      string parent_frame_id = 12;
      Specified by:
      getParentFrameId in interface ScriptNodeOrBuilder
      Returns:
      The parentFrameId.
    • getParentFrameIdBytes

      public com.google.protobuf.ByteString getParentFrameIdBytes()
      Parent frame node ID, if this node is inside a frame.
      
      string parent_frame_id = 12;
      Specified by:
      getParentFrameIdBytes in interface ScriptNodeOrBuilder
      Returns:
      The bytes for parentFrameId.
    • setParentFrameId

      public ScriptNode.Builder setParentFrameId(String value)
      Parent frame node ID, if this node is inside a frame.
      
      string parent_frame_id = 12;
      Parameters:
      value - The parentFrameId to set.
      Returns:
      This builder for chaining.
    • clearParentFrameId

      public ScriptNode.Builder clearParentFrameId()
      Parent frame node ID, if this node is inside a frame.
      
      string parent_frame_id = 12;
      Returns:
      This builder for chaining.
    • setParentFrameIdBytes

      public ScriptNode.Builder setParentFrameIdBytes(com.google.protobuf.ByteString value)
      Parent frame node ID, if this node is inside a frame.
      
      string parent_frame_id = 12;
      Parameters:
      value - The bytes for parentFrameId to set.
      Returns:
      This builder for chaining.