Evo Voice

<back to all web services

AppPatchFile

Updates metadata for the specific file

Requires Authentication
The following routes are available for this service:
PATCH/portal/files/{fileId}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Updates metadata for the specific file
    */
    @Api(Description="Updates metadata for the specific file")
    public static class AppPatchFile implements IPatch
    {
        public String accountId = null;
        public String fileId = null;
        public String fileName = null;
        public String customerId = null;
        public String userId = null;
        
        public String getAccountId() { return accountId; }
        public AppPatchFile setAccountId(String value) { this.accountId = value; return this; }
        public String getFileId() { return fileId; }
        public AppPatchFile setFileId(String value) { this.fileId = value; return this; }
        public String getFileName() { return fileName; }
        public AppPatchFile setFileName(String value) { this.fileName = value; return this; }
        public String getCustomerId() { return customerId; }
        public AppPatchFile setCustomerId(String value) { this.customerId = value; return this; }
        public String getUserId() { return userId; }
        public AppPatchFile setUserId(String value) { this.userId = value; return this; }
    }

    public static class FileInfo extends EntityInfo
    {
        /**
        * The type of file this is
        */
        @ApiMember(Description="The type of file this is")
        public FileTypes type = null;

        /**
        * The account ID this file is associated with
        */
        @ApiMember(Description="The account ID this file is associated with")
        public String accountId = null;

        /**
        * The name of the account this file is associated with
        */
        @ApiMember(Description="The name of the account this file is associated with")
        public String accountName = null;

        /**
        * The ID of the customer this file is associated with
        */
        @ApiMember(Description="The ID of the customer this file is associated with")
        public String customerId = null;

        /**
        * The name of the customer this file is associated with
        */
        @ApiMember(Description="The name of the customer this file is associated with")
        public String customerName = null;

        /**
        * The breadcrumb to the customer for this file
        */
        @ApiMember(Description="The breadcrumb to the customer for this file")
        public ArrayList<CustomerBreadcrumb> customerBreadcrumb = null;

        /**
        * The ID of the user this file is assocaited with
        */
        @ApiMember(Description="The ID of the user this file is assocaited with")
        public String userId = null;

        /**
        * The name of the user this file is associated with
        */
        @ApiMember(Description="The name of the user this file is associated with")
        public String userName = null;

        /**
        * The original file name for the file
        */
        @ApiMember(Description="The original file name for the file")
        public String fileName = null;

        /**
        * The URI of the file
        */
        @ApiMember(Description="The URI of the file")
        public String uri = null;

        /**
        * The Content type of the file
        */
        @ApiMember(Description="The Content type of the file")
        public String contentType = null;

        /**
        * The size of the file
        */
        @ApiMember(Description="The size of the file")
        public Long contentLength = null;

        /**
        * The Twilio ID of the recording
        */
        @ApiMember(Description="The Twilio ID of the recording")
        public String recordingSid = null;

        /**
        * The duration of the recording in seconds
        */
        @ApiMember(Description="The duration of the recording in seconds")
        public Integer recordingDuration = null;

        /**
        * Who is the recording from?
        */
        @ApiMember(Description="Who is the recording from?")
        public String recordingFrom = null;

        /**
        * Transcription (if available)
        */
        @ApiMember(Description="Transcription (if available)")
        public String transcription = null;

        /**
        * From Address (e.g. caller ID) for incoming calls
        */
        @ApiMember(Description="From Address (e.g. caller ID) for incoming calls")
        public String fromAddress = null;

        /**
        * To Address (e.g. dialed number) for outgoing calls
        */
        @ApiMember(Description="To Address (e.g. dialed number) for outgoing calls")
        public String toAddress = null;
        
        public FileTypes getType() { return type; }
        public FileInfo setType(FileTypes value) { this.type = value; return this; }
        public String getAccountId() { return accountId; }
        public FileInfo setAccountId(String value) { this.accountId = value; return this; }
        public String getAccountName() { return accountName; }
        public FileInfo setAccountName(String value) { this.accountName = value; return this; }
        public String getCustomerId() { return customerId; }
        public FileInfo setCustomerId(String value) { this.customerId = value; return this; }
        public String getCustomerName() { return customerName; }
        public FileInfo setCustomerName(String value) { this.customerName = value; return this; }
        public ArrayList<CustomerBreadcrumb> getCustomerBreadcrumb() { return customerBreadcrumb; }
        public FileInfo setCustomerBreadcrumb(ArrayList<CustomerBreadcrumb> value) { this.customerBreadcrumb = value; return this; }
        public String getUserId() { return userId; }
        public FileInfo setUserId(String value) { this.userId = value; return this; }
        public String getUserName() { return userName; }
        public FileInfo setUserName(String value) { this.userName = value; return this; }
        public String getFileName() { return fileName; }
        public FileInfo setFileName(String value) { this.fileName = value; return this; }
        public String getUri() { return uri; }
        public FileInfo setUri(String value) { this.uri = value; return this; }
        public String getContentType() { return contentType; }
        public FileInfo setContentType(String value) { this.contentType = value; return this; }
        public Long getContentLength() { return contentLength; }
        public FileInfo setContentLength(Long value) { this.contentLength = value; return this; }
        public String getRecordingSid() { return recordingSid; }
        public FileInfo setRecordingSid(String value) { this.recordingSid = value; return this; }
        public Integer getRecordingDuration() { return recordingDuration; }
        public FileInfo setRecordingDuration(Integer value) { this.recordingDuration = value; return this; }
        public String getRecordingFrom() { return recordingFrom; }
        public FileInfo setRecordingFrom(String value) { this.recordingFrom = value; return this; }
        public String getTranscription() { return transcription; }
        public FileInfo setTranscription(String value) { this.transcription = value; return this; }
        public String getFromAddress() { return fromAddress; }
        public FileInfo setFromAddress(String value) { this.fromAddress = value; return this; }
        public String getToAddress() { return toAddress; }
        public FileInfo setToAddress(String value) { this.toAddress = value; return this; }
    }

    public static class EntityInfo
    {
        /**
        * The ID of the object
        */
        @ApiMember(Description="The ID of the object")
        public String id = null;

        /**
        * The date the object was created
        */
        @ApiMember(Description="The date the object was created")
        public String dateCreated = null;

        /**
        * The date the object was last modified
        */
        @ApiMember(Description="The date the object was last modified")
        public String dateLastModified = null;

        /**
        * The user that created this object
        */
        @ApiMember(Description="The user that created this object")
        public String createdBy = null;

        /**
        * The user that last modified this object
        */
        @ApiMember(Description="The user that last modified this object")
        public String lastModifiedBy = null;
        
        public String getId() { return id; }
        public EntityInfo setId(String value) { this.id = value; return this; }
        public String getDateCreated() { return dateCreated; }
        public EntityInfo setDateCreated(String value) { this.dateCreated = value; return this; }
        public String getDateLastModified() { return dateLastModified; }
        public EntityInfo setDateLastModified(String value) { this.dateLastModified = value; return this; }
        public String getCreatedBy() { return createdBy; }
        public EntityInfo setCreatedBy(String value) { this.createdBy = value; return this; }
        public String getLastModifiedBy() { return lastModifiedBy; }
        public EntityInfo setLastModifiedBy(String value) { this.lastModifiedBy = value; return this; }
    }

    public static enum FileTypes
    {
        Upload,
        VoiceMessage,
        CallRecording,
        Fax,
        Attachment,
        FaxOutgoing;
    }

    public static class CustomerBreadcrumb
    {
        public String id = null;
        public String name = null;
        
        public String getId() { return id; }
        public CustomerBreadcrumb setId(String value) { this.id = value; return this; }
        public String getName() { return name; }
        public CustomerBreadcrumb setName(String value) { this.name = value; return this; }
    }

}

