public abstract class FileCreateRequest extends BaseFssApiResource
UTF_8| Modifier and Type | Method and Description |
|---|---|
static FileCreateRequest |
create(FssApiVersion apiVersion,
java.lang.String path,
java.lang.Long size,
java.lang.String hash,
java.lang.Boolean createParents,
java.lang.Long mtime,
java.lang.Long ctime,
java.lang.Long atime,
java.io.InputStream input)
Returns a versioned FileCreateRequest that is compatible with the specified apiVersion.
|
java.lang.Long |
getAtime()
Returns the Last Accessed time of the file created.
|
java.lang.Boolean |
getCreateParents()
Returns true if parents of path should be created if they do not exist; false otherwise.
|
java.lang.Long |
getCtime()
Returns the created time of the file created.
|
static java.lang.Class<? extends FileCreateRequest> |
getFssApiClass(FssApiVersion apiVersion)
Returns the
Class of the FileCreateRequest that corresponds to the
specified apiVersion. |
java.lang.String |
getHash()
Returns the SHA-384 hash of the file to be created, represented as a hex string.
|
java.io.InputStream |
getInput()
Returns the InputStream containing the contents of the file to be created.
|
java.lang.Long |
getMtime()
Returns the modified time of the file created.
|
java.lang.String |
getPath()
Returns the path of the file to be created.
|
java.lang.Long |
getSize()
Returns the size (in bytes) of the file to be created.
|
void |
validate(java.lang.String fieldName,
BaseFssApiResource parent)
Validates this object.
|
badValue, badValue, fromJson, toJson, toJson, toString, validate, validateFieldInRange, validateFieldInRange, validateFieldIsNull, validateFieldNotNull, validateLocale, validateOptionalField, validateOptionalFieldList, validateRequiredField, validateRequiredFieldList, writeToOutputStreampublic static java.lang.Class<? extends FileCreateRequest> getFssApiClass(FssApiVersion apiVersion) throws AwUnsupportedApiVersionException
Class of the FileCreateRequest that corresponds to the
specified apiVersion.apiVersion - API version of the class to be returnedClass of the FileCreateRequest that corresponds to the
specified apiVersionAwUnsupportedApiVersionExceptionpublic static FileCreateRequest create(FssApiVersion apiVersion, java.lang.String path, java.lang.Long size, java.lang.String hash, java.lang.Boolean createParents, java.lang.Long mtime, java.lang.Long ctime, java.lang.Long atime, java.io.InputStream input) throws AwUnsupportedApiVersionException
apiVersion - API version to be supported by the FileCreateRequestpath - path of the file to be createdsize - size (in bytes) of the file to be created (optional)hash - the SHA-384 hash of the file to be created, represented as a hex string (optional)createParents - if true, then any parent folders of path that do not already exist should be
created. If false, then the operation should fail if any parent folders of path do
not existinput - InputStream containing the new file contentsAwUnsupportedApiVersionExceptionpublic void validate(java.lang.String fieldName,
BaseFssApiResource parent)
throws AwJsonException
validate in class BaseFssApiResourcefieldName - name of this object in the parent (containing) object. If this object is a
top-level object (not contained within another object), then enter null for this
parameterparent - parent (containing) object that contains the object specified in the fieldName
parameter. If this object is a top-level object (not contained within another
object), then enter null for this parameterAwJsonException - if any validation errors occurBaseFssApiResource.validate(String, BaseFssApiResource)public java.lang.String getPath()
public java.lang.Boolean getCreateParents()
public java.lang.Long getSize()
public java.lang.String getHash()
public java.lang.Long getMtime()
public java.lang.Long getCtime()
public java.lang.Long getAtime()
public java.io.InputStream getInput()