Class Shell.FileData.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Shell.FileData,Shell.FileData.Builder>
com.viam.service.shell.v1.Shell.FileData.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Shell.FileDataOrBuilder, Cloneable
Enclosing class:
Shell.FileData

public static final class Shell.FileData.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Shell.FileData,Shell.FileData.Builder> implements Shell.FileDataOrBuilder
 FileData contains partial (sometimes complete) information about a File.
 When transmitting FileData with CopyFilesToMachine and CopyFilesFromMachine,
 it MUST initially contain its name, size, and is_dir. Depending on whether
 preservation is in use, the mod_time and mode fields may be initially set
 as well. On all transmissions, data and eof must be set. Because files are
 sent one-by-one, it is currently permitted to exclude the initially set fields.
 If this ever changes, a new scheme should be used for identifying files (like a number)
 in order to reduce data transmission while allowing out-of-order transfers.
 eof must be true and its own message once no more data is to be sent for this file.
 
Protobuf type viam.service.shell.v1.FileData
  • Method Details

    • getName

      public String getName()
      string name = 1 [json_name = "name"];
      Specified by:
      getName in interface Shell.FileDataOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
      string name = 1 [json_name = "name"];
      Specified by:
      getNameBytes in interface Shell.FileDataOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Shell.FileData.Builder setName(String value)
      string name = 1 [json_name = "name"];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Shell.FileData.Builder clearName()
      string name = 1 [json_name = "name"];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Shell.FileData.Builder setNameBytes(com.google.protobuf.ByteString value)
      string name = 1 [json_name = "name"];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getSize

      public long getSize()
      int64 size = 2 [json_name = "size"];
      Specified by:
      getSize in interface Shell.FileDataOrBuilder
      Returns:
      The size.
    • setSize

      public Shell.FileData.Builder setSize(long value)
      int64 size = 2 [json_name = "size"];
      Parameters:
      value - The size to set.
      Returns:
      This builder for chaining.
    • clearSize

      public Shell.FileData.Builder clearSize()
      int64 size = 2 [json_name = "size"];
      Returns:
      This builder for chaining.
    • getIsDir

      public boolean getIsDir()
      bool is_dir = 3 [json_name = "isDir"];
      Specified by:
      getIsDir in interface Shell.FileDataOrBuilder
      Returns:
      The isDir.
    • setIsDir

      public Shell.FileData.Builder setIsDir(boolean value)
      bool is_dir = 3 [json_name = "isDir"];
      Parameters:
      value - The isDir to set.
      Returns:
      This builder for chaining.
    • clearIsDir

      public Shell.FileData.Builder clearIsDir()
      bool is_dir = 3 [json_name = "isDir"];
      Returns:
      This builder for chaining.
    • getData

      public com.google.protobuf.ByteString getData()
      bytes data = 4 [json_name = "data"];
      Specified by:
      getData in interface Shell.FileDataOrBuilder
      Returns:
      The data.
    • setData

      public Shell.FileData.Builder setData(com.google.protobuf.ByteString value)
      bytes data = 4 [json_name = "data"];
      Parameters:
      value - The data to set.
      Returns:
      This builder for chaining.
    • clearData

      public Shell.FileData.Builder clearData()
      bytes data = 4 [json_name = "data"];
      Returns:
      This builder for chaining.
    • getEof

      public boolean getEof()
      bool eof = 5 [json_name = "eof"];
      Specified by:
      getEof in interface Shell.FileDataOrBuilder
      Returns:
      The eof.
    • setEof

      public Shell.FileData.Builder setEof(boolean value)
      bool eof = 5 [json_name = "eof"];
      Parameters:
      value - The eof to set.
      Returns:
      This builder for chaining.
    • clearEof

      public Shell.FileData.Builder clearEof()
      bool eof = 5 [json_name = "eof"];
      Returns:
      This builder for chaining.
    • hasModTime

      public boolean hasModTime()
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
      Specified by:
      hasModTime in interface Shell.FileDataOrBuilder
      Returns:
      Whether the modTime field is set.
    • getModTime

      public com.google.protobuf.Timestamp getModTime()
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
      Specified by:
      getModTime in interface Shell.FileDataOrBuilder
      Returns:
      The modTime.
    • setModTime

      public Shell.FileData.Builder setModTime(com.google.protobuf.Timestamp value)
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
    • setModTime

      public Shell.FileData.Builder setModTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
    • mergeModTime

      public Shell.FileData.Builder mergeModTime(com.google.protobuf.Timestamp value)
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
    • clearModTime

      public Shell.FileData.Builder clearModTime()
       Note(erd): maybe support access time in the future if needed
       
      optional .google.protobuf.Timestamp mod_time = 6 [json_name = "modTime"];
    • hasMode

      public boolean hasMode()
      optional uint32 mode = 7 [json_name = "mode"];
      Specified by:
      hasMode in interface Shell.FileDataOrBuilder
      Returns:
      Whether the mode field is set.
    • getMode

      public int getMode()
      optional uint32 mode = 7 [json_name = "mode"];
      Specified by:
      getMode in interface Shell.FileDataOrBuilder
      Returns:
      The mode.
    • setMode

      public Shell.FileData.Builder setMode(int value)
      optional uint32 mode = 7 [json_name = "mode"];
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • clearMode

      public Shell.FileData.Builder clearMode()
      optional uint32 mode = 7 [json_name = "mode"];
      Returns:
      This builder for chaining.