public class FileAttachment extends Attachment implements com.github.davidmoten.odata.client.ODataEntityType
| Modifier and Type | Class and Description |
|---|---|
static class |
FileAttachment.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
contentBytes |
protected String |
contentId |
protected String |
contentLocation |
contentType, isInline, lastModifiedDateTime, name, sizechangedFields, contextPath, id, odataType, unmappedFields| Modifier | Constructor and Description |
|---|---|
protected |
FileAttachment() |
| Modifier and Type | Method and Description |
|---|---|
static FileAttachment.Builder |
builderFileAttachment()
Returns a builder which is used to create a new
instance of this class (given that this class is immutable).
|
com.github.davidmoten.odata.client.internal.ChangedFields |
getChangedFields() |
Optional<byte[]> |
getContentBytes() |
Optional<String> |
getContentId() |
Optional<String> |
getContentLocation() |
Optional<com.github.davidmoten.odata.client.StreamProvider> |
getStream()
If suitable metadata found a StreamProvider is returned otherwise returns
Optional.empty(). |
com.github.davidmoten.odata.client.internal.UnmappedFields |
getUnmappedFields() |
String |
odataTypeName() |
FileAttachment |
patch()
Submits only changed fields for update and returns an
immutable copy of
this with changed fields reset. |
void |
postInject(boolean addKeysToContextPath) |
FileAttachment |
put()
Submits all fields for update and returns an immutable copy of
this
with changed fields reset (they were ignored anyway). |
String |
toString() |
FileAttachment |
withContentBytes(byte[] contentBytes) |
FileAttachment |
withContentId(String contentId) |
FileAttachment |
withContentLocation(String contentLocation) |
getContentType, getIsInline, getLastModifiedDateTime, getName, getSize, withContentType, withIsInline, withLastModifiedDateTime, withName, withSizeprotected String contentId
protected String contentLocation
protected byte[] contentBytes
public String odataTypeName()
odataTypeName in interface com.github.davidmoten.odata.client.ODataTypeodataTypeName in class Attachmentpublic static FileAttachment.Builder builderFileAttachment()
public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
getChangedFields in interface com.github.davidmoten.odata.client.ODataEntityTypegetChangedFields in class Attachmentpublic void postInject(boolean addKeysToContextPath)
postInject in interface com.github.davidmoten.odata.client.ODataTypepostInject in class Attachmentpublic FileAttachment withContentId(String contentId)
public FileAttachment withContentLocation(String contentLocation)
public Optional<byte[]> getContentBytes()
public FileAttachment withContentBytes(byte[] contentBytes)
public com.github.davidmoten.odata.client.internal.UnmappedFields getUnmappedFields()
getUnmappedFields in interface com.github.davidmoten.odata.client.ODataTypegetUnmappedFields in class Attachmentpublic Optional<com.github.davidmoten.odata.client.StreamProvider> getStream()
Optional.empty(). Normally for a stream to be available this entity
needs to have been hydrated with full metadata. Consider calling the builder
method .metadataFull() when getting this instance (either directly or
as part of a collection).Optional.empty()public FileAttachment patch()
this with changed fields reset.patch in class Attachmentthis with changed fields resetcom.github.davidmoten.odata.client.ClientException - if HTTP response is not as expectedpublic FileAttachment put()
this
with changed fields reset (they were ignored anyway).put in class Attachmentthis with changed fields resetcom.github.davidmoten.odata.client.ClientException - if HTTP response is not as expectedpublic String toString()
toString in class AttachmentCopyright © 2018–2020. All rights reserved.