DocumentProtection

Contents
[ ]
Request Response Model
Protect GetDocumentProtectionOnlineRequest ProtectionDataResponse FileLink
ProtectionData
GetDocumentProtectionRequest
ProtectDocumentOnlineRequest ProtectDocumentOnlineResponse
ProtectDocumentRequest ProtectionDataResponse FileLink
ProtectionData
ProtectionRequest
Unprotect UnprotectDocumentOnlineRequest UnprotectDocumentOnlineResponse
UnprotectDocumentRequest ProtectionDataResponse FileLink
ProtectionData

ProtectionData

Represents a container for the data about protection of the document.

This class is used in ProtectionDataResponse.

A single ProtectionType property is defined:

Property Type Description
ProtectionType string Gets or sets type of the protection.

GetDocumentProtectionOnlineRequest

Represents a request model for WordsApi.GetDocumentProtectionOnline() operation.

An object of the GetDocumentProtectionOnlineRequest class is created by the following constructor methods:

  • GetDocumentProtectionOnlineRequest()
  • GetDocumentProtectionOnlineRequest(Stream document, string loadEncoding, string password, string encryptedPassword)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
document Document Stream The document.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.

GetDocumentProtectionRequest

Represents a request model for WordsApi.GetDocumentProtection() operation.

An object of the GetDocumentProtectionRequest class is created by the following constructor methods:

  • GetDocumentProtectionRequest()
  • GetDocumentProtectionRequest(string name, string folder, string storage, string loadEncoding, string password, string encryptedPassword)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
name Name string The filename of the input document.
folder Folder string Original document folder.
storage Storage string Original document storage.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.

ProtectDocumentOnlineRequest

Represents a request model for WordsApi.ProtectDocumentOnline() operation.

An object of the ProtectDocumentOnlineRequest class is created by the following constructor methods:

  • ProtectDocumentOnlineRequest()
  • ProtectDocumentOnlineRequest(Stream document, ProtectionRequest protectionRequest, string loadEncoding, string password, string encryptedPassword, string destFileName)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
document Document Stream The document.
protectionRequest ProtectionRequest ProtectionRequest Protection request.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
destFileName DestFileName string Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.

ProtectDocumentOnlineResponse

Represents a response model for WordsApi.ProtectDocumentOnline() operation.

An object of the ProtectDocumentOnlineResponse class is created by the following constructor methods:

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
model Model ProtectionDataResponse The response model.
document Document Dictionary<string,Stream> The document after modification.

ProtectDocumentRequest

Represents a request model for WordsApi.ProtectDocument() operation.

An object of the ProtectDocumentRequest class is created by the following constructor methods:

  • ProtectDocumentRequest()
  • ProtectDocumentRequest(string name, ProtectionRequest protectionRequest, string folder, string storage, string loadEncoding, string password, string encryptedPassword, string destFileName)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
name Name string The filename of the input document.
protectionRequest ProtectionRequest ProtectionRequest Protection request.
folder Folder string Original document folder.
storage Storage string Original document storage.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
destFileName DestFileName string Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.

ProtectionDataResponse

Represents a REST response with data on document’s protection.

This class is inherited from WordsResponse and used in WordsApi, ProtectDocumentOnlineResponse, UnprotectDocumentOnlineResponse.

The following properties are defined:

Property Type Description
RequestId string Gets or sets the request Id.
DocumentLink FileLink Gets or sets the link to the document.
ProtectionData ProtectionData Gets or sets the protection properties of the document.

ProtectionRequest

Represents a request on changing of protection.

This class is used in ProtectDocumentOnlineRequest, ProtectDocumentRequest, UnprotectDocumentOnlineRequest, UnprotectDocumentRequest.

The following properties are defined:

Property Type Description
NewPassword string Gets or sets the new password.
Password string Gets or sets the current password.
ProtectionType string Gets or sets the new type of protection.

UnprotectDocumentOnlineRequest

Represents a request model for WordsApi.UnprotectDocumentOnline() operation.

An object of the UnprotectDocumentOnlineRequest class is created by the following constructor methods:

  • UnprotectDocumentOnlineRequest()
  • UnprotectDocumentOnlineRequest(Stream document, ProtectionRequest protectionRequest, string loadEncoding, string password, string encryptedPassword, string destFileName)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
document Document Stream The document.
protectionRequest ProtectionRequest ProtectionRequest Protection request.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
destFileName DestFileName string Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.

UnprotectDocumentOnlineResponse

Represents a response model for WordsApi.UnprotectDocumentOnline() operation.

An object of the UnprotectDocumentOnlineResponse class is created by the following constructor methods:

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
model Model ProtectionDataResponse The response model.
document Document Dictionary<string,Stream> The document after modification.

UnprotectDocumentRequest

Represents a request model for WordsApi.UnprotectDocument() operation.

An object of the UnprotectDocumentRequest class is created by the following constructor methods:

  • UnprotectDocumentRequest()
  • UnprotectDocumentRequest(string name, ProtectionRequest protectionRequest, string folder, string storage, string loadEncoding, string password, string encryptedPassword, string destFileName)

Each of those arguments initializes the corresponding self-titled property:

Argument Property Type Description
name Name string The filename of the input document.
protectionRequest ProtectionRequest ProtectionRequest Protection request.
folder Folder string Original document folder.
storage Storage string Original document storage.
loadEncoding LoadEncoding string Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password Password string Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword EncryptedPassword string Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
destFileName DestFileName string Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.