docs: function (metadata) {
          var key;
          if (metadata) {
              this.name = metadata.name;
              this.size = metadata.size || 0;
              this.mime = metadata.mime || '';
              this.isPublic = metadata.isPublic || false;
              this.tags = metadata.tags || [];
              this.content = metadata.content;
              this.contentType = metadata.contentType || BlobMetadata.CONTENT_TYPES.OBJECT;
              if (this.contentType === BlobMetadata.CONTENT_TYPES.COMPLEX) {
                  for (key in this.content) {
                      if (this.content.hasOwnProperty(key)) {
                          if (BlobConfig.hashRegex.test(this.content[key].content) === false) {
                              throw new Error('BlobMetadata is malformed: hash \'' + this.content[key].content +
                                  '\'is invalid');
                          }
                      }
                  }
              }
          } else {
              throw new Error('metadata parameter is not defined');
          }
      }