Package org.finos.tracdap.api
Class FileWriteRequest
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.finos.tracdap.api.FileWriteRequest
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,FileWriteRequestOrBuilder
public final class FileWriteRequest
extends com.google.protobuf.GeneratedMessage
implements FileWriteRequestOrBuilder
* Request to create or update a FILE and store content to the platform. @see TracDataApi.createFile @see TracDataApi.updateFileProtobuf type
tracdap.api.FileWriteRequest- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* Request to create or update a FILE and store content to the platform.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.protobuf.ByteString* 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 FileWriteRequeststatic final com.google.protobuf.Descriptors.Descriptor* Mime type of the file being saved, always required Must be a valid mime type.com.google.protobuf.ByteString* Mime type of the file being saved, always required Must be a valid mime type.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* 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> org.finos.tracdap.metadata.TagSelector* Prior object/tag version to use for update operations This field should be omitted when creating a new file.org.finos.tracdap.metadata.TagSelectorOrBuilder* Prior object/tag version to use for update operations This field should be omitted when creating a new file.intlonggetSize()* 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.TagUpdategetTagUpdates(int index) * Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.int* Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.List<org.finos.tracdap.metadata.TagUpdate> * Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.org.finos.tracdap.metadata.TagUpdateOrBuildergetTagUpdatesOrBuilder(int index) * Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.List<? extends org.finos.tracdap.metadata.TagUpdateOrBuilder> * Tag update operations to be applied Tag updates are applied in exactly the same way as for metadata write requests.* Tenant code for the requested operation, always requiredcom.google.protobuf.ByteString* Tenant code for the requested operation, always requiredinthashCode()boolean* Prior object/tag version to use for update operations This field should be omitted when creating a new file.booleanhasSize()* 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.GeneratedMessage.FieldAccessorTablefinal booleanstatic FileWriteRequest.Builderstatic FileWriteRequest.BuildernewBuilder(FileWriteRequest prototype) protected FileWriteRequest.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static FileWriteRequestparseDelimitedFrom(InputStream input) static FileWriteRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FileWriteRequestparseFrom(byte[] data) static FileWriteRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FileWriteRequestparseFrom(com.google.protobuf.ByteString data) static FileWriteRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FileWriteRequestparseFrom(com.google.protobuf.CodedInputStream input) static FileWriteRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FileWriteRequestparseFrom(InputStream input) static FileWriteRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FileWriteRequestparseFrom(ByteBuffer data) static FileWriteRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<FileWriteRequest> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
TENANT_FIELD_NUMBER
public static final int TENANT_FIELD_NUMBER- See Also:
-
PRIORVERSION_FIELD_NUMBER
public static final int PRIORVERSION_FIELD_NUMBER- See Also:
-
TAGUPDATES_FIELD_NUMBER
public static final int TAGUPDATES_FIELD_NUMBER- See Also:
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
MIMETYPE_FIELD_NUMBER
public static final int MIMETYPE_FIELD_NUMBER- See Also:
-
SIZE_FIELD_NUMBER
public static final int SIZE_FIELD_NUMBER- See Also:
-
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getTenant
* Tenant code for the requested operation, always required
string tenant = 1;- Specified by:
getTenantin interfaceFileWriteRequestOrBuilder- Returns:
- The tenant.
-
getTenantBytes
public com.google.protobuf.ByteString getTenantBytes()* Tenant code for the requested operation, always required
string tenant = 1;- Specified by:
getTenantBytesin interfaceFileWriteRequestOrBuilder- 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:
hasPriorVersionin interfaceFileWriteRequestOrBuilder- 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:
getPriorVersionin interfaceFileWriteRequestOrBuilder- 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:
getPriorVersionOrBuilderin interfaceFileWriteRequestOrBuilder
-
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:
getTagUpdatesListin interfaceFileWriteRequestOrBuilder
-
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:
getTagUpdatesOrBuilderListin interfaceFileWriteRequestOrBuilder
-
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:
getTagUpdatesCountin interfaceFileWriteRequestOrBuilder
-
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:
getTagUpdatesin interfaceFileWriteRequestOrBuilder
-
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:
getTagUpdatesOrBuilderin interfaceFileWriteRequestOrBuilder
-
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:
getNamein interfaceFileWriteRequestOrBuilder- 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:
getNameBytesin interfaceFileWriteRequestOrBuilder- Returns:
- The bytes for name.
-
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:
getMimeTypein interfaceFileWriteRequestOrBuilder- 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:
getMimeTypeBytesin interfaceFileWriteRequestOrBuilder- 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:
hasSizein interfaceFileWriteRequestOrBuilder- 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:
getSizein interfaceFileWriteRequestOrBuilder- 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:
getContentin interfaceFileWriteRequestOrBuilder- Returns:
- The content.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static FileWriteRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FileWriteRequest parseFrom(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
- Throws:
IOException
-
parseFrom
public static FileWriteRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static FileWriteRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static FileWriteRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static FileWriteRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected FileWriteRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-