feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/AdMarkers.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace AdMarkersMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int SCTE35_ENHANCED_HASH = HashingUtils::HashString("SCTE35_ENHANCED");
static const int PASSTHROUGH_HASH = HashingUtils::HashString("PASSTHROUGH");
static const int DATERANGE_HASH = HashingUtils::HashString("DATERANGE");
AdMarkers GetAdMarkersForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return AdMarkers::NONE;
}
else if (hashCode == SCTE35_ENHANCED_HASH)
{
return AdMarkers::SCTE35_ENHANCED;
}
else if (hashCode == PASSTHROUGH_HASH)
{
return AdMarkers::PASSTHROUGH;
}
else if (hashCode == DATERANGE_HASH)
{
return AdMarkers::DATERANGE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AdMarkers>(hashCode);
}
return AdMarkers::NOT_SET;
}
Aws::String GetNameForAdMarkers(AdMarkers enumValue)
{
switch(enumValue)
{
case AdMarkers::NONE:
return "NONE";
case AdMarkers::SCTE35_ENHANCED:
return "SCTE35_ENHANCED";
case AdMarkers::PASSTHROUGH:
return "PASSTHROUGH";
case AdMarkers::DATERANGE:
return "DATERANGE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AdMarkersMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/AdsOnDeliveryRestrictions.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace AdsOnDeliveryRestrictionsMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int RESTRICTED_HASH = HashingUtils::HashString("RESTRICTED");
static const int UNRESTRICTED_HASH = HashingUtils::HashString("UNRESTRICTED");
static const int BOTH_HASH = HashingUtils::HashString("BOTH");
AdsOnDeliveryRestrictions GetAdsOnDeliveryRestrictionsForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return AdsOnDeliveryRestrictions::NONE;
}
else if (hashCode == RESTRICTED_HASH)
{
return AdsOnDeliveryRestrictions::RESTRICTED;
}
else if (hashCode == UNRESTRICTED_HASH)
{
return AdsOnDeliveryRestrictions::UNRESTRICTED;
}
else if (hashCode == BOTH_HASH)
{
return AdsOnDeliveryRestrictions::BOTH;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AdsOnDeliveryRestrictions>(hashCode);
}
return AdsOnDeliveryRestrictions::NOT_SET;
}
Aws::String GetNameForAdsOnDeliveryRestrictions(AdsOnDeliveryRestrictions enumValue)
{
switch(enumValue)
{
case AdsOnDeliveryRestrictions::NONE:
return "NONE";
case AdsOnDeliveryRestrictions::RESTRICTED:
return "RESTRICTED";
case AdsOnDeliveryRestrictions::UNRESTRICTED:
return "UNRESTRICTED";
case AdsOnDeliveryRestrictions::BOTH:
return "BOTH";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AdsOnDeliveryRestrictionsMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/Authorization.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
Authorization::Authorization() :
m_cdnIdentifierSecretHasBeenSet(false),
m_secretsRoleArnHasBeenSet(false)
{
}
Authorization::Authorization(JsonView jsonValue) :
m_cdnIdentifierSecretHasBeenSet(false),
m_secretsRoleArnHasBeenSet(false)
{
*this = jsonValue;
}
Authorization& Authorization::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("cdnIdentifierSecret"))
{
m_cdnIdentifierSecret = jsonValue.GetString("cdnIdentifierSecret");
m_cdnIdentifierSecretHasBeenSet = true;
}
if(jsonValue.ValueExists("secretsRoleArn"))
{
m_secretsRoleArn = jsonValue.GetString("secretsRoleArn");
m_secretsRoleArnHasBeenSet = true;
}
return *this;
}
JsonValue Authorization::Jsonize() const
{
JsonValue payload;
if(m_cdnIdentifierSecretHasBeenSet)
{
payload.WithString("cdnIdentifierSecret", m_cdnIdentifierSecret);
}
if(m_secretsRoleArnHasBeenSet)
{
payload.WithString("secretsRoleArn", m_secretsRoleArn);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,127 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/Channel.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
Channel::Channel() :
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsIngestHasBeenSet(false),
m_idHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Channel::Channel(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsIngestHasBeenSet(false),
m_idHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
Channel& Channel::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("hlsIngest"))
{
m_hlsIngest = jsonValue.GetObject("hlsIngest");
m_hlsIngestHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
m_tagsHasBeenSet = true;
}
return *this;
}
JsonValue Channel::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_hlsIngestHasBeenSet)
{
payload.WithObject("hlsIngest", m_hlsIngest.Jsonize());
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CmafEncryption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
CmafEncryption::CmafEncryption() :
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
}
CmafEncryption::CmafEncryption(JsonView jsonValue) :
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
*this = jsonValue;
}
CmafEncryption& CmafEncryption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("keyRotationIntervalSeconds"))
{
m_keyRotationIntervalSeconds = jsonValue.GetInteger("keyRotationIntervalSeconds");
m_keyRotationIntervalSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("spekeKeyProvider"))
{
m_spekeKeyProvider = jsonValue.GetObject("spekeKeyProvider");
m_spekeKeyProviderHasBeenSet = true;
}
return *this;
}
JsonValue CmafEncryption::Jsonize() const
{
JsonValue payload;
if(m_keyRotationIntervalSecondsHasBeenSet)
{
payload.WithInteger("keyRotationIntervalSeconds", m_keyRotationIntervalSeconds);
}
if(m_spekeKeyProviderHasBeenSet)
{
payload.WithObject("spekeKeyProvider", m_spekeKeyProvider.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CmafPackage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
CmafPackage::CmafPackage() :
m_encryptionHasBeenSet(false),
m_hlsManifestsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentPrefixHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
}
CmafPackage::CmafPackage(JsonView jsonValue) :
m_encryptionHasBeenSet(false),
m_hlsManifestsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentPrefixHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
*this = jsonValue;
}
CmafPackage& CmafPackage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("hlsManifests"))
{
Array<JsonView> hlsManifestsJsonList = jsonValue.GetArray("hlsManifests");
for(unsigned hlsManifestsIndex = 0; hlsManifestsIndex < hlsManifestsJsonList.GetLength(); ++hlsManifestsIndex)
{
m_hlsManifests.push_back(hlsManifestsJsonList[hlsManifestsIndex].AsObject());
}
m_hlsManifestsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentPrefix"))
{
m_segmentPrefix = jsonValue.GetString("segmentPrefix");
m_segmentPrefixHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
return *this;
}
JsonValue CmafPackage::Jsonize() const
{
JsonValue payload;
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_hlsManifestsHasBeenSet)
{
Array<JsonValue> hlsManifestsJsonList(m_hlsManifests.size());
for(unsigned hlsManifestsIndex = 0; hlsManifestsIndex < hlsManifestsJsonList.GetLength(); ++hlsManifestsIndex)
{
hlsManifestsJsonList[hlsManifestsIndex].AsObject(m_hlsManifests[hlsManifestsIndex].Jsonize());
}
payload.WithArray("hlsManifests", std::move(hlsManifestsJsonList));
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_segmentPrefixHasBeenSet)
{
payload.WithString("segmentPrefix", m_segmentPrefix);
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CmafPackageCreateOrUpdateParameters.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
CmafPackageCreateOrUpdateParameters::CmafPackageCreateOrUpdateParameters() :
m_encryptionHasBeenSet(false),
m_hlsManifestsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentPrefixHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
}
CmafPackageCreateOrUpdateParameters::CmafPackageCreateOrUpdateParameters(JsonView jsonValue) :
m_encryptionHasBeenSet(false),
m_hlsManifestsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentPrefixHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
*this = jsonValue;
}
CmafPackageCreateOrUpdateParameters& CmafPackageCreateOrUpdateParameters::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("hlsManifests"))
{
Array<JsonView> hlsManifestsJsonList = jsonValue.GetArray("hlsManifests");
for(unsigned hlsManifestsIndex = 0; hlsManifestsIndex < hlsManifestsJsonList.GetLength(); ++hlsManifestsIndex)
{
m_hlsManifests.push_back(hlsManifestsJsonList[hlsManifestsIndex].AsObject());
}
m_hlsManifestsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentPrefix"))
{
m_segmentPrefix = jsonValue.GetString("segmentPrefix");
m_segmentPrefixHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
return *this;
}
JsonValue CmafPackageCreateOrUpdateParameters::Jsonize() const
{
JsonValue payload;
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_hlsManifestsHasBeenSet)
{
Array<JsonValue> hlsManifestsJsonList(m_hlsManifests.size());
for(unsigned hlsManifestsIndex = 0; hlsManifestsIndex < hlsManifestsJsonList.GetLength(); ++hlsManifestsIndex)
{
hlsManifestsJsonList[hlsManifestsIndex].AsObject(m_hlsManifests[hlsManifestsIndex].Jsonize());
}
payload.WithArray("hlsManifests", std::move(hlsManifestsJsonList));
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_segmentPrefixHasBeenSet)
{
payload.WithString("segmentPrefix", m_segmentPrefix);
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,54 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateChannelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateChannelRequest::CreateChannelRequest() :
m_descriptionHasBeenSet(false),
m_idHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateChannelRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateChannelResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateChannelResult::CreateChannelResult()
{
}
CreateChannelResult::CreateChannelResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateChannelResult& CreateChannelResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsIngest"))
{
m_hlsIngest = jsonValue.GetObject("hlsIngest");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateHarvestJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateHarvestJobRequest::CreateHarvestJobRequest() :
m_endTimeHasBeenSet(false),
m_idHasBeenSet(false),
m_originEndpointIdHasBeenSet(false),
m_s3DestinationHasBeenSet(false),
m_startTimeHasBeenSet(false)
{
}
Aws::String CreateHarvestJobRequest::SerializePayload() const
{
JsonValue payload;
if(m_endTimeHasBeenSet)
{
payload.WithString("endTime", m_endTime);
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_originEndpointIdHasBeenSet)
{
payload.WithString("originEndpointId", m_originEndpointId);
}
if(m_s3DestinationHasBeenSet)
{
payload.WithObject("s3Destination", m_s3Destination.Jsonize());
}
if(m_startTimeHasBeenSet)
{
payload.WithString("startTime", m_startTime);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateHarvestJobResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateHarvestJobResult::CreateHarvestJobResult() :
m_status(Status::NOT_SET)
{
}
CreateHarvestJobResult::CreateHarvestJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(Status::NOT_SET)
{
*this = result;
}
CreateHarvestJobResult& CreateHarvestJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetString("createdAt");
}
if(jsonValue.ValueExists("endTime"))
{
m_endTime = jsonValue.GetString("endTime");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("originEndpointId"))
{
m_originEndpointId = jsonValue.GetString("originEndpointId");
}
if(jsonValue.ValueExists("s3Destination"))
{
m_s3Destination = jsonValue.GetObject("s3Destination");
}
if(jsonValue.ValueExists("startTime"))
{
m_startTime = jsonValue.GetString("startTime");
}
if(jsonValue.ValueExists("status"))
{
m_status = StatusMapper::GetStatusForName(jsonValue.GetString("status"));
}
return *this;
}

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateOriginEndpointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateOriginEndpointRequest::CreateOriginEndpointRequest() :
m_authorizationHasBeenSet(false),
m_channelIdHasBeenSet(false),
m_cmafPackageHasBeenSet(false),
m_dashPackageHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsPackageHasBeenSet(false),
m_idHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_mssPackageHasBeenSet(false),
m_origination(Origination::NOT_SET),
m_originationHasBeenSet(false),
m_startoverWindowSeconds(0),
m_startoverWindowSecondsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_timeDelaySeconds(0),
m_timeDelaySecondsHasBeenSet(false),
m_whitelistHasBeenSet(false)
{
}
Aws::String CreateOriginEndpointRequest::SerializePayload() const
{
JsonValue payload;
if(m_authorizationHasBeenSet)
{
payload.WithObject("authorization", m_authorization.Jsonize());
}
if(m_channelIdHasBeenSet)
{
payload.WithString("channelId", m_channelId);
}
if(m_cmafPackageHasBeenSet)
{
payload.WithObject("cmafPackage", m_cmafPackage.Jsonize());
}
if(m_dashPackageHasBeenSet)
{
payload.WithObject("dashPackage", m_dashPackage.Jsonize());
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_hlsPackageHasBeenSet)
{
payload.WithObject("hlsPackage", m_hlsPackage.Jsonize());
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_manifestNameHasBeenSet)
{
payload.WithString("manifestName", m_manifestName);
}
if(m_mssPackageHasBeenSet)
{
payload.WithObject("mssPackage", m_mssPackage.Jsonize());
}
if(m_originationHasBeenSet)
{
payload.WithString("origination", OriginationMapper::GetNameForOrigination(m_origination));
}
if(m_startoverWindowSecondsHasBeenSet)
{
payload.WithInteger("startoverWindowSeconds", m_startoverWindowSeconds);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
if(m_timeDelaySecondsHasBeenSet)
{
payload.WithInteger("timeDelaySeconds", m_timeDelaySeconds);
}
if(m_whitelistHasBeenSet)
{
Array<JsonValue> whitelistJsonList(m_whitelist.size());
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
whitelistJsonList[whitelistIndex].AsString(m_whitelist[whitelistIndex]);
}
payload.WithArray("whitelist", std::move(whitelistJsonList));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,142 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/CreateOriginEndpointResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateOriginEndpointResult::CreateOriginEndpointResult() :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
}
CreateOriginEndpointResult::CreateOriginEndpointResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
*this = result;
}
CreateOriginEndpointResult& CreateOriginEndpointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("authorization"))
{
m_authorization = jsonValue.GetObject("authorization");
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
}
if(jsonValue.ValueExists("cmafPackage"))
{
m_cmafPackage = jsonValue.GetObject("cmafPackage");
}
if(jsonValue.ValueExists("dashPackage"))
{
m_dashPackage = jsonValue.GetObject("dashPackage");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsPackage"))
{
m_hlsPackage = jsonValue.GetObject("hlsPackage");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
}
if(jsonValue.ValueExists("mssPackage"))
{
m_mssPackage = jsonValue.GetObject("mssPackage");
}
if(jsonValue.ValueExists("origination"))
{
m_origination = OriginationMapper::GetOriginationForName(jsonValue.GetString("origination"));
}
if(jsonValue.ValueExists("startoverWindowSeconds"))
{
m_startoverWindowSeconds = jsonValue.GetInteger("startoverWindowSeconds");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
if(jsonValue.ValueExists("timeDelaySeconds"))
{
m_timeDelaySeconds = jsonValue.GetInteger("timeDelaySeconds");
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
}
if(jsonValue.ValueExists("whitelist"))
{
Array<JsonView> whitelistJsonList = jsonValue.GetArray("whitelist");
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
m_whitelist.push_back(whitelistJsonList[whitelistIndex].AsString());
}
}
return *this;
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DashEncryption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
DashEncryption::DashEncryption() :
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
}
DashEncryption::DashEncryption(JsonView jsonValue) :
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
*this = jsonValue;
}
DashEncryption& DashEncryption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("keyRotationIntervalSeconds"))
{
m_keyRotationIntervalSeconds = jsonValue.GetInteger("keyRotationIntervalSeconds");
m_keyRotationIntervalSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("spekeKeyProvider"))
{
m_spekeKeyProvider = jsonValue.GetObject("spekeKeyProvider");
m_spekeKeyProviderHasBeenSet = true;
}
return *this;
}
JsonValue DashEncryption::Jsonize() const
{
JsonValue payload;
if(m_keyRotationIntervalSecondsHasBeenSet)
{
payload.WithInteger("keyRotationIntervalSeconds", m_keyRotationIntervalSeconds);
}
if(m_spekeKeyProviderHasBeenSet)
{
payload.WithObject("spekeKeyProvider", m_spekeKeyProvider.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,269 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DashPackage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
DashPackage::DashPackage() :
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_manifestLayout(ManifestLayout::NOT_SET),
m_manifestLayoutHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_minBufferTimeSeconds(0),
m_minBufferTimeSecondsHasBeenSet(false),
m_minUpdatePeriodSeconds(0),
m_minUpdatePeriodSecondsHasBeenSet(false),
m_periodTriggersHasBeenSet(false),
m_profile(Profile::NOT_SET),
m_profileHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentTemplateFormat(SegmentTemplateFormat::NOT_SET),
m_segmentTemplateFormatHasBeenSet(false),
m_streamSelectionHasBeenSet(false),
m_suggestedPresentationDelaySeconds(0),
m_suggestedPresentationDelaySecondsHasBeenSet(false)
{
}
DashPackage::DashPackage(JsonView jsonValue) :
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_manifestLayout(ManifestLayout::NOT_SET),
m_manifestLayoutHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_minBufferTimeSeconds(0),
m_minBufferTimeSecondsHasBeenSet(false),
m_minUpdatePeriodSeconds(0),
m_minUpdatePeriodSecondsHasBeenSet(false),
m_periodTriggersHasBeenSet(false),
m_profile(Profile::NOT_SET),
m_profileHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_segmentTemplateFormat(SegmentTemplateFormat::NOT_SET),
m_segmentTemplateFormatHasBeenSet(false),
m_streamSelectionHasBeenSet(false),
m_suggestedPresentationDelaySeconds(0),
m_suggestedPresentationDelaySecondsHasBeenSet(false)
{
*this = jsonValue;
}
DashPackage& DashPackage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("adTriggers"))
{
Array<JsonView> adTriggersJsonList = jsonValue.GetArray("adTriggers");
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
m_adTriggers.push_back(__AdTriggersElementMapper::Get__AdTriggersElementForName(adTriggersJsonList[adTriggersIndex].AsString()));
}
m_adTriggersHasBeenSet = true;
}
if(jsonValue.ValueExists("adsOnDeliveryRestrictions"))
{
m_adsOnDeliveryRestrictions = AdsOnDeliveryRestrictionsMapper::GetAdsOnDeliveryRestrictionsForName(jsonValue.GetString("adsOnDeliveryRestrictions"));
m_adsOnDeliveryRestrictionsHasBeenSet = true;
}
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestLayout"))
{
m_manifestLayout = ManifestLayoutMapper::GetManifestLayoutForName(jsonValue.GetString("manifestLayout"));
m_manifestLayoutHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestWindowSeconds"))
{
m_manifestWindowSeconds = jsonValue.GetInteger("manifestWindowSeconds");
m_manifestWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("minBufferTimeSeconds"))
{
m_minBufferTimeSeconds = jsonValue.GetInteger("minBufferTimeSeconds");
m_minBufferTimeSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("minUpdatePeriodSeconds"))
{
m_minUpdatePeriodSeconds = jsonValue.GetInteger("minUpdatePeriodSeconds");
m_minUpdatePeriodSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("periodTriggers"))
{
Array<JsonView> periodTriggersJsonList = jsonValue.GetArray("periodTriggers");
for(unsigned periodTriggersIndex = 0; periodTriggersIndex < periodTriggersJsonList.GetLength(); ++periodTriggersIndex)
{
m_periodTriggers.push_back(__PeriodTriggersElementMapper::Get__PeriodTriggersElementForName(periodTriggersJsonList[periodTriggersIndex].AsString()));
}
m_periodTriggersHasBeenSet = true;
}
if(jsonValue.ValueExists("profile"))
{
m_profile = ProfileMapper::GetProfileForName(jsonValue.GetString("profile"));
m_profileHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentTemplateFormat"))
{
m_segmentTemplateFormat = SegmentTemplateFormatMapper::GetSegmentTemplateFormatForName(jsonValue.GetString("segmentTemplateFormat"));
m_segmentTemplateFormatHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
if(jsonValue.ValueExists("suggestedPresentationDelaySeconds"))
{
m_suggestedPresentationDelaySeconds = jsonValue.GetInteger("suggestedPresentationDelaySeconds");
m_suggestedPresentationDelaySecondsHasBeenSet = true;
}
return *this;
}
JsonValue DashPackage::Jsonize() const
{
JsonValue payload;
if(m_adTriggersHasBeenSet)
{
Array<JsonValue> adTriggersJsonList(m_adTriggers.size());
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
adTriggersJsonList[adTriggersIndex].AsString(__AdTriggersElementMapper::GetNameFor__AdTriggersElement(m_adTriggers[adTriggersIndex]));
}
payload.WithArray("adTriggers", std::move(adTriggersJsonList));
}
if(m_adsOnDeliveryRestrictionsHasBeenSet)
{
payload.WithString("adsOnDeliveryRestrictions", AdsOnDeliveryRestrictionsMapper::GetNameForAdsOnDeliveryRestrictions(m_adsOnDeliveryRestrictions));
}
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_manifestLayoutHasBeenSet)
{
payload.WithString("manifestLayout", ManifestLayoutMapper::GetNameForManifestLayout(m_manifestLayout));
}
if(m_manifestWindowSecondsHasBeenSet)
{
payload.WithInteger("manifestWindowSeconds", m_manifestWindowSeconds);
}
if(m_minBufferTimeSecondsHasBeenSet)
{
payload.WithInteger("minBufferTimeSeconds", m_minBufferTimeSeconds);
}
if(m_minUpdatePeriodSecondsHasBeenSet)
{
payload.WithInteger("minUpdatePeriodSeconds", m_minUpdatePeriodSeconds);
}
if(m_periodTriggersHasBeenSet)
{
Array<JsonValue> periodTriggersJsonList(m_periodTriggers.size());
for(unsigned periodTriggersIndex = 0; periodTriggersIndex < periodTriggersJsonList.GetLength(); ++periodTriggersIndex)
{
periodTriggersJsonList[periodTriggersIndex].AsString(__PeriodTriggersElementMapper::GetNameFor__PeriodTriggersElement(m_periodTriggers[periodTriggersIndex]));
}
payload.WithArray("periodTriggers", std::move(periodTriggersJsonList));
}
if(m_profileHasBeenSet)
{
payload.WithString("profile", ProfileMapper::GetNameForProfile(m_profile));
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_segmentTemplateFormatHasBeenSet)
{
payload.WithString("segmentTemplateFormat", SegmentTemplateFormatMapper::GetNameForSegmentTemplateFormat(m_segmentTemplateFormat));
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
if(m_suggestedPresentationDelaySecondsHasBeenSet)
{
payload.WithInteger("suggestedPresentationDelaySeconds", m_suggestedPresentationDelaySeconds);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DeleteChannelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteChannelRequest::DeleteChannelRequest() :
m_idHasBeenSet(false)
{
}
Aws::String DeleteChannelRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DeleteChannelResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteChannelResult::DeleteChannelResult()
{
}
DeleteChannelResult::DeleteChannelResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteChannelResult& DeleteChannelResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DeleteOriginEndpointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteOriginEndpointRequest::DeleteOriginEndpointRequest() :
m_idHasBeenSet(false)
{
}
Aws::String DeleteOriginEndpointRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DeleteOriginEndpointResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteOriginEndpointResult::DeleteOriginEndpointResult()
{
}
DeleteOriginEndpointResult::DeleteOriginEndpointResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteOriginEndpointResult& DeleteOriginEndpointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeChannelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeChannelRequest::DescribeChannelRequest() :
m_idHasBeenSet(false)
{
}
Aws::String DescribeChannelRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeChannelResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeChannelResult::DescribeChannelResult()
{
}
DescribeChannelResult::DescribeChannelResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeChannelResult& DescribeChannelResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsIngest"))
{
m_hlsIngest = jsonValue.GetObject("hlsIngest");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeHarvestJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeHarvestJobRequest::DescribeHarvestJobRequest() :
m_idHasBeenSet(false)
{
}
Aws::String DescribeHarvestJobRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeHarvestJobResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeHarvestJobResult::DescribeHarvestJobResult() :
m_status(Status::NOT_SET)
{
}
DescribeHarvestJobResult::DescribeHarvestJobResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(Status::NOT_SET)
{
*this = result;
}
DescribeHarvestJobResult& DescribeHarvestJobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetString("createdAt");
}
if(jsonValue.ValueExists("endTime"))
{
m_endTime = jsonValue.GetString("endTime");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("originEndpointId"))
{
m_originEndpointId = jsonValue.GetString("originEndpointId");
}
if(jsonValue.ValueExists("s3Destination"))
{
m_s3Destination = jsonValue.GetObject("s3Destination");
}
if(jsonValue.ValueExists("startTime"))
{
m_startTime = jsonValue.GetString("startTime");
}
if(jsonValue.ValueExists("status"))
{
m_status = StatusMapper::GetStatusForName(jsonValue.GetString("status"));
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeOriginEndpointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeOriginEndpointRequest::DescribeOriginEndpointRequest() :
m_idHasBeenSet(false)
{
}
Aws::String DescribeOriginEndpointRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,142 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/DescribeOriginEndpointResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeOriginEndpointResult::DescribeOriginEndpointResult() :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
}
DescribeOriginEndpointResult::DescribeOriginEndpointResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
*this = result;
}
DescribeOriginEndpointResult& DescribeOriginEndpointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("authorization"))
{
m_authorization = jsonValue.GetObject("authorization");
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
}
if(jsonValue.ValueExists("cmafPackage"))
{
m_cmafPackage = jsonValue.GetObject("cmafPackage");
}
if(jsonValue.ValueExists("dashPackage"))
{
m_dashPackage = jsonValue.GetObject("dashPackage");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsPackage"))
{
m_hlsPackage = jsonValue.GetObject("hlsPackage");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
}
if(jsonValue.ValueExists("mssPackage"))
{
m_mssPackage = jsonValue.GetObject("mssPackage");
}
if(jsonValue.ValueExists("origination"))
{
m_origination = OriginationMapper::GetOriginationForName(jsonValue.GetString("origination"));
}
if(jsonValue.ValueExists("startoverWindowSeconds"))
{
m_startoverWindowSeconds = jsonValue.GetInteger("startoverWindowSeconds");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
if(jsonValue.ValueExists("timeDelaySeconds"))
{
m_timeDelaySeconds = jsonValue.GetInteger("timeDelaySeconds");
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
}
if(jsonValue.ValueExists("whitelist"))
{
Array<JsonView> whitelistJsonList = jsonValue.GetArray("whitelist");
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
m_whitelist.push_back(whitelistJsonList[whitelistIndex].AsString());
}
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/EncryptionMethod.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace EncryptionMethodMapper
{
static const int AES_128_HASH = HashingUtils::HashString("AES_128");
static const int SAMPLE_AES_HASH = HashingUtils::HashString("SAMPLE_AES");
EncryptionMethod GetEncryptionMethodForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == AES_128_HASH)
{
return EncryptionMethod::AES_128;
}
else if (hashCode == SAMPLE_AES_HASH)
{
return EncryptionMethod::SAMPLE_AES;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EncryptionMethod>(hashCode);
}
return EncryptionMethod::NOT_SET;
}
Aws::String GetNameForEncryptionMethod(EncryptionMethod enumValue)
{
switch(enumValue)
{
case EncryptionMethod::AES_128:
return "AES_128";
case EncryptionMethod::SAMPLE_AES:
return "SAMPLE_AES";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EncryptionMethodMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,180 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HarvestJob.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HarvestJob::HarvestJob() :
m_arnHasBeenSet(false),
m_channelIdHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_endTimeHasBeenSet(false),
m_idHasBeenSet(false),
m_originEndpointIdHasBeenSet(false),
m_s3DestinationHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_status(Status::NOT_SET),
m_statusHasBeenSet(false)
{
}
HarvestJob::HarvestJob(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_channelIdHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_endTimeHasBeenSet(false),
m_idHasBeenSet(false),
m_originEndpointIdHasBeenSet(false),
m_s3DestinationHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_status(Status::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
HarvestJob& HarvestJob::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
m_channelIdHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetString("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("endTime"))
{
m_endTime = jsonValue.GetString("endTime");
m_endTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("originEndpointId"))
{
m_originEndpointId = jsonValue.GetString("originEndpointId");
m_originEndpointIdHasBeenSet = true;
}
if(jsonValue.ValueExists("s3Destination"))
{
m_s3Destination = jsonValue.GetObject("s3Destination");
m_s3DestinationHasBeenSet = true;
}
if(jsonValue.ValueExists("startTime"))
{
m_startTime = jsonValue.GetString("startTime");
m_startTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = StatusMapper::GetStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue HarvestJob::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_channelIdHasBeenSet)
{
payload.WithString("channelId", m_channelId);
}
if(m_createdAtHasBeenSet)
{
payload.WithString("createdAt", m_createdAt);
}
if(m_endTimeHasBeenSet)
{
payload.WithString("endTime", m_endTime);
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_originEndpointIdHasBeenSet)
{
payload.WithString("originEndpointId", m_originEndpointId);
}
if(m_s3DestinationHasBeenSet)
{
payload.WithObject("s3Destination", m_s3Destination.Jsonize());
}
if(m_startTimeHasBeenSet)
{
payload.WithString("startTime", m_startTime);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", StatusMapper::GetNameForStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HlsEncryption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HlsEncryption::HlsEncryption() :
m_constantInitializationVectorHasBeenSet(false),
m_encryptionMethod(EncryptionMethod::NOT_SET),
m_encryptionMethodHasBeenSet(false),
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_repeatExtXKey(false),
m_repeatExtXKeyHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
}
HlsEncryption::HlsEncryption(JsonView jsonValue) :
m_constantInitializationVectorHasBeenSet(false),
m_encryptionMethod(EncryptionMethod::NOT_SET),
m_encryptionMethodHasBeenSet(false),
m_keyRotationIntervalSeconds(0),
m_keyRotationIntervalSecondsHasBeenSet(false),
m_repeatExtXKey(false),
m_repeatExtXKeyHasBeenSet(false),
m_spekeKeyProviderHasBeenSet(false)
{
*this = jsonValue;
}
HlsEncryption& HlsEncryption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("constantInitializationVector"))
{
m_constantInitializationVector = jsonValue.GetString("constantInitializationVector");
m_constantInitializationVectorHasBeenSet = true;
}
if(jsonValue.ValueExists("encryptionMethod"))
{
m_encryptionMethod = EncryptionMethodMapper::GetEncryptionMethodForName(jsonValue.GetString("encryptionMethod"));
m_encryptionMethodHasBeenSet = true;
}
if(jsonValue.ValueExists("keyRotationIntervalSeconds"))
{
m_keyRotationIntervalSeconds = jsonValue.GetInteger("keyRotationIntervalSeconds");
m_keyRotationIntervalSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("repeatExtXKey"))
{
m_repeatExtXKey = jsonValue.GetBool("repeatExtXKey");
m_repeatExtXKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("spekeKeyProvider"))
{
m_spekeKeyProvider = jsonValue.GetObject("spekeKeyProvider");
m_spekeKeyProviderHasBeenSet = true;
}
return *this;
}
JsonValue HlsEncryption::Jsonize() const
{
JsonValue payload;
if(m_constantInitializationVectorHasBeenSet)
{
payload.WithString("constantInitializationVector", m_constantInitializationVector);
}
if(m_encryptionMethodHasBeenSet)
{
payload.WithString("encryptionMethod", EncryptionMethodMapper::GetNameForEncryptionMethod(m_encryptionMethod));
}
if(m_keyRotationIntervalSecondsHasBeenSet)
{
payload.WithInteger("keyRotationIntervalSeconds", m_keyRotationIntervalSeconds);
}
if(m_repeatExtXKeyHasBeenSet)
{
payload.WithBool("repeatExtXKey", m_repeatExtXKey);
}
if(m_spekeKeyProviderHasBeenSet)
{
payload.WithObject("spekeKeyProvider", m_spekeKeyProvider.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HlsIngest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HlsIngest::HlsIngest() :
m_ingestEndpointsHasBeenSet(false)
{
}
HlsIngest::HlsIngest(JsonView jsonValue) :
m_ingestEndpointsHasBeenSet(false)
{
*this = jsonValue;
}
HlsIngest& HlsIngest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ingestEndpoints"))
{
Array<JsonView> ingestEndpointsJsonList = jsonValue.GetArray("ingestEndpoints");
for(unsigned ingestEndpointsIndex = 0; ingestEndpointsIndex < ingestEndpointsJsonList.GetLength(); ++ingestEndpointsIndex)
{
m_ingestEndpoints.push_back(ingestEndpointsJsonList[ingestEndpointsIndex].AsObject());
}
m_ingestEndpointsHasBeenSet = true;
}
return *this;
}
JsonValue HlsIngest::Jsonize() const
{
JsonValue payload;
if(m_ingestEndpointsHasBeenSet)
{
Array<JsonValue> ingestEndpointsJsonList(m_ingestEndpoints.size());
for(unsigned ingestEndpointsIndex = 0; ingestEndpointsIndex < ingestEndpointsJsonList.GetLength(); ++ingestEndpointsIndex)
{
ingestEndpointsJsonList[ingestEndpointsIndex].AsObject(m_ingestEndpoints[ingestEndpointsIndex].Jsonize());
}
payload.WithArray("ingestEndpoints", std::move(ingestEndpointsJsonList));
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,172 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HlsManifest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HlsManifest::HlsManifest() :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_idHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
HlsManifest::HlsManifest(JsonView jsonValue) :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_idHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
HlsManifest& HlsManifest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("adMarkers"))
{
m_adMarkers = AdMarkersMapper::GetAdMarkersForName(jsonValue.GetString("adMarkers"));
m_adMarkersHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("includeIframeOnlyStream"))
{
m_includeIframeOnlyStream = jsonValue.GetBool("includeIframeOnlyStream");
m_includeIframeOnlyStreamHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
m_manifestNameHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistType"))
{
m_playlistType = PlaylistTypeMapper::GetPlaylistTypeForName(jsonValue.GetString("playlistType"));
m_playlistTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistWindowSeconds"))
{
m_playlistWindowSeconds = jsonValue.GetInteger("playlistWindowSeconds");
m_playlistWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("programDateTimeIntervalSeconds"))
{
m_programDateTimeIntervalSeconds = jsonValue.GetInteger("programDateTimeIntervalSeconds");
m_programDateTimeIntervalSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue HlsManifest::Jsonize() const
{
JsonValue payload;
if(m_adMarkersHasBeenSet)
{
payload.WithString("adMarkers", AdMarkersMapper::GetNameForAdMarkers(m_adMarkers));
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_includeIframeOnlyStreamHasBeenSet)
{
payload.WithBool("includeIframeOnlyStream", m_includeIframeOnlyStream);
}
if(m_manifestNameHasBeenSet)
{
payload.WithString("manifestName", m_manifestName);
}
if(m_playlistTypeHasBeenSet)
{
payload.WithString("playlistType", PlaylistTypeMapper::GetNameForPlaylistType(m_playlistType));
}
if(m_playlistWindowSecondsHasBeenSet)
{
payload.WithInteger("playlistWindowSeconds", m_playlistWindowSeconds);
}
if(m_programDateTimeIntervalSecondsHasBeenSet)
{
payload.WithInteger("programDateTimeIntervalSeconds", m_programDateTimeIntervalSeconds);
}
if(m_urlHasBeenSet)
{
payload.WithString("url", m_url);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,196 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HlsManifestCreateOrUpdateParameters.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HlsManifestCreateOrUpdateParameters::HlsManifestCreateOrUpdateParameters() :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_idHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false)
{
}
HlsManifestCreateOrUpdateParameters::HlsManifestCreateOrUpdateParameters(JsonView jsonValue) :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_idHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false)
{
*this = jsonValue;
}
HlsManifestCreateOrUpdateParameters& HlsManifestCreateOrUpdateParameters::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("adMarkers"))
{
m_adMarkers = AdMarkersMapper::GetAdMarkersForName(jsonValue.GetString("adMarkers"));
m_adMarkersHasBeenSet = true;
}
if(jsonValue.ValueExists("adTriggers"))
{
Array<JsonView> adTriggersJsonList = jsonValue.GetArray("adTriggers");
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
m_adTriggers.push_back(__AdTriggersElementMapper::Get__AdTriggersElementForName(adTriggersJsonList[adTriggersIndex].AsString()));
}
m_adTriggersHasBeenSet = true;
}
if(jsonValue.ValueExists("adsOnDeliveryRestrictions"))
{
m_adsOnDeliveryRestrictions = AdsOnDeliveryRestrictionsMapper::GetAdsOnDeliveryRestrictionsForName(jsonValue.GetString("adsOnDeliveryRestrictions"));
m_adsOnDeliveryRestrictionsHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("includeIframeOnlyStream"))
{
m_includeIframeOnlyStream = jsonValue.GetBool("includeIframeOnlyStream");
m_includeIframeOnlyStreamHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
m_manifestNameHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistType"))
{
m_playlistType = PlaylistTypeMapper::GetPlaylistTypeForName(jsonValue.GetString("playlistType"));
m_playlistTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistWindowSeconds"))
{
m_playlistWindowSeconds = jsonValue.GetInteger("playlistWindowSeconds");
m_playlistWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("programDateTimeIntervalSeconds"))
{
m_programDateTimeIntervalSeconds = jsonValue.GetInteger("programDateTimeIntervalSeconds");
m_programDateTimeIntervalSecondsHasBeenSet = true;
}
return *this;
}
JsonValue HlsManifestCreateOrUpdateParameters::Jsonize() const
{
JsonValue payload;
if(m_adMarkersHasBeenSet)
{
payload.WithString("adMarkers", AdMarkersMapper::GetNameForAdMarkers(m_adMarkers));
}
if(m_adTriggersHasBeenSet)
{
Array<JsonValue> adTriggersJsonList(m_adTriggers.size());
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
adTriggersJsonList[adTriggersIndex].AsString(__AdTriggersElementMapper::GetNameFor__AdTriggersElement(m_adTriggers[adTriggersIndex]));
}
payload.WithArray("adTriggers", std::move(adTriggersJsonList));
}
if(m_adsOnDeliveryRestrictionsHasBeenSet)
{
payload.WithString("adsOnDeliveryRestrictions", AdsOnDeliveryRestrictionsMapper::GetNameForAdsOnDeliveryRestrictions(m_adsOnDeliveryRestrictions));
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_includeIframeOnlyStreamHasBeenSet)
{
payload.WithBool("includeIframeOnlyStream", m_includeIframeOnlyStream);
}
if(m_manifestNameHasBeenSet)
{
payload.WithString("manifestName", m_manifestName);
}
if(m_playlistTypeHasBeenSet)
{
payload.WithString("playlistType", PlaylistTypeMapper::GetNameForPlaylistType(m_playlistType));
}
if(m_playlistWindowSecondsHasBeenSet)
{
payload.WithInteger("playlistWindowSeconds", m_playlistWindowSeconds);
}
if(m_programDateTimeIntervalSecondsHasBeenSet)
{
payload.WithInteger("programDateTimeIntervalSeconds", m_programDateTimeIntervalSeconds);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,230 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/HlsPackage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
HlsPackage::HlsPackage() :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false),
m_useAudioRenditionGroup(false),
m_useAudioRenditionGroupHasBeenSet(false)
{
}
HlsPackage::HlsPackage(JsonView jsonValue) :
m_adMarkers(AdMarkers::NOT_SET),
m_adMarkersHasBeenSet(false),
m_adTriggersHasBeenSet(false),
m_adsOnDeliveryRestrictions(AdsOnDeliveryRestrictions::NOT_SET),
m_adsOnDeliveryRestrictionsHasBeenSet(false),
m_encryptionHasBeenSet(false),
m_includeIframeOnlyStream(false),
m_includeIframeOnlyStreamHasBeenSet(false),
m_playlistType(PlaylistType::NOT_SET),
m_playlistTypeHasBeenSet(false),
m_playlistWindowSeconds(0),
m_playlistWindowSecondsHasBeenSet(false),
m_programDateTimeIntervalSeconds(0),
m_programDateTimeIntervalSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false),
m_useAudioRenditionGroup(false),
m_useAudioRenditionGroupHasBeenSet(false)
{
*this = jsonValue;
}
HlsPackage& HlsPackage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("adMarkers"))
{
m_adMarkers = AdMarkersMapper::GetAdMarkersForName(jsonValue.GetString("adMarkers"));
m_adMarkersHasBeenSet = true;
}
if(jsonValue.ValueExists("adTriggers"))
{
Array<JsonView> adTriggersJsonList = jsonValue.GetArray("adTriggers");
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
m_adTriggers.push_back(__AdTriggersElementMapper::Get__AdTriggersElementForName(adTriggersJsonList[adTriggersIndex].AsString()));
}
m_adTriggersHasBeenSet = true;
}
if(jsonValue.ValueExists("adsOnDeliveryRestrictions"))
{
m_adsOnDeliveryRestrictions = AdsOnDeliveryRestrictionsMapper::GetAdsOnDeliveryRestrictionsForName(jsonValue.GetString("adsOnDeliveryRestrictions"));
m_adsOnDeliveryRestrictionsHasBeenSet = true;
}
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("includeIframeOnlyStream"))
{
m_includeIframeOnlyStream = jsonValue.GetBool("includeIframeOnlyStream");
m_includeIframeOnlyStreamHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistType"))
{
m_playlistType = PlaylistTypeMapper::GetPlaylistTypeForName(jsonValue.GetString("playlistType"));
m_playlistTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("playlistWindowSeconds"))
{
m_playlistWindowSeconds = jsonValue.GetInteger("playlistWindowSeconds");
m_playlistWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("programDateTimeIntervalSeconds"))
{
m_programDateTimeIntervalSeconds = jsonValue.GetInteger("programDateTimeIntervalSeconds");
m_programDateTimeIntervalSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
if(jsonValue.ValueExists("useAudioRenditionGroup"))
{
m_useAudioRenditionGroup = jsonValue.GetBool("useAudioRenditionGroup");
m_useAudioRenditionGroupHasBeenSet = true;
}
return *this;
}
JsonValue HlsPackage::Jsonize() const
{
JsonValue payload;
if(m_adMarkersHasBeenSet)
{
payload.WithString("adMarkers", AdMarkersMapper::GetNameForAdMarkers(m_adMarkers));
}
if(m_adTriggersHasBeenSet)
{
Array<JsonValue> adTriggersJsonList(m_adTriggers.size());
for(unsigned adTriggersIndex = 0; adTriggersIndex < adTriggersJsonList.GetLength(); ++adTriggersIndex)
{
adTriggersJsonList[adTriggersIndex].AsString(__AdTriggersElementMapper::GetNameFor__AdTriggersElement(m_adTriggers[adTriggersIndex]));
}
payload.WithArray("adTriggers", std::move(adTriggersJsonList));
}
if(m_adsOnDeliveryRestrictionsHasBeenSet)
{
payload.WithString("adsOnDeliveryRestrictions", AdsOnDeliveryRestrictionsMapper::GetNameForAdsOnDeliveryRestrictions(m_adsOnDeliveryRestrictions));
}
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_includeIframeOnlyStreamHasBeenSet)
{
payload.WithBool("includeIframeOnlyStream", m_includeIframeOnlyStream);
}
if(m_playlistTypeHasBeenSet)
{
payload.WithString("playlistType", PlaylistTypeMapper::GetNameForPlaylistType(m_playlistType));
}
if(m_playlistWindowSecondsHasBeenSet)
{
payload.WithInteger("playlistWindowSeconds", m_playlistWindowSeconds);
}
if(m_programDateTimeIntervalSecondsHasBeenSet)
{
payload.WithInteger("programDateTimeIntervalSeconds", m_programDateTimeIntervalSeconds);
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
if(m_useAudioRenditionGroupHasBeenSet)
{
payload.WithBool("useAudioRenditionGroup", m_useAudioRenditionGroup);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/IngestEndpoint.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
IngestEndpoint::IngestEndpoint() :
m_idHasBeenSet(false),
m_passwordHasBeenSet(false),
m_urlHasBeenSet(false),
m_usernameHasBeenSet(false)
{
}
IngestEndpoint::IngestEndpoint(JsonView jsonValue) :
m_idHasBeenSet(false),
m_passwordHasBeenSet(false),
m_urlHasBeenSet(false),
m_usernameHasBeenSet(false)
{
*this = jsonValue;
}
IngestEndpoint& IngestEndpoint::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("password"))
{
m_password = jsonValue.GetString("password");
m_passwordHasBeenSet = true;
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
m_urlHasBeenSet = true;
}
if(jsonValue.ValueExists("username"))
{
m_username = jsonValue.GetString("username");
m_usernameHasBeenSet = true;
}
return *this;
}
JsonValue IngestEndpoint::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_passwordHasBeenSet)
{
payload.WithString("password", m_password);
}
if(m_urlHasBeenSet)
{
payload.WithString("url", m_url);
}
if(m_usernameHasBeenSet)
{
payload.WithString("username", m_username);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListChannelsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListChannelsRequest::ListChannelsRequest() :
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListChannelsRequest::SerializePayload() const
{
return {};
}
void ListChannelsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListChannelsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListChannelsResult::ListChannelsResult()
{
}
ListChannelsResult::ListChannelsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListChannelsResult& ListChannelsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("channels"))
{
Array<JsonView> channelsJsonList = jsonValue.GetArray("channels");
for(unsigned channelsIndex = 0; channelsIndex < channelsJsonList.GetLength(); ++channelsIndex)
{
m_channels.push_back(channelsJsonList[channelsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListHarvestJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListHarvestJobsRequest::ListHarvestJobsRequest() :
m_includeChannelIdHasBeenSet(false),
m_includeStatusHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListHarvestJobsRequest::SerializePayload() const
{
return {};
}
void ListHarvestJobsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_includeChannelIdHasBeenSet)
{
ss << m_includeChannelId;
uri.AddQueryStringParameter("includeChannelId", ss.str());
ss.str("");
}
if(m_includeStatusHasBeenSet)
{
ss << m_includeStatus;
uri.AddQueryStringParameter("includeStatus", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListHarvestJobsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListHarvestJobsResult::ListHarvestJobsResult()
{
}
ListHarvestJobsResult::ListHarvestJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListHarvestJobsResult& ListHarvestJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("harvestJobs"))
{
Array<JsonView> harvestJobsJsonList = jsonValue.GetArray("harvestJobs");
for(unsigned harvestJobsIndex = 0; harvestJobsIndex < harvestJobsJsonList.GetLength(); ++harvestJobsIndex)
{
m_harvestJobs.push_back(harvestJobsJsonList[harvestJobsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListOriginEndpointsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListOriginEndpointsRequest::ListOriginEndpointsRequest() :
m_channelIdHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListOriginEndpointsRequest::SerializePayload() const
{
return {};
}
void ListOriginEndpointsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_channelIdHasBeenSet)
{
ss << m_channelId;
uri.AddQueryStringParameter("channelId", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("maxResults", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("nextToken", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListOriginEndpointsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListOriginEndpointsResult::ListOriginEndpointsResult()
{
}
ListOriginEndpointsResult::ListOriginEndpointsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListOriginEndpointsResult& ListOriginEndpointsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("originEndpoints"))
{
Array<JsonView> originEndpointsJsonList = jsonValue.GetArray("originEndpoints");
for(unsigned originEndpointsIndex = 0; originEndpointsIndex < originEndpointsJsonList.GetLength(); ++originEndpointsIndex)
{
m_originEndpoints.push_back(originEndpointsJsonList[originEndpointsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ListTagsForResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/ManifestLayout.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace ManifestLayoutMapper
{
static const int FULL_HASH = HashingUtils::HashString("FULL");
static const int COMPACT_HASH = HashingUtils::HashString("COMPACT");
ManifestLayout GetManifestLayoutForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == FULL_HASH)
{
return ManifestLayout::FULL;
}
else if (hashCode == COMPACT_HASH)
{
return ManifestLayout::COMPACT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ManifestLayout>(hashCode);
}
return ManifestLayout::NOT_SET;
}
Aws::String GetNameForManifestLayout(ManifestLayout enumValue)
{
switch(enumValue)
{
case ManifestLayout::FULL:
return "FULL";
case ManifestLayout::COMPACT:
return "COMPACT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ManifestLayoutMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/MssEncryption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
MssEncryption::MssEncryption() :
m_spekeKeyProviderHasBeenSet(false)
{
}
MssEncryption::MssEncryption(JsonView jsonValue) :
m_spekeKeyProviderHasBeenSet(false)
{
*this = jsonValue;
}
MssEncryption& MssEncryption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("spekeKeyProvider"))
{
m_spekeKeyProvider = jsonValue.GetObject("spekeKeyProvider");
m_spekeKeyProviderHasBeenSet = true;
}
return *this;
}
JsonValue MssEncryption::Jsonize() const
{
JsonValue payload;
if(m_spekeKeyProviderHasBeenSet)
{
payload.WithObject("spekeKeyProvider", m_spekeKeyProvider.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,108 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/MssPackage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
MssPackage::MssPackage() :
m_encryptionHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
}
MssPackage::MssPackage(JsonView jsonValue) :
m_encryptionHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
*this = jsonValue;
}
MssPackage& MssPackage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestWindowSeconds"))
{
m_manifestWindowSeconds = jsonValue.GetInteger("manifestWindowSeconds");
m_manifestWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
return *this;
}
JsonValue MssPackage::Jsonize() const
{
JsonValue payload;
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_manifestWindowSecondsHasBeenSet)
{
payload.WithInteger("manifestWindowSeconds", m_manifestWindowSeconds);
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,305 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/OriginEndpoint.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
OriginEndpoint::OriginEndpoint() :
m_arnHasBeenSet(false),
m_authorizationHasBeenSet(false),
m_channelIdHasBeenSet(false),
m_cmafPackageHasBeenSet(false),
m_dashPackageHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsPackageHasBeenSet(false),
m_idHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_mssPackageHasBeenSet(false),
m_origination(Origination::NOT_SET),
m_originationHasBeenSet(false),
m_startoverWindowSeconds(0),
m_startoverWindowSecondsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_timeDelaySeconds(0),
m_timeDelaySecondsHasBeenSet(false),
m_urlHasBeenSet(false),
m_whitelistHasBeenSet(false)
{
}
OriginEndpoint::OriginEndpoint(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_authorizationHasBeenSet(false),
m_channelIdHasBeenSet(false),
m_cmafPackageHasBeenSet(false),
m_dashPackageHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsPackageHasBeenSet(false),
m_idHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_mssPackageHasBeenSet(false),
m_origination(Origination::NOT_SET),
m_originationHasBeenSet(false),
m_startoverWindowSeconds(0),
m_startoverWindowSecondsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_timeDelaySeconds(0),
m_timeDelaySecondsHasBeenSet(false),
m_urlHasBeenSet(false),
m_whitelistHasBeenSet(false)
{
*this = jsonValue;
}
OriginEndpoint& OriginEndpoint::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("authorization"))
{
m_authorization = jsonValue.GetObject("authorization");
m_authorizationHasBeenSet = true;
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
m_channelIdHasBeenSet = true;
}
if(jsonValue.ValueExists("cmafPackage"))
{
m_cmafPackage = jsonValue.GetObject("cmafPackage");
m_cmafPackageHasBeenSet = true;
}
if(jsonValue.ValueExists("dashPackage"))
{
m_dashPackage = jsonValue.GetObject("dashPackage");
m_dashPackageHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("hlsPackage"))
{
m_hlsPackage = jsonValue.GetObject("hlsPackage");
m_hlsPackageHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
m_manifestNameHasBeenSet = true;
}
if(jsonValue.ValueExists("mssPackage"))
{
m_mssPackage = jsonValue.GetObject("mssPackage");
m_mssPackageHasBeenSet = true;
}
if(jsonValue.ValueExists("origination"))
{
m_origination = OriginationMapper::GetOriginationForName(jsonValue.GetString("origination"));
m_originationHasBeenSet = true;
}
if(jsonValue.ValueExists("startoverWindowSeconds"))
{
m_startoverWindowSeconds = jsonValue.GetInteger("startoverWindowSeconds");
m_startoverWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
m_tagsHasBeenSet = true;
}
if(jsonValue.ValueExists("timeDelaySeconds"))
{
m_timeDelaySeconds = jsonValue.GetInteger("timeDelaySeconds");
m_timeDelaySecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
m_urlHasBeenSet = true;
}
if(jsonValue.ValueExists("whitelist"))
{
Array<JsonView> whitelistJsonList = jsonValue.GetArray("whitelist");
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
m_whitelist.push_back(whitelistJsonList[whitelistIndex].AsString());
}
m_whitelistHasBeenSet = true;
}
return *this;
}
JsonValue OriginEndpoint::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_authorizationHasBeenSet)
{
payload.WithObject("authorization", m_authorization.Jsonize());
}
if(m_channelIdHasBeenSet)
{
payload.WithString("channelId", m_channelId);
}
if(m_cmafPackageHasBeenSet)
{
payload.WithObject("cmafPackage", m_cmafPackage.Jsonize());
}
if(m_dashPackageHasBeenSet)
{
payload.WithObject("dashPackage", m_dashPackage.Jsonize());
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_hlsPackageHasBeenSet)
{
payload.WithObject("hlsPackage", m_hlsPackage.Jsonize());
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_manifestNameHasBeenSet)
{
payload.WithString("manifestName", m_manifestName);
}
if(m_mssPackageHasBeenSet)
{
payload.WithObject("mssPackage", m_mssPackage.Jsonize());
}
if(m_originationHasBeenSet)
{
payload.WithString("origination", OriginationMapper::GetNameForOrigination(m_origination));
}
if(m_startoverWindowSecondsHasBeenSet)
{
payload.WithInteger("startoverWindowSeconds", m_startoverWindowSeconds);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
if(m_timeDelaySecondsHasBeenSet)
{
payload.WithInteger("timeDelaySeconds", m_timeDelaySeconds);
}
if(m_urlHasBeenSet)
{
payload.WithString("url", m_url);
}
if(m_whitelistHasBeenSet)
{
Array<JsonValue> whitelistJsonList(m_whitelist.size());
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
whitelistJsonList[whitelistIndex].AsString(m_whitelist[whitelistIndex]);
}
payload.WithArray("whitelist", std::move(whitelistJsonList));
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/Origination.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace OriginationMapper
{
static const int ALLOW_HASH = HashingUtils::HashString("ALLOW");
static const int DENY_HASH = HashingUtils::HashString("DENY");
Origination GetOriginationForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ALLOW_HASH)
{
return Origination::ALLOW;
}
else if (hashCode == DENY_HASH)
{
return Origination::DENY;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Origination>(hashCode);
}
return Origination::NOT_SET;
}
Aws::String GetNameForOrigination(Origination enumValue)
{
switch(enumValue)
{
case Origination::ALLOW:
return "ALLOW";
case Origination::DENY:
return "DENY";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace OriginationMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/PlaylistType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace PlaylistTypeMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int EVENT_HASH = HashingUtils::HashString("EVENT");
static const int VOD_HASH = HashingUtils::HashString("VOD");
PlaylistType GetPlaylistTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return PlaylistType::NONE;
}
else if (hashCode == EVENT_HASH)
{
return PlaylistType::EVENT;
}
else if (hashCode == VOD_HASH)
{
return PlaylistType::VOD;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PlaylistType>(hashCode);
}
return PlaylistType::NOT_SET;
}
Aws::String GetNameForPlaylistType(PlaylistType enumValue)
{
switch(enumValue)
{
case PlaylistType::NONE:
return "NONE";
case PlaylistType::EVENT:
return "EVENT";
case PlaylistType::VOD:
return "VOD";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PlaylistTypeMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/Profile.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace ProfileMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int HBBTV_1_5_HASH = HashingUtils::HashString("HBBTV_1_5");
Profile GetProfileForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return Profile::NONE;
}
else if (hashCode == HBBTV_1_5_HASH)
{
return Profile::HBBTV_1_5;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Profile>(hashCode);
}
return Profile::NOT_SET;
}
Aws::String GetNameForProfile(Profile enumValue)
{
switch(enumValue)
{
case Profile::NONE:
return "NONE";
case Profile::HBBTV_1_5:
return "HBBTV_1_5";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ProfileMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,28 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/RotateIngestEndpointCredentialsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
RotateIngestEndpointCredentialsRequest::RotateIngestEndpointCredentialsRequest() :
m_idHasBeenSet(false),
m_ingestEndpointIdHasBeenSet(false)
{
}
Aws::String RotateIngestEndpointCredentialsRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/RotateIngestEndpointCredentialsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
RotateIngestEndpointCredentialsResult::RotateIngestEndpointCredentialsResult()
{
}
RotateIngestEndpointCredentialsResult::RotateIngestEndpointCredentialsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
RotateIngestEndpointCredentialsResult& RotateIngestEndpointCredentialsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsIngest"))
{
m_hlsIngest = jsonValue.GetObject("hlsIngest");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/S3Destination.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
S3Destination::S3Destination() :
m_bucketNameHasBeenSet(false),
m_manifestKeyHasBeenSet(false),
m_roleArnHasBeenSet(false)
{
}
S3Destination::S3Destination(JsonView jsonValue) :
m_bucketNameHasBeenSet(false),
m_manifestKeyHasBeenSet(false),
m_roleArnHasBeenSet(false)
{
*this = jsonValue;
}
S3Destination& S3Destination::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("bucketName"))
{
m_bucketName = jsonValue.GetString("bucketName");
m_bucketNameHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestKey"))
{
m_manifestKey = jsonValue.GetString("manifestKey");
m_manifestKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("roleArn"))
{
m_roleArn = jsonValue.GetString("roleArn");
m_roleArnHasBeenSet = true;
}
return *this;
}
JsonValue S3Destination::Jsonize() const
{
JsonValue payload;
if(m_bucketNameHasBeenSet)
{
payload.WithString("bucketName", m_bucketName);
}
if(m_manifestKeyHasBeenSet)
{
payload.WithString("manifestKey", m_manifestKey);
}
if(m_roleArnHasBeenSet)
{
payload.WithString("roleArn", m_roleArn);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/SegmentTemplateFormat.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace SegmentTemplateFormatMapper
{
static const int NUMBER_WITH_TIMELINE_HASH = HashingUtils::HashString("NUMBER_WITH_TIMELINE");
static const int TIME_WITH_TIMELINE_HASH = HashingUtils::HashString("TIME_WITH_TIMELINE");
static const int NUMBER_WITH_DURATION_HASH = HashingUtils::HashString("NUMBER_WITH_DURATION");
SegmentTemplateFormat GetSegmentTemplateFormatForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NUMBER_WITH_TIMELINE_HASH)
{
return SegmentTemplateFormat::NUMBER_WITH_TIMELINE;
}
else if (hashCode == TIME_WITH_TIMELINE_HASH)
{
return SegmentTemplateFormat::TIME_WITH_TIMELINE;
}
else if (hashCode == NUMBER_WITH_DURATION_HASH)
{
return SegmentTemplateFormat::NUMBER_WITH_DURATION;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SegmentTemplateFormat>(hashCode);
}
return SegmentTemplateFormat::NOT_SET;
}
Aws::String GetNameForSegmentTemplateFormat(SegmentTemplateFormat enumValue)
{
switch(enumValue)
{
case SegmentTemplateFormat::NUMBER_WITH_TIMELINE:
return "NUMBER_WITH_TIMELINE";
case SegmentTemplateFormat::TIME_WITH_TIMELINE:
return "TIME_WITH_TIMELINE";
case SegmentTemplateFormat::NUMBER_WITH_DURATION:
return "NUMBER_WITH_DURATION";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SegmentTemplateFormatMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,127 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/SpekeKeyProvider.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
SpekeKeyProvider::SpekeKeyProvider() :
m_certificateArnHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_roleArnHasBeenSet(false),
m_systemIdsHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
SpekeKeyProvider::SpekeKeyProvider(JsonView jsonValue) :
m_certificateArnHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_roleArnHasBeenSet(false),
m_systemIdsHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
SpekeKeyProvider& SpekeKeyProvider::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("certificateArn"))
{
m_certificateArn = jsonValue.GetString("certificateArn");
m_certificateArnHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceId"))
{
m_resourceId = jsonValue.GetString("resourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("roleArn"))
{
m_roleArn = jsonValue.GetString("roleArn");
m_roleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("systemIds"))
{
Array<JsonView> systemIdsJsonList = jsonValue.GetArray("systemIds");
for(unsigned systemIdsIndex = 0; systemIdsIndex < systemIdsJsonList.GetLength(); ++systemIdsIndex)
{
m_systemIds.push_back(systemIdsJsonList[systemIdsIndex].AsString());
}
m_systemIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue SpekeKeyProvider::Jsonize() const
{
JsonValue payload;
if(m_certificateArnHasBeenSet)
{
payload.WithString("certificateArn", m_certificateArn);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("resourceId", m_resourceId);
}
if(m_roleArnHasBeenSet)
{
payload.WithString("roleArn", m_roleArn);
}
if(m_systemIdsHasBeenSet)
{
Array<JsonValue> systemIdsJsonList(m_systemIds.size());
for(unsigned systemIdsIndex = 0; systemIdsIndex < systemIdsJsonList.GetLength(); ++systemIdsIndex)
{
systemIdsJsonList[systemIdsIndex].AsString(m_systemIds[systemIdsIndex]);
}
payload.WithArray("systemIds", std::move(systemIdsJsonList));
}
if(m_urlHasBeenSet)
{
payload.WithString("url", m_url);
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/Status.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace StatusMapper
{
static const int IN_PROGRESS_HASH = HashingUtils::HashString("IN_PROGRESS");
static const int SUCCEEDED_HASH = HashingUtils::HashString("SUCCEEDED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
Status GetStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == IN_PROGRESS_HASH)
{
return Status::IN_PROGRESS;
}
else if (hashCode == SUCCEEDED_HASH)
{
return Status::SUCCEEDED;
}
else if (hashCode == FAILED_HASH)
{
return Status::FAILED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Status>(hashCode);
}
return Status::NOT_SET;
}
Aws::String GetNameForStatus(Status enumValue)
{
switch(enumValue)
{
case Status::IN_PROGRESS:
return "IN_PROGRESS";
case Status::SUCCEEDED:
return "SUCCEEDED";
case Status::FAILED:
return "FAILED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StatusMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/StreamOrder.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace StreamOrderMapper
{
static const int ORIGINAL_HASH = HashingUtils::HashString("ORIGINAL");
static const int VIDEO_BITRATE_ASCENDING_HASH = HashingUtils::HashString("VIDEO_BITRATE_ASCENDING");
static const int VIDEO_BITRATE_DESCENDING_HASH = HashingUtils::HashString("VIDEO_BITRATE_DESCENDING");
StreamOrder GetStreamOrderForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ORIGINAL_HASH)
{
return StreamOrder::ORIGINAL;
}
else if (hashCode == VIDEO_BITRATE_ASCENDING_HASH)
{
return StreamOrder::VIDEO_BITRATE_ASCENDING;
}
else if (hashCode == VIDEO_BITRATE_DESCENDING_HASH)
{
return StreamOrder::VIDEO_BITRATE_DESCENDING;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StreamOrder>(hashCode);
}
return StreamOrder::NOT_SET;
}
Aws::String GetNameForStreamOrder(StreamOrder enumValue)
{
switch(enumValue)
{
case StreamOrder::ORIGINAL:
return "ORIGINAL";
case StreamOrder::VIDEO_BITRATE_ASCENDING:
return "VIDEO_BITRATE_ASCENDING";
case StreamOrder::VIDEO_BITRATE_DESCENDING:
return "VIDEO_BITRATE_DESCENDING";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StreamOrderMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,94 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/StreamSelection.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
StreamSelection::StreamSelection() :
m_maxVideoBitsPerSecond(0),
m_maxVideoBitsPerSecondHasBeenSet(false),
m_minVideoBitsPerSecond(0),
m_minVideoBitsPerSecondHasBeenSet(false),
m_streamOrder(StreamOrder::NOT_SET),
m_streamOrderHasBeenSet(false)
{
}
StreamSelection::StreamSelection(JsonView jsonValue) :
m_maxVideoBitsPerSecond(0),
m_maxVideoBitsPerSecondHasBeenSet(false),
m_minVideoBitsPerSecond(0),
m_minVideoBitsPerSecondHasBeenSet(false),
m_streamOrder(StreamOrder::NOT_SET),
m_streamOrderHasBeenSet(false)
{
*this = jsonValue;
}
StreamSelection& StreamSelection::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("maxVideoBitsPerSecond"))
{
m_maxVideoBitsPerSecond = jsonValue.GetInteger("maxVideoBitsPerSecond");
m_maxVideoBitsPerSecondHasBeenSet = true;
}
if(jsonValue.ValueExists("minVideoBitsPerSecond"))
{
m_minVideoBitsPerSecond = jsonValue.GetInteger("minVideoBitsPerSecond");
m_minVideoBitsPerSecondHasBeenSet = true;
}
if(jsonValue.ValueExists("streamOrder"))
{
m_streamOrder = StreamOrderMapper::GetStreamOrderForName(jsonValue.GetString("streamOrder"));
m_streamOrderHasBeenSet = true;
}
return *this;
}
JsonValue StreamSelection::Jsonize() const
{
JsonValue payload;
if(m_maxVideoBitsPerSecondHasBeenSet)
{
payload.WithInteger("maxVideoBitsPerSecond", m_maxVideoBitsPerSecond);
}
if(m_minVideoBitsPerSecondHasBeenSet)
{
payload.WithInteger("minVideoBitsPerSecond", m_minVideoBitsPerSecond);
}
if(m_streamOrderHasBeenSet)
{
payload.WithString("streamOrder", StreamOrderMapper::GetNameForStreamOrder(m_streamOrder));
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
TagResourceRequest::TagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String TagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,45 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/UntagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
UntagResourceRequest::UntagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
return {};
}
void UntagResourceRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_tagKeysHasBeenSet)
{
for(const auto& item : m_tagKeys)
{
ss << item;
uri.AddQueryStringParameter("tagKeys", ss.str());
ss.str("");
}
}
}

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/UpdateChannelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateChannelRequest::UpdateChannelRequest() :
m_descriptionHasBeenSet(false),
m_idHasBeenSet(false)
{
}
Aws::String UpdateChannelRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/UpdateChannelResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateChannelResult::UpdateChannelResult()
{
}
UpdateChannelResult::UpdateChannelResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateChannelResult& UpdateChannelResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsIngest"))
{
m_hlsIngest = jsonValue.GetObject("hlsIngest");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/UpdateOriginEndpointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateOriginEndpointRequest::UpdateOriginEndpointRequest() :
m_authorizationHasBeenSet(false),
m_cmafPackageHasBeenSet(false),
m_dashPackageHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_hlsPackageHasBeenSet(false),
m_idHasBeenSet(false),
m_manifestNameHasBeenSet(false),
m_mssPackageHasBeenSet(false),
m_origination(Origination::NOT_SET),
m_originationHasBeenSet(false),
m_startoverWindowSeconds(0),
m_startoverWindowSecondsHasBeenSet(false),
m_timeDelaySeconds(0),
m_timeDelaySecondsHasBeenSet(false),
m_whitelistHasBeenSet(false)
{
}
Aws::String UpdateOriginEndpointRequest::SerializePayload() const
{
JsonValue payload;
if(m_authorizationHasBeenSet)
{
payload.WithObject("authorization", m_authorization.Jsonize());
}
if(m_cmafPackageHasBeenSet)
{
payload.WithObject("cmafPackage", m_cmafPackage.Jsonize());
}
if(m_dashPackageHasBeenSet)
{
payload.WithObject("dashPackage", m_dashPackage.Jsonize());
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_hlsPackageHasBeenSet)
{
payload.WithObject("hlsPackage", m_hlsPackage.Jsonize());
}
if(m_manifestNameHasBeenSet)
{
payload.WithString("manifestName", m_manifestName);
}
if(m_mssPackageHasBeenSet)
{
payload.WithObject("mssPackage", m_mssPackage.Jsonize());
}
if(m_originationHasBeenSet)
{
payload.WithString("origination", OriginationMapper::GetNameForOrigination(m_origination));
}
if(m_startoverWindowSecondsHasBeenSet)
{
payload.WithInteger("startoverWindowSeconds", m_startoverWindowSeconds);
}
if(m_timeDelaySecondsHasBeenSet)
{
payload.WithInteger("timeDelaySeconds", m_timeDelaySeconds);
}
if(m_whitelistHasBeenSet)
{
Array<JsonValue> whitelistJsonList(m_whitelist.size());
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
whitelistJsonList[whitelistIndex].AsString(m_whitelist[whitelistIndex]);
}
payload.WithArray("whitelist", std::move(whitelistJsonList));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,142 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/UpdateOriginEndpointResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::MediaPackage::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateOriginEndpointResult::UpdateOriginEndpointResult() :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
}
UpdateOriginEndpointResult::UpdateOriginEndpointResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_origination(Origination::NOT_SET),
m_startoverWindowSeconds(0),
m_timeDelaySeconds(0)
{
*this = result;
}
UpdateOriginEndpointResult& UpdateOriginEndpointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
}
if(jsonValue.ValueExists("authorization"))
{
m_authorization = jsonValue.GetObject("authorization");
}
if(jsonValue.ValueExists("channelId"))
{
m_channelId = jsonValue.GetString("channelId");
}
if(jsonValue.ValueExists("cmafPackage"))
{
m_cmafPackage = jsonValue.GetObject("cmafPackage");
}
if(jsonValue.ValueExists("dashPackage"))
{
m_dashPackage = jsonValue.GetObject("dashPackage");
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
}
if(jsonValue.ValueExists("hlsPackage"))
{
m_hlsPackage = jsonValue.GetObject("hlsPackage");
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
}
if(jsonValue.ValueExists("manifestName"))
{
m_manifestName = jsonValue.GetString("manifestName");
}
if(jsonValue.ValueExists("mssPackage"))
{
m_mssPackage = jsonValue.GetObject("mssPackage");
}
if(jsonValue.ValueExists("origination"))
{
m_origination = OriginationMapper::GetOriginationForName(jsonValue.GetString("origination"));
}
if(jsonValue.ValueExists("startoverWindowSeconds"))
{
m_startoverWindowSeconds = jsonValue.GetInteger("startoverWindowSeconds");
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
if(jsonValue.ValueExists("timeDelaySeconds"))
{
m_timeDelaySeconds = jsonValue.GetInteger("timeDelaySeconds");
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
}
if(jsonValue.ValueExists("whitelist"))
{
Array<JsonView> whitelistJsonList = jsonValue.GetArray("whitelist");
for(unsigned whitelistIndex = 0; whitelistIndex < whitelistJsonList.GetLength(); ++whitelistIndex)
{
m_whitelist.push_back(whitelistJsonList[whitelistIndex].AsString());
}
}
return *this;
}

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/__AdTriggersElement.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace __AdTriggersElementMapper
{
static const int SPLICE_INSERT_HASH = HashingUtils::HashString("SPLICE_INSERT");
static const int BREAK_HASH = HashingUtils::HashString("BREAK");
static const int PROVIDER_ADVERTISEMENT_HASH = HashingUtils::HashString("PROVIDER_ADVERTISEMENT");
static const int DISTRIBUTOR_ADVERTISEMENT_HASH = HashingUtils::HashString("DISTRIBUTOR_ADVERTISEMENT");
static const int PROVIDER_PLACEMENT_OPPORTUNITY_HASH = HashingUtils::HashString("PROVIDER_PLACEMENT_OPPORTUNITY");
static const int DISTRIBUTOR_PLACEMENT_OPPORTUNITY_HASH = HashingUtils::HashString("DISTRIBUTOR_PLACEMENT_OPPORTUNITY");
static const int PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY_HASH = HashingUtils::HashString("PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY");
static const int DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY_HASH = HashingUtils::HashString("DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY");
__AdTriggersElement Get__AdTriggersElementForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SPLICE_INSERT_HASH)
{
return __AdTriggersElement::SPLICE_INSERT;
}
else if (hashCode == BREAK_HASH)
{
return __AdTriggersElement::BREAK;
}
else if (hashCode == PROVIDER_ADVERTISEMENT_HASH)
{
return __AdTriggersElement::PROVIDER_ADVERTISEMENT;
}
else if (hashCode == DISTRIBUTOR_ADVERTISEMENT_HASH)
{
return __AdTriggersElement::DISTRIBUTOR_ADVERTISEMENT;
}
else if (hashCode == PROVIDER_PLACEMENT_OPPORTUNITY_HASH)
{
return __AdTriggersElement::PROVIDER_PLACEMENT_OPPORTUNITY;
}
else if (hashCode == DISTRIBUTOR_PLACEMENT_OPPORTUNITY_HASH)
{
return __AdTriggersElement::DISTRIBUTOR_PLACEMENT_OPPORTUNITY;
}
else if (hashCode == PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY_HASH)
{
return __AdTriggersElement::PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY;
}
else if (hashCode == DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY_HASH)
{
return __AdTriggersElement::DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<__AdTriggersElement>(hashCode);
}
return __AdTriggersElement::NOT_SET;
}
Aws::String GetNameFor__AdTriggersElement(__AdTriggersElement enumValue)
{
switch(enumValue)
{
case __AdTriggersElement::SPLICE_INSERT:
return "SPLICE_INSERT";
case __AdTriggersElement::BREAK:
return "BREAK";
case __AdTriggersElement::PROVIDER_ADVERTISEMENT:
return "PROVIDER_ADVERTISEMENT";
case __AdTriggersElement::DISTRIBUTOR_ADVERTISEMENT:
return "DISTRIBUTOR_ADVERTISEMENT";
case __AdTriggersElement::PROVIDER_PLACEMENT_OPPORTUNITY:
return "PROVIDER_PLACEMENT_OPPORTUNITY";
case __AdTriggersElement::DISTRIBUTOR_PLACEMENT_OPPORTUNITY:
return "DISTRIBUTOR_PLACEMENT_OPPORTUNITY";
case __AdTriggersElement::PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY:
return "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY";
case __AdTriggersElement::DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY:
return "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace __AdTriggersElementMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/__PeriodTriggersElement.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
namespace __PeriodTriggersElementMapper
{
static const int ADS_HASH = HashingUtils::HashString("ADS");
__PeriodTriggersElement Get__PeriodTriggersElementForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ADS_HASH)
{
return __PeriodTriggersElement::ADS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<__PeriodTriggersElement>(hashCode);
}
return __PeriodTriggersElement::NOT_SET;
}
Aws::String GetNameFor__PeriodTriggersElement(__PeriodTriggersElement enumValue)
{
switch(enumValue)
{
case __PeriodTriggersElement::ADS:
return "ADS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace __PeriodTriggersElementMapper
} // namespace Model
} // namespace MediaPackage
} // namespace Aws