Java AppPatchFile DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PATCH /portal/files/{fileId} HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AppPatchFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Portal">
  <AccountId>String</AccountId>
  <CustomerId>String</CustomerId>
  <FileId>String</FileId>
  <FileName>String</FileName>
  <UserId>String</UserId>
</AppPatchFile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FileInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Files">
  <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</CreatedBy>
  <DateCreated xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateCreated>
  <DateLastModified xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateLastModified>
  <Id xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</Id>
  <LastModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</LastModifiedBy>
  <AccountId>String</AccountId>
  <AccountName>String</AccountName>
  <ContentLength>0</ContentLength>
  <ContentType>String</ContentType>
  <CustomerBreadcrumb xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
    <d2p1:CustomerBreadcrumb>
      <d2p1:Id>String</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:CustomerBreadcrumb>
  </CustomerBreadcrumb>
  <CustomerId>String</CustomerId>
  <CustomerName>String</CustomerName>
  <FileName>String</FileName>
  <FromAddress>String</FromAddress>
  <RecordingDuration>0</RecordingDuration>
  <RecordingFrom>String</RecordingFrom>
  <RecordingSid>String</RecordingSid>
  <ToAddress>String</ToAddress>
  <Transcription>String</Transcription>
  <Type>Upload</Type>
  <Uri>String</Uri>
  <UserId>String</UserId>
  <UserName>String</UserName>
</FileInfo>