#include <VendableArtifact.h>
|
using | TimeEpoch = std::chrono::system_clock::time_point |
|
◆ TimeEpoch
◆ create() [1/2]
static std::unique_ptr<VendableArtifact> alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::create |
( |
std::shared_ptr< DavsRequest > |
request, |
|
|
std::string |
id, |
|
|
size_t |
artifactSizeBytes, |
|
|
TimeEpoch |
artifactExpiry, |
|
|
std::string |
s3Url, |
|
|
TimeEpoch |
urlExpiry, |
|
|
size_t |
currentSizeBytes, |
|
|
bool |
multipart |
|
) |
| |
|
static |
Creates a Vendable Artifact containing all the information about a given artifact and how to get it.
- Parameters
-
request | REQUIRED, contains the original request that's parsed by DAVS. |
id | REQUIRED, uniquely identifies an artifact (hash of the file itself). |
artifactSizeBytes | REQUIRED, size of the artifact that is being downloaded. |
artifactExpiry | REQUIRED, epoch when the artifact should be checked again for update. |
s3Url | REQUIRED, signed url where we can download the artifact. |
urlExpiry | REQUIRED, epoch when the url for the artifact download will expire. |
currentSizeBytes | OPTIONAL? TODO: still not sure what this is... |
multipart | is the vendable artifact constructed by a multipart response |
- Returns
- NULLABLE, a smart pointer to Vendable Artifact if all parameters are valid.
◆ create() [2/2]
static std::unique_ptr<VendableArtifact> alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::create |
( |
std::shared_ptr< DavsRequest > |
request, |
|
|
const std::string & |
jsonString, |
|
|
const bool |
isMultipart = false |
|
) |
| |
|
static |
Creates a Vendable Artifact from JSON string.
- Parameters
-
request | REQUIRED, contains the original request that's parsed by DAVS. |
jsonString | REQUIRED, contains the JSON string to parse and read values from. |
isMultipart | Optional, defaults to false. If the artifact is a multipart artifact. |
- Returns
- NULLABLE, a smart pointer to Vendable Artifact if given JSON is valid, otherwise nullptr.
◆ getArtifactExpiry()
const TimeEpoch& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getArtifactExpiry |
( |
| ) |
const |
|
inline |
◆ getArtifactSizeBytes()
size_t alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getArtifactSizeBytes |
( |
| ) |
const |
|
inline |
◆ getCurrentSizeBytes()
size_t alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getCurrentSizeBytes |
( |
| ) |
const |
|
inline |
◆ getId()
const std::string& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getId |
( |
| ) |
const |
|
inline |
◆ getRequest()
const std::shared_ptr<DavsRequest>& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getRequest |
( |
| ) |
const |
|
inline |
◆ getS3Url()
const std::string& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getS3Url |
( |
| ) |
const |
|
inline |
◆ getUniqueIdentifier()
const std::string& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getUniqueIdentifier |
( |
| ) |
const |
|
inline |
◆ getUrlExpiry()
const TimeEpoch& alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::getUrlExpiry |
( |
| ) |
const |
|
inline |
◆ isMultipart()
bool alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact::isMultipart |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/capabilities/DavsClient/acsdkAssetsInterfaces/include/acsdkAssetsInterfaces/VendableArtifact.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0