Class FileWriteRequest

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable, FileWriteRequestOrBuilder

    public final class FileWriteRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements FileWriteRequestOrBuilder
    
     Request to create or update a FILE and store content to the platform.
     @see TracDataApi.createFile
     @see TracDataApi.updateFile
     
    Protobuf type tracdap.api.FileWriteRequest
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  FileWriteRequest.Builder
      Request to create or update a FILE and store content to the platform.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      com.google.protobuf.ByteString getContent()
      A chunk of the file content The file content should be sent as a stream of chunks (byte buffers), with one chunk in each message.
      static FileWriteRequest getDefaultInstance()  
      FileWriteRequest getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      java.lang.String getMimeType()
      Mime type of the file being saved, always required Must be a valid mime type.
      com.google.protobuf.ByteString getMimeTypeBytes()
      Mime type of the file being saved, always required Must be a valid mime type.
      java.lang.String getName()
      File name of the file being saved, always required Must be a valid file name with no path component (i.e.
      com.google.protobuf.ByteString getNameBytes()
      File name of the file being saved, always required Must be a valid file name with no path component (i.e.
      com.google.protobuf.Parser<FileWriteRequest> getParserForType()  
      org.finos.tracdap.metadata.TagSelector getPriorVersion()
      Prior object/tag version to use for update operations This field should be omitted when creating a new file.
      org.finos.tracdap.metadata.TagSelectorOrBuilder getPriorVersionOrBuilder()
      Prior object/tag version to use for update operations This field should be omitted when creating a new file.
      int getSerializedSize()  
      long getSize()
      Size of the file being saved, if known in advance When a size is supplied, TRAC will check the size against the number of bytes stored.
      org.finos.tracdap.metadata.TagUpdate getTagUpdates​(int index)
      Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.
      int getTagUpdatesCount()
      Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.
      java.util.List<org.finos.tracdap.metadata.TagUpdate> getTagUpdatesList()
      Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.
      org.finos.tracdap.metadata.TagUpdateOrBuilder getTagUpdatesOrBuilder​(int index)
      Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.
      java.util.List<? extends org.finos.tracdap.metadata.TagUpdateOrBuilder> getTagUpdatesOrBuilderList()
      Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.
      java.lang.String getTenant()
      Tenant code for the requested operation, always required
      com.google.protobuf.ByteString getTenantBytes()
      Tenant code for the requested operation, always required
      com.google.protobuf.UnknownFieldSet getUnknownFields()  
      int hashCode()  
      boolean hasPriorVersion()
      Prior object/tag version to use for update operations This field should be omitted when creating a new file.
      boolean hasSize()
      Size of the file being saved, if known in advance When a size is supplied, TRAC will check the size against the number of bytes stored.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static FileWriteRequest.Builder newBuilder()  
      static FileWriteRequest.Builder newBuilder​(FileWriteRequest prototype)  
      FileWriteRequest.Builder newBuilderForType()  
      protected FileWriteRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static FileWriteRequest parseDelimitedFrom​(java.io.InputStream input)  
      static FileWriteRequest parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static FileWriteRequest parseFrom​(byte[] data)  
      static FileWriteRequest parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static FileWriteRequest parseFrom​(com.google.protobuf.ByteString data)  
      static FileWriteRequest parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static FileWriteRequest parseFrom​(com.google.protobuf.CodedInputStream input)  
      static FileWriteRequest parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static FileWriteRequest parseFrom​(java.io.InputStream input)  
      static FileWriteRequest parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static FileWriteRequest parseFrom​(java.nio.ByteBuffer data)  
      static FileWriteRequest parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<FileWriteRequest> parser()  
      FileWriteRequest.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
    • Method Detail

      • newInstance

        protected java.lang.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
      • getTenant

        public java.lang.String getTenant()
        
         Tenant code for the requested operation, always required
         
        string tenant = 1;
        Specified by:
        getTenant in interface FileWriteRequestOrBuilder
        Returns:
        The tenant.
      • getTenantBytes

        public com.google.protobuf.ByteString getTenantBytes()
        
         Tenant code for the requested operation, always required
         
        string tenant = 1;
        Specified by:
        getTenantBytes in interface FileWriteRequestOrBuilder
        Returns:
        The bytes for tenant.
      • hasPriorVersion

        public boolean hasPriorVersion()
        
         Prior object/tag version to use for update operations
         This field should be omitted when creating a new file.
         
        optional .tracdap.metadata.TagSelector priorVersion = 2;
        Specified by:
        hasPriorVersion in interface FileWriteRequestOrBuilder
        Returns:
        Whether the priorVersion field is set.
      • getPriorVersion

        public org.finos.tracdap.metadata.TagSelector getPriorVersion()
        
         Prior object/tag version to use for update operations
         This field should be omitted when creating a new file.
         
        optional .tracdap.metadata.TagSelector priorVersion = 2;
        Specified by:
        getPriorVersion in interface FileWriteRequestOrBuilder
        Returns:
        The priorVersion.
      • getPriorVersionOrBuilder

        public org.finos.tracdap.metadata.TagSelectorOrBuilder getPriorVersionOrBuilder()
        
         Prior object/tag version to use for update operations
         This field should be omitted when creating a new file.
         
        optional .tracdap.metadata.TagSelector priorVersion = 2;
        Specified by:
        getPriorVersionOrBuilder in interface FileWriteRequestOrBuilder
      • getTagUpdatesList

        public java.util.List<org.finos.tracdap.metadata.TagUpdate> getTagUpdatesList()
        
         Tag update operations to be applied
         Tag updates are applied in exactly the same way as for metadata write requests.
         @see MetadataWriteRequest
         @see TracMetadataApi
         
        repeated .tracdap.metadata.TagUpdate tagUpdates = 3;
        Specified by:
        getTagUpdatesList in interface FileWriteRequestOrBuilder
      • getTagUpdatesOrBuilderList

        public java.util.List<? extends org.finos.tracdap.metadata.TagUpdateOrBuilder> getTagUpdatesOrBuilderList()
        
         Tag update operations to be applied
         Tag updates are applied in exactly the same way as for metadata write requests.
         @see MetadataWriteRequest
         @see TracMetadataApi
         
        repeated .tracdap.metadata.TagUpdate tagUpdates = 3;
        Specified by:
        getTagUpdatesOrBuilderList in interface FileWriteRequestOrBuilder
      • getTagUpdatesCount

        public int getTagUpdatesCount()
        
         Tag update operations to be applied
         Tag updates are applied in exactly the same way as for metadata write requests.
         @see MetadataWriteRequest
         @see TracMetadataApi
         
        repeated .tracdap.metadata.TagUpdate tagUpdates = 3;
        Specified by:
        getTagUpdatesCount in interface FileWriteRequestOrBuilder
      • getTagUpdates

        public org.finos.tracdap.metadata.TagUpdate getTagUpdates​(int index)
        
         Tag update operations to be applied
         Tag updates are applied in exactly the same way as for metadata write requests.
         @see MetadataWriteRequest
         @see TracMetadataApi
         
        repeated .tracdap.metadata.TagUpdate tagUpdates = 3;
        Specified by:
        getTagUpdates in interface FileWriteRequestOrBuilder
      • getTagUpdatesOrBuilder

        public org.finos.tracdap.metadata.TagUpdateOrBuilder getTagUpdatesOrBuilder​(int index)
        
         Tag update operations to be applied
         Tag updates are applied in exactly the same way as for metadata write requests.
         @see MetadataWriteRequest
         @see TracMetadataApi
         
        repeated .tracdap.metadata.TagUpdate tagUpdates = 3;
        Specified by:
        getTagUpdatesOrBuilder in interface FileWriteRequestOrBuilder
      • getName

        public java.lang.String getName()
        
         File name of the file being saved, always required
         Must be a valid file name with no path component (i.e. the name may not contain slashes).
         If the name contains a period character, the file extension will be set as the
         portion of the name following the last period. Otherwise the file extension will be blank.
         For update requests the name may change but the extension must stay the same. E.g. a file
         can be created as "my_file_v1.txt" and updated as "my_file_v2.txt", but updating with the
         name as "my_file_v1.doc" would not be allowed. Attempting to change the extension in an
         update will result in an error status of FAILED_PRECONDITION.
         Fle name and extension are stored in the file definition, and in the trac_file_name
         and trac_file_extension attributes.
         
        string name = 4;
        Specified by:
        getName in interface FileWriteRequestOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
        
         File name of the file being saved, always required
         Must be a valid file name with no path component (i.e. the name may not contain slashes).
         If the name contains a period character, the file extension will be set as the
         portion of the name following the last period. Otherwise the file extension will be blank.
         For update requests the name may change but the extension must stay the same. E.g. a file
         can be created as "my_file_v1.txt" and updated as "my_file_v2.txt", but updating with the
         name as "my_file_v1.doc" would not be allowed. Attempting to change the extension in an
         update will result in an error status of FAILED_PRECONDITION.
         Fle name and extension are stored in the file definition, and in the trac_file_name
         and trac_file_extension attributes.
         
        string name = 4;
        Specified by:
        getNameBytes in interface FileWriteRequestOrBuilder
        Returns:
        The bytes for name.
      • getMimeType

        public java.lang.String getMimeType()
        
         Mime type of the file being saved, always required
         Must be a valid mime type. For update requests, the mime type must match exactly
         with the mime type supplied when the file was originally created. Attempting to change
         the mime type in an update will result in an error status of FAILED_PRECONDITION.
         Mime type is stored in the file definition and in the trac_file_mime_type attribute.
         
        string mimeType = 5;
        Specified by:
        getMimeType in interface FileWriteRequestOrBuilder
        Returns:
        The mimeType.
      • getMimeTypeBytes

        public com.google.protobuf.ByteString getMimeTypeBytes()
        
         Mime type of the file being saved, always required
         Must be a valid mime type. For update requests, the mime type must match exactly
         with the mime type supplied when the file was originally created. Attempting to change
         the mime type in an update will result in an error status of FAILED_PRECONDITION.
         Mime type is stored in the file definition and in the trac_file_mime_type attribute.
         
        string mimeType = 5;
        Specified by:
        getMimeTypeBytes in interface FileWriteRequestOrBuilder
        Returns:
        The bytes for mimeType.
      • hasSize

        public boolean hasSize()
        
         Size of the file being saved, if known in advance
         When a size is supplied, TRAC will check the size against the number of bytes stored.
         If the stored file size does not match the supplied value, the error will be reported
         with an error status of DATA_LOSS. When no size is supplied the check cannot be performed.
         File size is stored in the created file definition and in the trac_file_size attribute.
         
        optional uint64 size = 6;
        Specified by:
        hasSize in interface FileWriteRequestOrBuilder
        Returns:
        Whether the size field is set.
      • getSize

        public long getSize()
        
         Size of the file being saved, if known in advance
         When a size is supplied, TRAC will check the size against the number of bytes stored.
         If the stored file size does not match the supplied value, the error will be reported
         with an error status of DATA_LOSS. When no size is supplied the check cannot be performed.
         File size is stored in the created file definition and in the trac_file_size attribute.
         
        optional uint64 size = 6;
        Specified by:
        getSize in interface FileWriteRequestOrBuilder
        Returns:
        The size.
      • getContent

        public com.google.protobuf.ByteString getContent()
        
         A chunk of the file content
         The file content should be sent as a stream of chunks (byte buffers), with one chunk in each message.
         Empty chunks can be included at any point in the request stream and will be ignored.
         
        bytes content = 1000;
        Specified by:
        getContent in interface FileWriteRequestOrBuilder
        Returns:
        The content.
      • 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 java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.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​(java.lang.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 FileWriteRequest parseFrom​(java.nio.ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FileWriteRequest parseFrom​(java.nio.ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

        public static FileWriteRequest parseFrom​(java.io.InputStream input)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static FileWriteRequest parseFrom​(java.io.InputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static FileWriteRequest parseDelimitedFrom​(java.io.InputStream input)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static FileWriteRequest parseDelimitedFrom​(java.io.InputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static FileWriteRequest parseFrom​(com.google.protobuf.CodedInputStream input)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static FileWriteRequest parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

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

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

        protected FileWriteRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<FileWriteRequest> 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 FileWriteRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder