Class Asset

Inheritance Relationships

Base Type

Class Documentation

class Asset : public axr::sdk::EntityBase

Describes a single digital asset that has been stored on a remote storage provider.

Author

Jean-Philippe Steinmetz info@acceleratxr.com

Public Functions

inline Asset()
inline Asset(const Asset &value)
inline Asset(Asset &&value)
inline virtual ~Asset()
inline virtual Asset &SetProperties(const std::map<utility::string_t, Variant> &value) override

Sets the object’s underlying map of stored values.

inline virtual Asset &SetProperties(std::map<utility::string_t, Variant> &&value) override

Sets the underlying map of stored values for the object.

inline virtual Asset &SetProperty(const utility::char_t *name, const Variant &value) override

Sets the property of the given name to the provided value.

inline virtual Asset &SetProperty(const utility::string_t &name, const Variant &value) override

Sets the property of the given name to the provided value.

inline virtual Asset &SetRemoteUrl(const utility::string_t &url) override

Returns the URL of the remote server endpoint where the object is managed.

inline virtual Asset &SetUid(const utility::string_t &value) override

Sets the value of the Uid property.

Parameters

value – The value to set.

inline virtual Asset &SetDateCreated(const datetime &value) override

Sets the value of the DateCreated property.

Parameters

value – The value to set.

inline virtual Asset &SetDateModified(const datetime &value) override

Sets the value of the DateModified property.

Parameters

value – The value to set.

inline virtual Asset &SetVersion(const uint64_t value) override

Sets the value of the Version property.

Parameters

value – The value to set.

virtual void Validate() override
utility::string_t GetChecksum() const

The checksum of the asset’s contents. The value is of the form <alg>:<hash> where <alg> is the hash algorithm used and <hash> is the value of the asset’s checksum. e.g. sha512:f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9 represents a SHA512 hash with value f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9.

Asset &SetChecksum(const utility::string_t &value)

The checksum of the asset’s contents. The value is of the form <alg>:<hash> where <alg> is the hash algorithm used and <hash> is the value of the asset’s checksum. e.g. sha512:f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9 represents a SHA512 hash with value f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9.

Parameters

value – The value to set.

std::shared_ptr<Object> GetMetadata() const

An map of key-value pairs containing additional metadata about the asset.

Asset &SetMetadata(std::shared_ptr<Object> value)

An map of key-value pairs containing additional metadata about the asset.

Parameters

value – The value to set.

utility::string_t GetMimetype() const

The type of data that the asset contains.

Asset &SetMimetype(const utility::string_t &value)

The type of data that the asset contains.

Parameters

value – The value to set.

utility::string_t GetName() const

The unique name of the asset.

Asset &SetName(const utility::string_t &value)

The unique name of the asset.

Parameters

value – The value to set.

utility::string_t GetOwnerUid() const

The universally unique identifier of the user that owns the asset.

Asset &SetOwnerUid(const utility::string_t &value)

The universally unique identifier of the user that owns the asset.

Parameters

value – The value to set.

std::uint64_t GetSize() const

The total size of the asset in bytes.

Asset &SetSize(std::uint64_t value)

The total size of the asset in bytes.

Parameters

value – The value to set.

utility::string_t GetUrl() const

The universal resource location of the asset. e.g. it’s location on the Internet or local filesystem.

Asset &SetUrl(const utility::string_t &value)

The universal resource location of the asset. e.g. it’s location on the Internet or local filesystem.

Parameters

value – The value to set.

Public Static Functions

static inline const utility::char_t *ClassName()

Returns the fully qualified name of the class.