ravendb
Version:
RavenDB client for Node.js
28 lines • 924 B
JavaScript
import { StringUtil } from "../../../Utility/StringUtil.js";
import { throwError } from "../../../Exceptions/index.js";
export class DeleteAttachmentCommandData {
id;
name;
changeVector;
type = "AttachmentDELETE";
constructor(documentId, name, changeVector) {
if (StringUtil.isNullOrWhitespace(documentId)) {
throwError("InvalidArgumentException", "DocumentId cannot be null");
}
if (StringUtil.isNullOrWhitespace(name)) {
throwError("InvalidArgumentException", "Name cannot be null");
}
this.id = documentId;
this.name = name;
this.changeVector = changeVector;
}
serialize(conventions) {
return {
Id: this.id,
Name: this.name,
ChangeVector: this.changeVector,
Type: "AttachmentDELETE"
};
}
}
//# sourceMappingURL=DeleteAttachmentCommandData.js.map