AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::acsdkAssets::commonInterfaces::VendableArtifact Class Reference

#include <VendableArtifact.h>

Public Types

using TimeEpoch = std::chrono::system_clock::time_point
 

Public Member Functions

const std::shared_ptr< DavsRequest > & getRequest () const
 
const std::string & getId () const
 
const std::string & getS3Url () const
 
size_t getArtifactSizeBytes () const
 
const TimeEpochgetArtifactExpiry () const
 
const TimeEpochgetUrlExpiry () const
 
size_t getCurrentSizeBytes () const
 
const std::string & getUniqueIdentifier () const
 
bool isMultipart () const
 

Static Public Member Functions

static std::unique_ptr< VendableArtifactcreate (std::shared_ptr< DavsRequest > request, std::string id, size_t artifactSizeBytes, TimeEpoch artifactExpiry, std::string s3Url, TimeEpoch urlExpiry, size_t currentSizeBytes, bool multipart)
 
static std::unique_ptr< VendableArtifactcreate (std::shared_ptr< DavsRequest > request, const std::string &jsonString, const bool isMultipart=false)
 

Member Typedef Documentation

◆ TimeEpoch

Member Function Documentation

◆ 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
requestREQUIRED, contains the original request that's parsed by DAVS.
idREQUIRED, uniquely identifies an artifact (hash of the file itself).
artifactSizeBytesREQUIRED, size of the artifact that is being downloaded.
artifactExpiryREQUIRED, epoch when the artifact should be checked again for update.
s3UrlREQUIRED, signed url where we can download the artifact.
urlExpiryREQUIRED, epoch when the url for the artifact download will expire.
currentSizeBytesOPTIONAL? TODO: still not sure what this is...
multipartis 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
requestREQUIRED, contains the original request that's parsed by DAVS.
jsonStringREQUIRED, contains the JSON string to parse and read values from.
isMultipartOptional, 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:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0