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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/LightsailEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::Lightsail;
namespace Aws
{
namespace Lightsail
{
namespace LightsailEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "lightsail" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace LightsailEndpoint
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/lightsail/LightsailErrorMarshaller.h>
#include <aws/lightsail/LightsailErrors.h>
using namespace Aws::Client;
using namespace Aws::Lightsail;
AWSError<CoreErrors> LightsailErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = LightsailErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/lightsail/LightsailErrors.h>
#include <aws/lightsail/model/OperationFailureException.h>
#include <aws/lightsail/model/NotFoundException.h>
#include <aws/lightsail/model/AccessDeniedException.h>
#include <aws/lightsail/model/UnauthenticatedException.h>
#include <aws/lightsail/model/InvalidInputException.h>
#include <aws/lightsail/model/ServiceException.h>
#include <aws/lightsail/model/AccountSetupInProgressException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::Lightsail;
using namespace Aws::Lightsail::Model;
namespace Aws
{
namespace Lightsail
{
template<> AWS_LIGHTSAIL_API OperationFailureException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::OPERATION_FAILURE);
return OperationFailureException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API NotFoundException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::NOT_FOUND);
return NotFoundException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API AccessDeniedException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::ACCESS_DENIED);
return AccessDeniedException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API UnauthenticatedException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::UNAUTHENTICATED);
return UnauthenticatedException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API InvalidInputException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::INVALID_INPUT);
return InvalidInputException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API ServiceException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::SERVICE);
return ServiceException(this->GetJsonPayload().View());
}
template<> AWS_LIGHTSAIL_API AccountSetupInProgressException LightsailError::GetModeledError()
{
assert(this->GetErrorType() == LightsailErrors::ACCOUNT_SETUP_IN_PROGRESS);
return AccountSetupInProgressException(this->GetJsonPayload().View());
}
namespace LightsailErrorMapper
{
static const int OPERATION_FAILURE_HASH = HashingUtils::HashString("OperationFailureException");
static const int NOT_FOUND_HASH = HashingUtils::HashString("NotFoundException");
static const int UNAUTHENTICATED_HASH = HashingUtils::HashString("UnauthenticatedException");
static const int INVALID_INPUT_HASH = HashingUtils::HashString("InvalidInputException");
static const int SERVICE_HASH = HashingUtils::HashString("ServiceException");
static const int ACCOUNT_SETUP_IN_PROGRESS_HASH = HashingUtils::HashString("AccountSetupInProgressException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == OPERATION_FAILURE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::OPERATION_FAILURE), false);
}
else if (hashCode == NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::NOT_FOUND), false);
}
else if (hashCode == UNAUTHENTICATED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::UNAUTHENTICATED), false);
}
else if (hashCode == INVALID_INPUT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::INVALID_INPUT), false);
}
else if (hashCode == SERVICE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::SERVICE), false);
}
else if (hashCode == ACCOUNT_SETUP_IN_PROGRESS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LightsailErrors::ACCOUNT_SETUP_IN_PROGRESS), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace LightsailErrorMapper
} // namespace Lightsail
} // 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/lightsail/model/AccessDeniedException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AccessDeniedException::AccessDeniedException() :
m_codeHasBeenSet(false),
m_docsHasBeenSet(false),
m_messageHasBeenSet(false),
m_tipHasBeenSet(false)
{
}
AccessDeniedException::AccessDeniedException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_docsHasBeenSet(false),
m_messageHasBeenSet(false),
m_tipHasBeenSet(false)
{
*this = jsonValue;
}
AccessDeniedException& AccessDeniedException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("code"))
{
m_code = jsonValue.GetString("code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("docs"))
{
m_docs = jsonValue.GetString("docs");
m_docsHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("tip"))
{
m_tip = jsonValue.GetString("tip");
m_tipHasBeenSet = true;
}
return *this;
}
JsonValue AccessDeniedException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("code", m_code);
}
if(m_docsHasBeenSet)
{
payload.WithString("docs", m_docs);
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_tipHasBeenSet)
{
payload.WithString("tip", m_tip);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AccessDirection.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 Lightsail
{
namespace Model
{
namespace AccessDirectionMapper
{
static const int inbound_HASH = HashingUtils::HashString("inbound");
static const int outbound_HASH = HashingUtils::HashString("outbound");
AccessDirection GetAccessDirectionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == inbound_HASH)
{
return AccessDirection::inbound;
}
else if (hashCode == outbound_HASH)
{
return AccessDirection::outbound;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AccessDirection>(hashCode);
}
return AccessDirection::NOT_SET;
}
Aws::String GetNameForAccessDirection(AccessDirection enumValue)
{
switch(enumValue)
{
case AccessDirection::inbound:
return "inbound";
case AccessDirection::outbound:
return "outbound";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AccessDirectionMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AccountSetupInProgressException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AccountSetupInProgressException::AccountSetupInProgressException() :
m_codeHasBeenSet(false),
m_docsHasBeenSet(false),
m_messageHasBeenSet(false),
m_tipHasBeenSet(false)
{
}
AccountSetupInProgressException::AccountSetupInProgressException(JsonView jsonValue) :
m_codeHasBeenSet(false),
m_docsHasBeenSet(false),
m_messageHasBeenSet(false),
m_tipHasBeenSet(false)
{
*this = jsonValue;
}
AccountSetupInProgressException& AccountSetupInProgressException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("code"))
{
m_code = jsonValue.GetString("code");
m_codeHasBeenSet = true;
}
if(jsonValue.ValueExists("docs"))
{
m_docs = jsonValue.GetString("docs");
m_docsHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("tip"))
{
m_tip = jsonValue.GetString("tip");
m_tipHasBeenSet = true;
}
return *this;
}
JsonValue AccountSetupInProgressException::Jsonize() const
{
JsonValue payload;
if(m_codeHasBeenSet)
{
payload.WithString("code", m_code);
}
if(m_docsHasBeenSet)
{
payload.WithString("docs", m_docs);
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_tipHasBeenSet)
{
payload.WithString("tip", m_tip);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AddOn.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AddOn::AddOn() :
m_nameHasBeenSet(false),
m_statusHasBeenSet(false),
m_snapshotTimeOfDayHasBeenSet(false),
m_nextSnapshotTimeOfDayHasBeenSet(false)
{
}
AddOn::AddOn(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_statusHasBeenSet(false),
m_snapshotTimeOfDayHasBeenSet(false),
m_nextSnapshotTimeOfDayHasBeenSet(false)
{
*this = jsonValue;
}
AddOn& AddOn::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetString("status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("snapshotTimeOfDay"))
{
m_snapshotTimeOfDay = jsonValue.GetString("snapshotTimeOfDay");
m_snapshotTimeOfDayHasBeenSet = true;
}
if(jsonValue.ValueExists("nextSnapshotTimeOfDay"))
{
m_nextSnapshotTimeOfDay = jsonValue.GetString("nextSnapshotTimeOfDay");
m_nextSnapshotTimeOfDayHasBeenSet = true;
}
return *this;
}
JsonValue AddOn::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", m_status);
}
if(m_snapshotTimeOfDayHasBeenSet)
{
payload.WithString("snapshotTimeOfDay", m_snapshotTimeOfDay);
}
if(m_nextSnapshotTimeOfDayHasBeenSet)
{
payload.WithString("nextSnapshotTimeOfDay", m_nextSnapshotTimeOfDay);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AddOnRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AddOnRequest::AddOnRequest() :
m_addOnType(AddOnType::NOT_SET),
m_addOnTypeHasBeenSet(false),
m_autoSnapshotAddOnRequestHasBeenSet(false)
{
}
AddOnRequest::AddOnRequest(JsonView jsonValue) :
m_addOnType(AddOnType::NOT_SET),
m_addOnTypeHasBeenSet(false),
m_autoSnapshotAddOnRequestHasBeenSet(false)
{
*this = jsonValue;
}
AddOnRequest& AddOnRequest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("addOnType"))
{
m_addOnType = AddOnTypeMapper::GetAddOnTypeForName(jsonValue.GetString("addOnType"));
m_addOnTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("autoSnapshotAddOnRequest"))
{
m_autoSnapshotAddOnRequest = jsonValue.GetObject("autoSnapshotAddOnRequest");
m_autoSnapshotAddOnRequestHasBeenSet = true;
}
return *this;
}
JsonValue AddOnRequest::Jsonize() const
{
JsonValue payload;
if(m_addOnTypeHasBeenSet)
{
payload.WithString("addOnType", AddOnTypeMapper::GetNameForAddOnType(m_addOnType));
}
if(m_autoSnapshotAddOnRequestHasBeenSet)
{
payload.WithObject("autoSnapshotAddOnRequest", m_autoSnapshotAddOnRequest.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AddOnType.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 Lightsail
{
namespace Model
{
namespace AddOnTypeMapper
{
static const int AutoSnapshot_HASH = HashingUtils::HashString("AutoSnapshot");
AddOnType GetAddOnTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == AutoSnapshot_HASH)
{
return AddOnType::AutoSnapshot;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AddOnType>(hashCode);
}
return AddOnType::NOT_SET;
}
Aws::String GetNameForAddOnType(AddOnType enumValue)
{
switch(enumValue)
{
case AddOnType::AutoSnapshot:
return "AutoSnapshot";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AddOnTypeMapper
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,376 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/Alarm.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
Alarm::Alarm() :
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_supportCodeHasBeenSet(false),
m_monitoredResourceInfoHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_evaluationPeriods(0),
m_evaluationPeriodsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_threshold(0.0),
m_thresholdHasBeenSet(false),
m_datapointsToAlarm(0),
m_datapointsToAlarmHasBeenSet(false),
m_treatMissingData(TreatMissingData::NOT_SET),
m_treatMissingDataHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_metricName(MetricName::NOT_SET),
m_metricNameHasBeenSet(false),
m_state(AlarmState::NOT_SET),
m_stateHasBeenSet(false),
m_unit(MetricUnit::NOT_SET),
m_unitHasBeenSet(false),
m_contactProtocolsHasBeenSet(false),
m_notificationTriggersHasBeenSet(false),
m_notificationEnabled(false),
m_notificationEnabledHasBeenSet(false)
{
}
Alarm::Alarm(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_supportCodeHasBeenSet(false),
m_monitoredResourceInfoHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_evaluationPeriods(0),
m_evaluationPeriodsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_threshold(0.0),
m_thresholdHasBeenSet(false),
m_datapointsToAlarm(0),
m_datapointsToAlarmHasBeenSet(false),
m_treatMissingData(TreatMissingData::NOT_SET),
m_treatMissingDataHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_metricName(MetricName::NOT_SET),
m_metricNameHasBeenSet(false),
m_state(AlarmState::NOT_SET),
m_stateHasBeenSet(false),
m_unit(MetricUnit::NOT_SET),
m_unitHasBeenSet(false),
m_contactProtocolsHasBeenSet(false),
m_notificationTriggersHasBeenSet(false),
m_notificationEnabled(false),
m_notificationEnabledHasBeenSet(false)
{
*this = jsonValue;
}
Alarm& Alarm::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("location"))
{
m_location = jsonValue.GetObject("location");
m_locationHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("supportCode"))
{
m_supportCode = jsonValue.GetString("supportCode");
m_supportCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("monitoredResourceInfo"))
{
m_monitoredResourceInfo = jsonValue.GetObject("monitoredResourceInfo");
m_monitoredResourceInfoHasBeenSet = true;
}
if(jsonValue.ValueExists("comparisonOperator"))
{
m_comparisonOperator = ComparisonOperatorMapper::GetComparisonOperatorForName(jsonValue.GetString("comparisonOperator"));
m_comparisonOperatorHasBeenSet = true;
}
if(jsonValue.ValueExists("evaluationPeriods"))
{
m_evaluationPeriods = jsonValue.GetInteger("evaluationPeriods");
m_evaluationPeriodsHasBeenSet = true;
}
if(jsonValue.ValueExists("period"))
{
m_period = jsonValue.GetInteger("period");
m_periodHasBeenSet = true;
}
if(jsonValue.ValueExists("threshold"))
{
m_threshold = jsonValue.GetDouble("threshold");
m_thresholdHasBeenSet = true;
}
if(jsonValue.ValueExists("datapointsToAlarm"))
{
m_datapointsToAlarm = jsonValue.GetInteger("datapointsToAlarm");
m_datapointsToAlarmHasBeenSet = true;
}
if(jsonValue.ValueExists("treatMissingData"))
{
m_treatMissingData = TreatMissingDataMapper::GetTreatMissingDataForName(jsonValue.GetString("treatMissingData"));
m_treatMissingDataHasBeenSet = true;
}
if(jsonValue.ValueExists("statistic"))
{
m_statistic = MetricStatisticMapper::GetMetricStatisticForName(jsonValue.GetString("statistic"));
m_statisticHasBeenSet = true;
}
if(jsonValue.ValueExists("metricName"))
{
m_metricName = MetricNameMapper::GetMetricNameForName(jsonValue.GetString("metricName"));
m_metricNameHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = AlarmStateMapper::GetAlarmStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("unit"))
{
m_unit = MetricUnitMapper::GetMetricUnitForName(jsonValue.GetString("unit"));
m_unitHasBeenSet = true;
}
if(jsonValue.ValueExists("contactProtocols"))
{
Array<JsonView> contactProtocolsJsonList = jsonValue.GetArray("contactProtocols");
for(unsigned contactProtocolsIndex = 0; contactProtocolsIndex < contactProtocolsJsonList.GetLength(); ++contactProtocolsIndex)
{
m_contactProtocols.push_back(ContactProtocolMapper::GetContactProtocolForName(contactProtocolsJsonList[contactProtocolsIndex].AsString()));
}
m_contactProtocolsHasBeenSet = true;
}
if(jsonValue.ValueExists("notificationTriggers"))
{
Array<JsonView> notificationTriggersJsonList = jsonValue.GetArray("notificationTriggers");
for(unsigned notificationTriggersIndex = 0; notificationTriggersIndex < notificationTriggersJsonList.GetLength(); ++notificationTriggersIndex)
{
m_notificationTriggers.push_back(AlarmStateMapper::GetAlarmStateForName(notificationTriggersJsonList[notificationTriggersIndex].AsString()));
}
m_notificationTriggersHasBeenSet = true;
}
if(jsonValue.ValueExists("notificationEnabled"))
{
m_notificationEnabled = jsonValue.GetBool("notificationEnabled");
m_notificationEnabledHasBeenSet = true;
}
return *this;
}
JsonValue Alarm::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_supportCodeHasBeenSet)
{
payload.WithString("supportCode", m_supportCode);
}
if(m_monitoredResourceInfoHasBeenSet)
{
payload.WithObject("monitoredResourceInfo", m_monitoredResourceInfo.Jsonize());
}
if(m_comparisonOperatorHasBeenSet)
{
payload.WithString("comparisonOperator", ComparisonOperatorMapper::GetNameForComparisonOperator(m_comparisonOperator));
}
if(m_evaluationPeriodsHasBeenSet)
{
payload.WithInteger("evaluationPeriods", m_evaluationPeriods);
}
if(m_periodHasBeenSet)
{
payload.WithInteger("period", m_period);
}
if(m_thresholdHasBeenSet)
{
payload.WithDouble("threshold", m_threshold);
}
if(m_datapointsToAlarmHasBeenSet)
{
payload.WithInteger("datapointsToAlarm", m_datapointsToAlarm);
}
if(m_treatMissingDataHasBeenSet)
{
payload.WithString("treatMissingData", TreatMissingDataMapper::GetNameForTreatMissingData(m_treatMissingData));
}
if(m_statisticHasBeenSet)
{
payload.WithString("statistic", MetricStatisticMapper::GetNameForMetricStatistic(m_statistic));
}
if(m_metricNameHasBeenSet)
{
payload.WithString("metricName", MetricNameMapper::GetNameForMetricName(m_metricName));
}
if(m_stateHasBeenSet)
{
payload.WithString("state", AlarmStateMapper::GetNameForAlarmState(m_state));
}
if(m_unitHasBeenSet)
{
payload.WithString("unit", MetricUnitMapper::GetNameForMetricUnit(m_unit));
}
if(m_contactProtocolsHasBeenSet)
{
Array<JsonValue> contactProtocolsJsonList(m_contactProtocols.size());
for(unsigned contactProtocolsIndex = 0; contactProtocolsIndex < contactProtocolsJsonList.GetLength(); ++contactProtocolsIndex)
{
contactProtocolsJsonList[contactProtocolsIndex].AsString(ContactProtocolMapper::GetNameForContactProtocol(m_contactProtocols[contactProtocolsIndex]));
}
payload.WithArray("contactProtocols", std::move(contactProtocolsJsonList));
}
if(m_notificationTriggersHasBeenSet)
{
Array<JsonValue> notificationTriggersJsonList(m_notificationTriggers.size());
for(unsigned notificationTriggersIndex = 0; notificationTriggersIndex < notificationTriggersJsonList.GetLength(); ++notificationTriggersIndex)
{
notificationTriggersJsonList[notificationTriggersIndex].AsString(AlarmStateMapper::GetNameForAlarmState(m_notificationTriggers[notificationTriggersIndex]));
}
payload.WithArray("notificationTriggers", std::move(notificationTriggersJsonList));
}
if(m_notificationEnabledHasBeenSet)
{
payload.WithBool("notificationEnabled", m_notificationEnabled);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AlarmState.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 Lightsail
{
namespace Model
{
namespace AlarmStateMapper
{
static const int OK_HASH = HashingUtils::HashString("OK");
static const int ALARM_HASH = HashingUtils::HashString("ALARM");
static const int INSUFFICIENT_DATA_HASH = HashingUtils::HashString("INSUFFICIENT_DATA");
AlarmState GetAlarmStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == OK_HASH)
{
return AlarmState::OK;
}
else if (hashCode == ALARM_HASH)
{
return AlarmState::ALARM;
}
else if (hashCode == INSUFFICIENT_DATA_HASH)
{
return AlarmState::INSUFFICIENT_DATA;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AlarmState>(hashCode);
}
return AlarmState::NOT_SET;
}
Aws::String GetNameForAlarmState(AlarmState enumValue)
{
switch(enumValue)
{
case AlarmState::OK:
return "OK";
case AlarmState::ALARM:
return "ALARM";
case AlarmState::INSUFFICIENT_DATA:
return "INSUFFICIENT_DATA";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AlarmStateMapper
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AllocateStaticIpRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AllocateStaticIpRequest::AllocateStaticIpRequest() :
m_staticIpNameHasBeenSet(false)
{
}
Aws::String AllocateStaticIpRequest::SerializePayload() const
{
JsonValue payload;
if(m_staticIpNameHasBeenSet)
{
payload.WithString("staticIpName", m_staticIpName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AllocateStaticIpRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AllocateStaticIp"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AllocateStaticIpResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AllocateStaticIpResult::AllocateStaticIpResult()
{
}
AllocateStaticIpResult::AllocateStaticIpResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AllocateStaticIpResult& AllocateStaticIpResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachCertificateToDistributionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AttachCertificateToDistributionRequest::AttachCertificateToDistributionRequest() :
m_distributionNameHasBeenSet(false),
m_certificateNameHasBeenSet(false)
{
}
Aws::String AttachCertificateToDistributionRequest::SerializePayload() const
{
JsonValue payload;
if(m_distributionNameHasBeenSet)
{
payload.WithString("distributionName", m_distributionName);
}
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AttachCertificateToDistributionRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AttachCertificateToDistribution"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachCertificateToDistributionResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AttachCertificateToDistributionResult::AttachCertificateToDistributionResult()
{
}
AttachCertificateToDistributionResult::AttachCertificateToDistributionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AttachCertificateToDistributionResult& AttachCertificateToDistributionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachDiskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AttachDiskRequest::AttachDiskRequest() :
m_diskNameHasBeenSet(false),
m_instanceNameHasBeenSet(false),
m_diskPathHasBeenSet(false)
{
}
Aws::String AttachDiskRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskNameHasBeenSet)
{
payload.WithString("diskName", m_diskName);
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("instanceName", m_instanceName);
}
if(m_diskPathHasBeenSet)
{
payload.WithString("diskPath", m_diskPath);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AttachDiskRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AttachDisk"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachDiskResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AttachDiskResult::AttachDiskResult()
{
}
AttachDiskResult::AttachDiskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AttachDiskResult& AttachDiskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachInstancesToLoadBalancerRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AttachInstancesToLoadBalancerRequest::AttachInstancesToLoadBalancerRequest() :
m_loadBalancerNameHasBeenSet(false),
m_instanceNamesHasBeenSet(false)
{
}
Aws::String AttachInstancesToLoadBalancerRequest::SerializePayload() const
{
JsonValue payload;
if(m_loadBalancerNameHasBeenSet)
{
payload.WithString("loadBalancerName", m_loadBalancerName);
}
if(m_instanceNamesHasBeenSet)
{
Array<JsonValue> instanceNamesJsonList(m_instanceNames.size());
for(unsigned instanceNamesIndex = 0; instanceNamesIndex < instanceNamesJsonList.GetLength(); ++instanceNamesIndex)
{
instanceNamesJsonList[instanceNamesIndex].AsString(m_instanceNames[instanceNamesIndex]);
}
payload.WithArray("instanceNames", std::move(instanceNamesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AttachInstancesToLoadBalancerRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AttachInstancesToLoadBalancer"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachInstancesToLoadBalancerResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AttachInstancesToLoadBalancerResult::AttachInstancesToLoadBalancerResult()
{
}
AttachInstancesToLoadBalancerResult::AttachInstancesToLoadBalancerResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AttachInstancesToLoadBalancerResult& AttachInstancesToLoadBalancerResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachLoadBalancerTlsCertificateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AttachLoadBalancerTlsCertificateRequest::AttachLoadBalancerTlsCertificateRequest() :
m_loadBalancerNameHasBeenSet(false),
m_certificateNameHasBeenSet(false)
{
}
Aws::String AttachLoadBalancerTlsCertificateRequest::SerializePayload() const
{
JsonValue payload;
if(m_loadBalancerNameHasBeenSet)
{
payload.WithString("loadBalancerName", m_loadBalancerName);
}
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AttachLoadBalancerTlsCertificateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AttachLoadBalancerTlsCertificate"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachLoadBalancerTlsCertificateResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AttachLoadBalancerTlsCertificateResult::AttachLoadBalancerTlsCertificateResult()
{
}
AttachLoadBalancerTlsCertificateResult::AttachLoadBalancerTlsCertificateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AttachLoadBalancerTlsCertificateResult& AttachLoadBalancerTlsCertificateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachStaticIpRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AttachStaticIpRequest::AttachStaticIpRequest() :
m_staticIpNameHasBeenSet(false),
m_instanceNameHasBeenSet(false)
{
}
Aws::String AttachStaticIpRequest::SerializePayload() const
{
JsonValue payload;
if(m_staticIpNameHasBeenSet)
{
payload.WithString("staticIpName", m_staticIpName);
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("instanceName", m_instanceName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AttachStaticIpRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.AttachStaticIp"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AttachStaticIpResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AttachStaticIpResult::AttachStaticIpResult()
{
}
AttachStaticIpResult::AttachStaticIpResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AttachStaticIpResult& AttachStaticIpResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
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/lightsail/model/AttachedDisk.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AttachedDisk::AttachedDisk() :
m_pathHasBeenSet(false),
m_sizeInGb(0),
m_sizeInGbHasBeenSet(false)
{
}
AttachedDisk::AttachedDisk(JsonView jsonValue) :
m_pathHasBeenSet(false),
m_sizeInGb(0),
m_sizeInGbHasBeenSet(false)
{
*this = jsonValue;
}
AttachedDisk& AttachedDisk::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("path"))
{
m_path = jsonValue.GetString("path");
m_pathHasBeenSet = true;
}
if(jsonValue.ValueExists("sizeInGb"))
{
m_sizeInGb = jsonValue.GetInteger("sizeInGb");
m_sizeInGbHasBeenSet = true;
}
return *this;
}
JsonValue AttachedDisk::Jsonize() const
{
JsonValue payload;
if(m_pathHasBeenSet)
{
payload.WithString("path", m_path);
}
if(m_sizeInGbHasBeenSet)
{
payload.WithInteger("sizeInGb", m_sizeInGb);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AutoSnapshotAddOnRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AutoSnapshotAddOnRequest::AutoSnapshotAddOnRequest() :
m_snapshotTimeOfDayHasBeenSet(false)
{
}
AutoSnapshotAddOnRequest::AutoSnapshotAddOnRequest(JsonView jsonValue) :
m_snapshotTimeOfDayHasBeenSet(false)
{
*this = jsonValue;
}
AutoSnapshotAddOnRequest& AutoSnapshotAddOnRequest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("snapshotTimeOfDay"))
{
m_snapshotTimeOfDay = jsonValue.GetString("snapshotTimeOfDay");
m_snapshotTimeOfDayHasBeenSet = true;
}
return *this;
}
JsonValue AutoSnapshotAddOnRequest::Jsonize() const
{
JsonValue payload;
if(m_snapshotTimeOfDayHasBeenSet)
{
payload.WithString("snapshotTimeOfDay", m_snapshotTimeOfDay);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/AutoSnapshotDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AutoSnapshotDetails::AutoSnapshotDetails() :
m_dateHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_status(AutoSnapshotStatus::NOT_SET),
m_statusHasBeenSet(false),
m_fromAttachedDisksHasBeenSet(false)
{
}
AutoSnapshotDetails::AutoSnapshotDetails(JsonView jsonValue) :
m_dateHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_status(AutoSnapshotStatus::NOT_SET),
m_statusHasBeenSet(false),
m_fromAttachedDisksHasBeenSet(false)
{
*this = jsonValue;
}
AutoSnapshotDetails& AutoSnapshotDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("date"))
{
m_date = jsonValue.GetString("date");
m_dateHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = AutoSnapshotStatusMapper::GetAutoSnapshotStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("fromAttachedDisks"))
{
Array<JsonView> fromAttachedDisksJsonList = jsonValue.GetArray("fromAttachedDisks");
for(unsigned fromAttachedDisksIndex = 0; fromAttachedDisksIndex < fromAttachedDisksJsonList.GetLength(); ++fromAttachedDisksIndex)
{
m_fromAttachedDisks.push_back(fromAttachedDisksJsonList[fromAttachedDisksIndex].AsObject());
}
m_fromAttachedDisksHasBeenSet = true;
}
return *this;
}
JsonValue AutoSnapshotDetails::Jsonize() const
{
JsonValue payload;
if(m_dateHasBeenSet)
{
payload.WithString("date", m_date);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_statusHasBeenSet)
{
payload.WithString("status", AutoSnapshotStatusMapper::GetNameForAutoSnapshotStatus(m_status));
}
if(m_fromAttachedDisksHasBeenSet)
{
Array<JsonValue> fromAttachedDisksJsonList(m_fromAttachedDisks.size());
for(unsigned fromAttachedDisksIndex = 0; fromAttachedDisksIndex < fromAttachedDisksJsonList.GetLength(); ++fromAttachedDisksIndex)
{
fromAttachedDisksJsonList[fromAttachedDisksIndex].AsObject(m_fromAttachedDisks[fromAttachedDisksIndex].Jsonize());
}
payload.WithArray("fromAttachedDisks", std::move(fromAttachedDisksJsonList));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AutoSnapshotStatus.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 Lightsail
{
namespace Model
{
namespace AutoSnapshotStatusMapper
{
static const int Success_HASH = HashingUtils::HashString("Success");
static const int Failed_HASH = HashingUtils::HashString("Failed");
static const int InProgress_HASH = HashingUtils::HashString("InProgress");
static const int NotFound_HASH = HashingUtils::HashString("NotFound");
AutoSnapshotStatus GetAutoSnapshotStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Success_HASH)
{
return AutoSnapshotStatus::Success;
}
else if (hashCode == Failed_HASH)
{
return AutoSnapshotStatus::Failed;
}
else if (hashCode == InProgress_HASH)
{
return AutoSnapshotStatus::InProgress;
}
else if (hashCode == NotFound_HASH)
{
return AutoSnapshotStatus::NotFound;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AutoSnapshotStatus>(hashCode);
}
return AutoSnapshotStatus::NOT_SET;
}
Aws::String GetNameForAutoSnapshotStatus(AutoSnapshotStatus enumValue)
{
switch(enumValue)
{
case AutoSnapshotStatus::Success:
return "Success";
case AutoSnapshotStatus::Failed:
return "Failed";
case AutoSnapshotStatus::InProgress:
return "InProgress";
case AutoSnapshotStatus::NotFound:
return "NotFound";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AutoSnapshotStatusMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/AvailabilityZone.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
AvailabilityZone::AvailabilityZone() :
m_zoneNameHasBeenSet(false),
m_stateHasBeenSet(false)
{
}
AvailabilityZone::AvailabilityZone(JsonView jsonValue) :
m_zoneNameHasBeenSet(false),
m_stateHasBeenSet(false)
{
*this = jsonValue;
}
AvailabilityZone& AvailabilityZone::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("zoneName"))
{
m_zoneName = jsonValue.GetString("zoneName");
m_zoneNameHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = jsonValue.GetString("state");
m_stateHasBeenSet = true;
}
return *this;
}
JsonValue AvailabilityZone::Jsonize() const
{
JsonValue payload;
if(m_zoneNameHasBeenSet)
{
payload.WithString("zoneName", m_zoneName);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", m_state);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/BehaviorEnum.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 Lightsail
{
namespace Model
{
namespace BehaviorEnumMapper
{
static const int dont_cache_HASH = HashingUtils::HashString("dont-cache");
static const int cache_HASH = HashingUtils::HashString("cache");
BehaviorEnum GetBehaviorEnumForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == dont_cache_HASH)
{
return BehaviorEnum::dont_cache;
}
else if (hashCode == cache_HASH)
{
return BehaviorEnum::cache;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<BehaviorEnum>(hashCode);
}
return BehaviorEnum::NOT_SET;
}
Aws::String GetNameForBehaviorEnum(BehaviorEnum enumValue)
{
switch(enumValue)
{
case BehaviorEnum::dont_cache:
return "dont-cache";
case BehaviorEnum::cache:
return "cache";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace BehaviorEnumMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/Blueprint.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
Blueprint::Blueprint() :
m_blueprintIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_groupHasBeenSet(false),
m_type(BlueprintType::NOT_SET),
m_typeHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_isActive(false),
m_isActiveHasBeenSet(false),
m_minPower(0),
m_minPowerHasBeenSet(false),
m_versionHasBeenSet(false),
m_versionCodeHasBeenSet(false),
m_productUrlHasBeenSet(false),
m_licenseUrlHasBeenSet(false),
m_platform(InstancePlatform::NOT_SET),
m_platformHasBeenSet(false)
{
}
Blueprint::Blueprint(JsonView jsonValue) :
m_blueprintIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_groupHasBeenSet(false),
m_type(BlueprintType::NOT_SET),
m_typeHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_isActive(false),
m_isActiveHasBeenSet(false),
m_minPower(0),
m_minPowerHasBeenSet(false),
m_versionHasBeenSet(false),
m_versionCodeHasBeenSet(false),
m_productUrlHasBeenSet(false),
m_licenseUrlHasBeenSet(false),
m_platform(InstancePlatform::NOT_SET),
m_platformHasBeenSet(false)
{
*this = jsonValue;
}
Blueprint& Blueprint::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("blueprintId"))
{
m_blueprintId = jsonValue.GetString("blueprintId");
m_blueprintIdHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("group"))
{
m_group = jsonValue.GetString("group");
m_groupHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = BlueprintTypeMapper::GetBlueprintTypeForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("isActive"))
{
m_isActive = jsonValue.GetBool("isActive");
m_isActiveHasBeenSet = true;
}
if(jsonValue.ValueExists("minPower"))
{
m_minPower = jsonValue.GetInteger("minPower");
m_minPowerHasBeenSet = true;
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
m_versionHasBeenSet = true;
}
if(jsonValue.ValueExists("versionCode"))
{
m_versionCode = jsonValue.GetString("versionCode");
m_versionCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("productUrl"))
{
m_productUrl = jsonValue.GetString("productUrl");
m_productUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("licenseUrl"))
{
m_licenseUrl = jsonValue.GetString("licenseUrl");
m_licenseUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("platform"))
{
m_platform = InstancePlatformMapper::GetInstancePlatformForName(jsonValue.GetString("platform"));
m_platformHasBeenSet = true;
}
return *this;
}
JsonValue Blueprint::Jsonize() const
{
JsonValue payload;
if(m_blueprintIdHasBeenSet)
{
payload.WithString("blueprintId", m_blueprintId);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_groupHasBeenSet)
{
payload.WithString("group", m_group);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", BlueprintTypeMapper::GetNameForBlueprintType(m_type));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_isActiveHasBeenSet)
{
payload.WithBool("isActive", m_isActive);
}
if(m_minPowerHasBeenSet)
{
payload.WithInteger("minPower", m_minPower);
}
if(m_versionHasBeenSet)
{
payload.WithString("version", m_version);
}
if(m_versionCodeHasBeenSet)
{
payload.WithString("versionCode", m_versionCode);
}
if(m_productUrlHasBeenSet)
{
payload.WithString("productUrl", m_productUrl);
}
if(m_licenseUrlHasBeenSet)
{
payload.WithString("licenseUrl", m_licenseUrl);
}
if(m_platformHasBeenSet)
{
payload.WithString("platform", InstancePlatformMapper::GetNameForInstancePlatform(m_platform));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/BlueprintType.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 Lightsail
{
namespace Model
{
namespace BlueprintTypeMapper
{
static const int os_HASH = HashingUtils::HashString("os");
static const int app_HASH = HashingUtils::HashString("app");
BlueprintType GetBlueprintTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == os_HASH)
{
return BlueprintType::os;
}
else if (hashCode == app_HASH)
{
return BlueprintType::app;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<BlueprintType>(hashCode);
}
return BlueprintType::NOT_SET;
}
Aws::String GetNameForBlueprintType(BlueprintType enumValue)
{
switch(enumValue)
{
case BlueprintType::os:
return "os";
case BlueprintType::app:
return "app";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace BlueprintTypeMapper
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,231 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/Bundle.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
Bundle::Bundle() :
m_price(0.0),
m_priceHasBeenSet(false),
m_cpuCount(0),
m_cpuCountHasBeenSet(false),
m_diskSizeInGb(0),
m_diskSizeInGbHasBeenSet(false),
m_bundleIdHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_isActive(false),
m_isActiveHasBeenSet(false),
m_nameHasBeenSet(false),
m_power(0),
m_powerHasBeenSet(false),
m_ramSizeInGb(0.0),
m_ramSizeInGbHasBeenSet(false),
m_transferPerMonthInGb(0),
m_transferPerMonthInGbHasBeenSet(false),
m_supportedPlatformsHasBeenSet(false)
{
}
Bundle::Bundle(JsonView jsonValue) :
m_price(0.0),
m_priceHasBeenSet(false),
m_cpuCount(0),
m_cpuCountHasBeenSet(false),
m_diskSizeInGb(0),
m_diskSizeInGbHasBeenSet(false),
m_bundleIdHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_isActive(false),
m_isActiveHasBeenSet(false),
m_nameHasBeenSet(false),
m_power(0),
m_powerHasBeenSet(false),
m_ramSizeInGb(0.0),
m_ramSizeInGbHasBeenSet(false),
m_transferPerMonthInGb(0),
m_transferPerMonthInGbHasBeenSet(false),
m_supportedPlatformsHasBeenSet(false)
{
*this = jsonValue;
}
Bundle& Bundle::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("price"))
{
m_price = jsonValue.GetDouble("price");
m_priceHasBeenSet = true;
}
if(jsonValue.ValueExists("cpuCount"))
{
m_cpuCount = jsonValue.GetInteger("cpuCount");
m_cpuCountHasBeenSet = true;
}
if(jsonValue.ValueExists("diskSizeInGb"))
{
m_diskSizeInGb = jsonValue.GetInteger("diskSizeInGb");
m_diskSizeInGbHasBeenSet = true;
}
if(jsonValue.ValueExists("bundleId"))
{
m_bundleId = jsonValue.GetString("bundleId");
m_bundleIdHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceType"))
{
m_instanceType = jsonValue.GetString("instanceType");
m_instanceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("isActive"))
{
m_isActive = jsonValue.GetBool("isActive");
m_isActiveHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("power"))
{
m_power = jsonValue.GetInteger("power");
m_powerHasBeenSet = true;
}
if(jsonValue.ValueExists("ramSizeInGb"))
{
m_ramSizeInGb = jsonValue.GetDouble("ramSizeInGb");
m_ramSizeInGbHasBeenSet = true;
}
if(jsonValue.ValueExists("transferPerMonthInGb"))
{
m_transferPerMonthInGb = jsonValue.GetInteger("transferPerMonthInGb");
m_transferPerMonthInGbHasBeenSet = true;
}
if(jsonValue.ValueExists("supportedPlatforms"))
{
Array<JsonView> supportedPlatformsJsonList = jsonValue.GetArray("supportedPlatforms");
for(unsigned supportedPlatformsIndex = 0; supportedPlatformsIndex < supportedPlatformsJsonList.GetLength(); ++supportedPlatformsIndex)
{
m_supportedPlatforms.push_back(InstancePlatformMapper::GetInstancePlatformForName(supportedPlatformsJsonList[supportedPlatformsIndex].AsString()));
}
m_supportedPlatformsHasBeenSet = true;
}
return *this;
}
JsonValue Bundle::Jsonize() const
{
JsonValue payload;
if(m_priceHasBeenSet)
{
payload.WithDouble("price", m_price);
}
if(m_cpuCountHasBeenSet)
{
payload.WithInteger("cpuCount", m_cpuCount);
}
if(m_diskSizeInGbHasBeenSet)
{
payload.WithInteger("diskSizeInGb", m_diskSizeInGb);
}
if(m_bundleIdHasBeenSet)
{
payload.WithString("bundleId", m_bundleId);
}
if(m_instanceTypeHasBeenSet)
{
payload.WithString("instanceType", m_instanceType);
}
if(m_isActiveHasBeenSet)
{
payload.WithBool("isActive", m_isActive);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_powerHasBeenSet)
{
payload.WithInteger("power", m_power);
}
if(m_ramSizeInGbHasBeenSet)
{
payload.WithDouble("ramSizeInGb", m_ramSizeInGb);
}
if(m_transferPerMonthInGbHasBeenSet)
{
payload.WithInteger("transferPerMonthInGb", m_transferPerMonthInGb);
}
if(m_supportedPlatformsHasBeenSet)
{
Array<JsonValue> supportedPlatformsJsonList(m_supportedPlatforms.size());
for(unsigned supportedPlatformsIndex = 0; supportedPlatformsIndex < supportedPlatformsJsonList.GetLength(); ++supportedPlatformsIndex)
{
supportedPlatformsJsonList[supportedPlatformsIndex].AsString(InstancePlatformMapper::GetNameForInstancePlatform(m_supportedPlatforms[supportedPlatformsIndex]));
}
payload.WithArray("supportedPlatforms", std::move(supportedPlatformsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CacheBehavior.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CacheBehavior::CacheBehavior() :
m_behavior(BehaviorEnum::NOT_SET),
m_behaviorHasBeenSet(false)
{
}
CacheBehavior::CacheBehavior(JsonView jsonValue) :
m_behavior(BehaviorEnum::NOT_SET),
m_behaviorHasBeenSet(false)
{
*this = jsonValue;
}
CacheBehavior& CacheBehavior::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("behavior"))
{
m_behavior = BehaviorEnumMapper::GetBehaviorEnumForName(jsonValue.GetString("behavior"));
m_behaviorHasBeenSet = true;
}
return *this;
}
JsonValue CacheBehavior::Jsonize() const
{
JsonValue payload;
if(m_behaviorHasBeenSet)
{
payload.WithString("behavior", BehaviorEnumMapper::GetNameForBehaviorEnum(m_behavior));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CacheBehaviorPerPath.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CacheBehaviorPerPath::CacheBehaviorPerPath() :
m_pathHasBeenSet(false),
m_behavior(BehaviorEnum::NOT_SET),
m_behaviorHasBeenSet(false)
{
}
CacheBehaviorPerPath::CacheBehaviorPerPath(JsonView jsonValue) :
m_pathHasBeenSet(false),
m_behavior(BehaviorEnum::NOT_SET),
m_behaviorHasBeenSet(false)
{
*this = jsonValue;
}
CacheBehaviorPerPath& CacheBehaviorPerPath::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("path"))
{
m_path = jsonValue.GetString("path");
m_pathHasBeenSet = true;
}
if(jsonValue.ValueExists("behavior"))
{
m_behavior = BehaviorEnumMapper::GetBehaviorEnumForName(jsonValue.GetString("behavior"));
m_behaviorHasBeenSet = true;
}
return *this;
}
JsonValue CacheBehaviorPerPath::Jsonize() const
{
JsonValue payload;
if(m_pathHasBeenSet)
{
payload.WithString("path", m_path);
}
if(m_behaviorHasBeenSet)
{
payload.WithString("behavior", BehaviorEnumMapper::GetNameForBehaviorEnum(m_behavior));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,170 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CacheSettings.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CacheSettings::CacheSettings() :
m_defaultTTL(0),
m_defaultTTLHasBeenSet(false),
m_minimumTTL(0),
m_minimumTTLHasBeenSet(false),
m_maximumTTL(0),
m_maximumTTLHasBeenSet(false),
m_allowedHTTPMethodsHasBeenSet(false),
m_cachedHTTPMethodsHasBeenSet(false),
m_forwardedCookiesHasBeenSet(false),
m_forwardedHeadersHasBeenSet(false),
m_forwardedQueryStringsHasBeenSet(false)
{
}
CacheSettings::CacheSettings(JsonView jsonValue) :
m_defaultTTL(0),
m_defaultTTLHasBeenSet(false),
m_minimumTTL(0),
m_minimumTTLHasBeenSet(false),
m_maximumTTL(0),
m_maximumTTLHasBeenSet(false),
m_allowedHTTPMethodsHasBeenSet(false),
m_cachedHTTPMethodsHasBeenSet(false),
m_forwardedCookiesHasBeenSet(false),
m_forwardedHeadersHasBeenSet(false),
m_forwardedQueryStringsHasBeenSet(false)
{
*this = jsonValue;
}
CacheSettings& CacheSettings::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("defaultTTL"))
{
m_defaultTTL = jsonValue.GetInt64("defaultTTL");
m_defaultTTLHasBeenSet = true;
}
if(jsonValue.ValueExists("minimumTTL"))
{
m_minimumTTL = jsonValue.GetInt64("minimumTTL");
m_minimumTTLHasBeenSet = true;
}
if(jsonValue.ValueExists("maximumTTL"))
{
m_maximumTTL = jsonValue.GetInt64("maximumTTL");
m_maximumTTLHasBeenSet = true;
}
if(jsonValue.ValueExists("allowedHTTPMethods"))
{
m_allowedHTTPMethods = jsonValue.GetString("allowedHTTPMethods");
m_allowedHTTPMethodsHasBeenSet = true;
}
if(jsonValue.ValueExists("cachedHTTPMethods"))
{
m_cachedHTTPMethods = jsonValue.GetString("cachedHTTPMethods");
m_cachedHTTPMethodsHasBeenSet = true;
}
if(jsonValue.ValueExists("forwardedCookies"))
{
m_forwardedCookies = jsonValue.GetObject("forwardedCookies");
m_forwardedCookiesHasBeenSet = true;
}
if(jsonValue.ValueExists("forwardedHeaders"))
{
m_forwardedHeaders = jsonValue.GetObject("forwardedHeaders");
m_forwardedHeadersHasBeenSet = true;
}
if(jsonValue.ValueExists("forwardedQueryStrings"))
{
m_forwardedQueryStrings = jsonValue.GetObject("forwardedQueryStrings");
m_forwardedQueryStringsHasBeenSet = true;
}
return *this;
}
JsonValue CacheSettings::Jsonize() const
{
JsonValue payload;
if(m_defaultTTLHasBeenSet)
{
payload.WithInt64("defaultTTL", m_defaultTTL);
}
if(m_minimumTTLHasBeenSet)
{
payload.WithInt64("minimumTTL", m_minimumTTL);
}
if(m_maximumTTLHasBeenSet)
{
payload.WithInt64("maximumTTL", m_maximumTTL);
}
if(m_allowedHTTPMethodsHasBeenSet)
{
payload.WithString("allowedHTTPMethods", m_allowedHTTPMethods);
}
if(m_cachedHTTPMethodsHasBeenSet)
{
payload.WithString("cachedHTTPMethods", m_cachedHTTPMethods);
}
if(m_forwardedCookiesHasBeenSet)
{
payload.WithObject("forwardedCookies", m_forwardedCookies.Jsonize());
}
if(m_forwardedHeadersHasBeenSet)
{
payload.WithObject("forwardedHeaders", m_forwardedHeaders.Jsonize());
}
if(m_forwardedQueryStringsHasBeenSet)
{
payload.WithObject("forwardedQueryStrings", m_forwardedQueryStrings.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,381 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/Certificate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
Certificate::Certificate() :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(CertificateStatus::NOT_SET),
m_statusHasBeenSet(false),
m_serialNumberHasBeenSet(false),
m_subjectAlternativeNamesHasBeenSet(false),
m_domainValidationRecordsHasBeenSet(false),
m_requestFailureReasonHasBeenSet(false),
m_inUseResourceCount(0),
m_inUseResourceCountHasBeenSet(false),
m_keyAlgorithmHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_issuedAtHasBeenSet(false),
m_issuerCAHasBeenSet(false),
m_notBeforeHasBeenSet(false),
m_notAfterHasBeenSet(false),
m_eligibleToRenewHasBeenSet(false),
m_renewalSummaryHasBeenSet(false),
m_revokedAtHasBeenSet(false),
m_revocationReasonHasBeenSet(false),
m_tagsHasBeenSet(false),
m_supportCodeHasBeenSet(false)
{
}
Certificate::Certificate(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(CertificateStatus::NOT_SET),
m_statusHasBeenSet(false),
m_serialNumberHasBeenSet(false),
m_subjectAlternativeNamesHasBeenSet(false),
m_domainValidationRecordsHasBeenSet(false),
m_requestFailureReasonHasBeenSet(false),
m_inUseResourceCount(0),
m_inUseResourceCountHasBeenSet(false),
m_keyAlgorithmHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_issuedAtHasBeenSet(false),
m_issuerCAHasBeenSet(false),
m_notBeforeHasBeenSet(false),
m_notAfterHasBeenSet(false),
m_eligibleToRenewHasBeenSet(false),
m_renewalSummaryHasBeenSet(false),
m_revokedAtHasBeenSet(false),
m_revocationReasonHasBeenSet(false),
m_tagsHasBeenSet(false),
m_supportCodeHasBeenSet(false)
{
*this = jsonValue;
}
Certificate& Certificate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("domainName"))
{
m_domainName = jsonValue.GetString("domainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = CertificateStatusMapper::GetCertificateStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("serialNumber"))
{
m_serialNumber = jsonValue.GetString("serialNumber");
m_serialNumberHasBeenSet = true;
}
if(jsonValue.ValueExists("subjectAlternativeNames"))
{
Array<JsonView> subjectAlternativeNamesJsonList = jsonValue.GetArray("subjectAlternativeNames");
for(unsigned subjectAlternativeNamesIndex = 0; subjectAlternativeNamesIndex < subjectAlternativeNamesJsonList.GetLength(); ++subjectAlternativeNamesIndex)
{
m_subjectAlternativeNames.push_back(subjectAlternativeNamesJsonList[subjectAlternativeNamesIndex].AsString());
}
m_subjectAlternativeNamesHasBeenSet = true;
}
if(jsonValue.ValueExists("domainValidationRecords"))
{
Array<JsonView> domainValidationRecordsJsonList = jsonValue.GetArray("domainValidationRecords");
for(unsigned domainValidationRecordsIndex = 0; domainValidationRecordsIndex < domainValidationRecordsJsonList.GetLength(); ++domainValidationRecordsIndex)
{
m_domainValidationRecords.push_back(domainValidationRecordsJsonList[domainValidationRecordsIndex].AsObject());
}
m_domainValidationRecordsHasBeenSet = true;
}
if(jsonValue.ValueExists("requestFailureReason"))
{
m_requestFailureReason = jsonValue.GetString("requestFailureReason");
m_requestFailureReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("inUseResourceCount"))
{
m_inUseResourceCount = jsonValue.GetInteger("inUseResourceCount");
m_inUseResourceCountHasBeenSet = true;
}
if(jsonValue.ValueExists("keyAlgorithm"))
{
m_keyAlgorithm = jsonValue.GetString("keyAlgorithm");
m_keyAlgorithmHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("issuedAt"))
{
m_issuedAt = jsonValue.GetDouble("issuedAt");
m_issuedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("issuerCA"))
{
m_issuerCA = jsonValue.GetString("issuerCA");
m_issuerCAHasBeenSet = true;
}
if(jsonValue.ValueExists("notBefore"))
{
m_notBefore = jsonValue.GetDouble("notBefore");
m_notBeforeHasBeenSet = true;
}
if(jsonValue.ValueExists("notAfter"))
{
m_notAfter = jsonValue.GetDouble("notAfter");
m_notAfterHasBeenSet = true;
}
if(jsonValue.ValueExists("eligibleToRenew"))
{
m_eligibleToRenew = jsonValue.GetString("eligibleToRenew");
m_eligibleToRenewHasBeenSet = true;
}
if(jsonValue.ValueExists("renewalSummary"))
{
m_renewalSummary = jsonValue.GetObject("renewalSummary");
m_renewalSummaryHasBeenSet = true;
}
if(jsonValue.ValueExists("revokedAt"))
{
m_revokedAt = jsonValue.GetDouble("revokedAt");
m_revokedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("revocationReason"))
{
m_revocationReason = jsonValue.GetString("revocationReason");
m_revocationReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
m_tagsHasBeenSet = true;
}
if(jsonValue.ValueExists("supportCode"))
{
m_supportCode = jsonValue.GetString("supportCode");
m_supportCodeHasBeenSet = true;
}
return *this;
}
JsonValue Certificate::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", CertificateStatusMapper::GetNameForCertificateStatus(m_status));
}
if(m_serialNumberHasBeenSet)
{
payload.WithString("serialNumber", m_serialNumber);
}
if(m_subjectAlternativeNamesHasBeenSet)
{
Array<JsonValue> subjectAlternativeNamesJsonList(m_subjectAlternativeNames.size());
for(unsigned subjectAlternativeNamesIndex = 0; subjectAlternativeNamesIndex < subjectAlternativeNamesJsonList.GetLength(); ++subjectAlternativeNamesIndex)
{
subjectAlternativeNamesJsonList[subjectAlternativeNamesIndex].AsString(m_subjectAlternativeNames[subjectAlternativeNamesIndex]);
}
payload.WithArray("subjectAlternativeNames", std::move(subjectAlternativeNamesJsonList));
}
if(m_domainValidationRecordsHasBeenSet)
{
Array<JsonValue> domainValidationRecordsJsonList(m_domainValidationRecords.size());
for(unsigned domainValidationRecordsIndex = 0; domainValidationRecordsIndex < domainValidationRecordsJsonList.GetLength(); ++domainValidationRecordsIndex)
{
domainValidationRecordsJsonList[domainValidationRecordsIndex].AsObject(m_domainValidationRecords[domainValidationRecordsIndex].Jsonize());
}
payload.WithArray("domainValidationRecords", std::move(domainValidationRecordsJsonList));
}
if(m_requestFailureReasonHasBeenSet)
{
payload.WithString("requestFailureReason", m_requestFailureReason);
}
if(m_inUseResourceCountHasBeenSet)
{
payload.WithInteger("inUseResourceCount", m_inUseResourceCount);
}
if(m_keyAlgorithmHasBeenSet)
{
payload.WithString("keyAlgorithm", m_keyAlgorithm);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_issuedAtHasBeenSet)
{
payload.WithDouble("issuedAt", m_issuedAt.SecondsWithMSPrecision());
}
if(m_issuerCAHasBeenSet)
{
payload.WithString("issuerCA", m_issuerCA);
}
if(m_notBeforeHasBeenSet)
{
payload.WithDouble("notBefore", m_notBefore.SecondsWithMSPrecision());
}
if(m_notAfterHasBeenSet)
{
payload.WithDouble("notAfter", m_notAfter.SecondsWithMSPrecision());
}
if(m_eligibleToRenewHasBeenSet)
{
payload.WithString("eligibleToRenew", m_eligibleToRenew);
}
if(m_renewalSummaryHasBeenSet)
{
payload.WithObject("renewalSummary", m_renewalSummary.Jsonize());
}
if(m_revokedAtHasBeenSet)
{
payload.WithDouble("revokedAt", m_revokedAt.SecondsWithMSPrecision());
}
if(m_revocationReasonHasBeenSet)
{
payload.WithString("revocationReason", m_revocationReason);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_supportCodeHasBeenSet)
{
payload.WithString("supportCode", m_supportCode);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CertificateStatus.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 Lightsail
{
namespace Model
{
namespace CertificateStatusMapper
{
static const int PENDING_VALIDATION_HASH = HashingUtils::HashString("PENDING_VALIDATION");
static const int ISSUED_HASH = HashingUtils::HashString("ISSUED");
static const int INACTIVE_HASH = HashingUtils::HashString("INACTIVE");
static const int EXPIRED_HASH = HashingUtils::HashString("EXPIRED");
static const int VALIDATION_TIMED_OUT_HASH = HashingUtils::HashString("VALIDATION_TIMED_OUT");
static const int REVOKED_HASH = HashingUtils::HashString("REVOKED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
CertificateStatus GetCertificateStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PENDING_VALIDATION_HASH)
{
return CertificateStatus::PENDING_VALIDATION;
}
else if (hashCode == ISSUED_HASH)
{
return CertificateStatus::ISSUED;
}
else if (hashCode == INACTIVE_HASH)
{
return CertificateStatus::INACTIVE;
}
else if (hashCode == EXPIRED_HASH)
{
return CertificateStatus::EXPIRED;
}
else if (hashCode == VALIDATION_TIMED_OUT_HASH)
{
return CertificateStatus::VALIDATION_TIMED_OUT;
}
else if (hashCode == REVOKED_HASH)
{
return CertificateStatus::REVOKED;
}
else if (hashCode == FAILED_HASH)
{
return CertificateStatus::FAILED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CertificateStatus>(hashCode);
}
return CertificateStatus::NOT_SET;
}
Aws::String GetNameForCertificateStatus(CertificateStatus enumValue)
{
switch(enumValue)
{
case CertificateStatus::PENDING_VALIDATION:
return "PENDING_VALIDATION";
case CertificateStatus::ISSUED:
return "ISSUED";
case CertificateStatus::INACTIVE:
return "INACTIVE";
case CertificateStatus::EXPIRED:
return "EXPIRED";
case CertificateStatus::VALIDATION_TIMED_OUT:
return "VALIDATION_TIMED_OUT";
case CertificateStatus::REVOKED:
return "REVOKED";
case CertificateStatus::FAILED:
return "FAILED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CertificateStatusMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/CertificateSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CertificateSummary::CertificateSummary() :
m_certificateArnHasBeenSet(false),
m_certificateNameHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_certificateDetailHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
CertificateSummary::CertificateSummary(JsonView jsonValue) :
m_certificateArnHasBeenSet(false),
m_certificateNameHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_certificateDetailHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
CertificateSummary& CertificateSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("certificateArn"))
{
m_certificateArn = jsonValue.GetString("certificateArn");
m_certificateArnHasBeenSet = true;
}
if(jsonValue.ValueExists("certificateName"))
{
m_certificateName = jsonValue.GetString("certificateName");
m_certificateNameHasBeenSet = true;
}
if(jsonValue.ValueExists("domainName"))
{
m_domainName = jsonValue.GetString("domainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("certificateDetail"))
{
m_certificateDetail = jsonValue.GetObject("certificateDetail");
m_certificateDetailHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
m_tagsHasBeenSet = true;
}
return *this;
}
JsonValue CertificateSummary::Jsonize() const
{
JsonValue payload;
if(m_certificateArnHasBeenSet)
{
payload.WithString("certificateArn", m_certificateArn);
}
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_certificateDetailHasBeenSet)
{
payload.WithObject("certificateDetail", m_certificateDetail.Jsonize());
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/CloseInstancePublicPortsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CloseInstancePublicPortsRequest::CloseInstancePublicPortsRequest() :
m_portInfoHasBeenSet(false),
m_instanceNameHasBeenSet(false)
{
}
Aws::String CloseInstancePublicPortsRequest::SerializePayload() const
{
JsonValue payload;
if(m_portInfoHasBeenSet)
{
payload.WithObject("portInfo", m_portInfo.Jsonize());
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("instanceName", m_instanceName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CloseInstancePublicPortsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CloseInstancePublicPorts"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CloseInstancePublicPortsResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CloseInstancePublicPortsResult::CloseInstancePublicPortsResult()
{
}
CloseInstancePublicPortsResult::CloseInstancePublicPortsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CloseInstancePublicPortsResult& CloseInstancePublicPortsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,173 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CloudFormationStackRecord.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CloudFormationStackRecord::CloudFormationStackRecord() :
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_state(RecordState::NOT_SET),
m_stateHasBeenSet(false),
m_sourceInfoHasBeenSet(false),
m_destinationInfoHasBeenSet(false)
{
}
CloudFormationStackRecord::CloudFormationStackRecord(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_state(RecordState::NOT_SET),
m_stateHasBeenSet(false),
m_sourceInfoHasBeenSet(false),
m_destinationInfoHasBeenSet(false)
{
*this = jsonValue;
}
CloudFormationStackRecord& CloudFormationStackRecord::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("location"))
{
m_location = jsonValue.GetObject("location");
m_locationHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = RecordStateMapper::GetRecordStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("sourceInfo"))
{
Array<JsonView> sourceInfoJsonList = jsonValue.GetArray("sourceInfo");
for(unsigned sourceInfoIndex = 0; sourceInfoIndex < sourceInfoJsonList.GetLength(); ++sourceInfoIndex)
{
m_sourceInfo.push_back(sourceInfoJsonList[sourceInfoIndex].AsObject());
}
m_sourceInfoHasBeenSet = true;
}
if(jsonValue.ValueExists("destinationInfo"))
{
m_destinationInfo = jsonValue.GetObject("destinationInfo");
m_destinationInfoHasBeenSet = true;
}
return *this;
}
JsonValue CloudFormationStackRecord::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_stateHasBeenSet)
{
payload.WithString("state", RecordStateMapper::GetNameForRecordState(m_state));
}
if(m_sourceInfoHasBeenSet)
{
Array<JsonValue> sourceInfoJsonList(m_sourceInfo.size());
for(unsigned sourceInfoIndex = 0; sourceInfoIndex < sourceInfoJsonList.GetLength(); ++sourceInfoIndex)
{
sourceInfoJsonList[sourceInfoIndex].AsObject(m_sourceInfo[sourceInfoIndex].Jsonize());
}
payload.WithArray("sourceInfo", std::move(sourceInfoJsonList));
}
if(m_destinationInfoHasBeenSet)
{
payload.WithObject("destinationInfo", m_destinationInfo.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CloudFormationStackRecordSourceInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CloudFormationStackRecordSourceInfo::CloudFormationStackRecordSourceInfo() :
m_resourceType(CloudFormationStackRecordSourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_nameHasBeenSet(false),
m_arnHasBeenSet(false)
{
}
CloudFormationStackRecordSourceInfo::CloudFormationStackRecordSourceInfo(JsonView jsonValue) :
m_resourceType(CloudFormationStackRecordSourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_nameHasBeenSet(false),
m_arnHasBeenSet(false)
{
*this = jsonValue;
}
CloudFormationStackRecordSourceInfo& CloudFormationStackRecordSourceInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = CloudFormationStackRecordSourceTypeMapper::GetCloudFormationStackRecordSourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
return *this;
}
JsonValue CloudFormationStackRecordSourceInfo::Jsonize() const
{
JsonValue payload;
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", CloudFormationStackRecordSourceTypeMapper::GetNameForCloudFormationStackRecordSourceType(m_resourceType));
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/CloudFormationStackRecordSourceType.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 Lightsail
{
namespace Model
{
namespace CloudFormationStackRecordSourceTypeMapper
{
static const int ExportSnapshotRecord_HASH = HashingUtils::HashString("ExportSnapshotRecord");
CloudFormationStackRecordSourceType GetCloudFormationStackRecordSourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ExportSnapshotRecord_HASH)
{
return CloudFormationStackRecordSourceType::ExportSnapshotRecord;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CloudFormationStackRecordSourceType>(hashCode);
}
return CloudFormationStackRecordSourceType::NOT_SET;
}
Aws::String GetNameForCloudFormationStackRecordSourceType(CloudFormationStackRecordSourceType enumValue)
{
switch(enumValue)
{
case CloudFormationStackRecordSourceType::ExportSnapshotRecord:
return "ExportSnapshotRecord";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CloudFormationStackRecordSourceTypeMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/ComparisonOperator.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 Lightsail
{
namespace Model
{
namespace ComparisonOperatorMapper
{
static const int GreaterThanOrEqualToThreshold_HASH = HashingUtils::HashString("GreaterThanOrEqualToThreshold");
static const int GreaterThanThreshold_HASH = HashingUtils::HashString("GreaterThanThreshold");
static const int LessThanThreshold_HASH = HashingUtils::HashString("LessThanThreshold");
static const int LessThanOrEqualToThreshold_HASH = HashingUtils::HashString("LessThanOrEqualToThreshold");
ComparisonOperator GetComparisonOperatorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == GreaterThanOrEqualToThreshold_HASH)
{
return ComparisonOperator::GreaterThanOrEqualToThreshold;
}
else if (hashCode == GreaterThanThreshold_HASH)
{
return ComparisonOperator::GreaterThanThreshold;
}
else if (hashCode == LessThanThreshold_HASH)
{
return ComparisonOperator::LessThanThreshold;
}
else if (hashCode == LessThanOrEqualToThreshold_HASH)
{
return ComparisonOperator::LessThanOrEqualToThreshold;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComparisonOperator>(hashCode);
}
return ComparisonOperator::NOT_SET;
}
Aws::String GetNameForComparisonOperator(ComparisonOperator enumValue)
{
switch(enumValue)
{
case ComparisonOperator::GreaterThanOrEqualToThreshold:
return "GreaterThanOrEqualToThreshold";
case ComparisonOperator::GreaterThanThreshold:
return "GreaterThanThreshold";
case ComparisonOperator::LessThanThreshold:
return "LessThanThreshold";
case ComparisonOperator::LessThanOrEqualToThreshold:
return "LessThanOrEqualToThreshold";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComparisonOperatorMapper
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,181 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/ContactMethod.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
ContactMethod::ContactMethod() :
m_contactEndpointHasBeenSet(false),
m_status(ContactMethodStatus::NOT_SET),
m_statusHasBeenSet(false),
m_protocol(ContactProtocol::NOT_SET),
m_protocolHasBeenSet(false),
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_supportCodeHasBeenSet(false)
{
}
ContactMethod::ContactMethod(JsonView jsonValue) :
m_contactEndpointHasBeenSet(false),
m_status(ContactMethodStatus::NOT_SET),
m_statusHasBeenSet(false),
m_protocol(ContactProtocol::NOT_SET),
m_protocolHasBeenSet(false),
m_nameHasBeenSet(false),
m_arnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_locationHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_supportCodeHasBeenSet(false)
{
*this = jsonValue;
}
ContactMethod& ContactMethod::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("contactEndpoint"))
{
m_contactEndpoint = jsonValue.GetString("contactEndpoint");
m_contactEndpointHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = ContactMethodStatusMapper::GetContactMethodStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("protocol"))
{
m_protocol = ContactProtocolMapper::GetContactProtocolForName(jsonValue.GetString("protocol"));
m_protocolHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("location"))
{
m_location = jsonValue.GetObject("location");
m_locationHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("supportCode"))
{
m_supportCode = jsonValue.GetString("supportCode");
m_supportCodeHasBeenSet = true;
}
return *this;
}
JsonValue ContactMethod::Jsonize() const
{
JsonValue payload;
if(m_contactEndpointHasBeenSet)
{
payload.WithString("contactEndpoint", m_contactEndpoint);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", ContactMethodStatusMapper::GetNameForContactMethodStatus(m_status));
}
if(m_protocolHasBeenSet)
{
payload.WithString("protocol", ContactProtocolMapper::GetNameForContactProtocol(m_protocol));
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
if(m_supportCodeHasBeenSet)
{
payload.WithString("supportCode", m_supportCode);
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/ContactMethodStatus.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 Lightsail
{
namespace Model
{
namespace ContactMethodStatusMapper
{
static const int PendingVerification_HASH = HashingUtils::HashString("PendingVerification");
static const int Valid_HASH = HashingUtils::HashString("Valid");
static const int Invalid_HASH = HashingUtils::HashString("Invalid");
ContactMethodStatus GetContactMethodStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PendingVerification_HASH)
{
return ContactMethodStatus::PendingVerification;
}
else if (hashCode == Valid_HASH)
{
return ContactMethodStatus::Valid;
}
else if (hashCode == Invalid_HASH)
{
return ContactMethodStatus::Invalid;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ContactMethodStatus>(hashCode);
}
return ContactMethodStatus::NOT_SET;
}
Aws::String GetNameForContactMethodStatus(ContactMethodStatus enumValue)
{
switch(enumValue)
{
case ContactMethodStatus::PendingVerification:
return "PendingVerification";
case ContactMethodStatus::Valid:
return "Valid";
case ContactMethodStatus::Invalid:
return "Invalid";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ContactMethodStatusMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/ContactMethodVerificationProtocol.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 Lightsail
{
namespace Model
{
namespace ContactMethodVerificationProtocolMapper
{
static const int Email_HASH = HashingUtils::HashString("Email");
ContactMethodVerificationProtocol GetContactMethodVerificationProtocolForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Email_HASH)
{
return ContactMethodVerificationProtocol::Email;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ContactMethodVerificationProtocol>(hashCode);
}
return ContactMethodVerificationProtocol::NOT_SET;
}
Aws::String GetNameForContactMethodVerificationProtocol(ContactMethodVerificationProtocol enumValue)
{
switch(enumValue)
{
case ContactMethodVerificationProtocol::Email:
return "Email";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ContactMethodVerificationProtocolMapper
} // namespace Model
} // namespace Lightsail
} // 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/lightsail/model/ContactProtocol.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 Lightsail
{
namespace Model
{
namespace ContactProtocolMapper
{
static const int Email_HASH = HashingUtils::HashString("Email");
static const int SMS_HASH = HashingUtils::HashString("SMS");
ContactProtocol GetContactProtocolForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Email_HASH)
{
return ContactProtocol::Email;
}
else if (hashCode == SMS_HASH)
{
return ContactProtocol::SMS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ContactProtocol>(hashCode);
}
return ContactProtocol::NOT_SET;
}
Aws::String GetNameForContactProtocol(ContactProtocol enumValue)
{
switch(enumValue)
{
case ContactProtocol::Email:
return "Email";
case ContactProtocol::SMS:
return "SMS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ContactProtocolMapper
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CookieObject.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Lightsail
{
namespace Model
{
CookieObject::CookieObject() :
m_option(ForwardValues::NOT_SET),
m_optionHasBeenSet(false),
m_cookiesAllowListHasBeenSet(false)
{
}
CookieObject::CookieObject(JsonView jsonValue) :
m_option(ForwardValues::NOT_SET),
m_optionHasBeenSet(false),
m_cookiesAllowListHasBeenSet(false)
{
*this = jsonValue;
}
CookieObject& CookieObject::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("option"))
{
m_option = ForwardValuesMapper::GetForwardValuesForName(jsonValue.GetString("option"));
m_optionHasBeenSet = true;
}
if(jsonValue.ValueExists("cookiesAllowList"))
{
Array<JsonView> cookiesAllowListJsonList = jsonValue.GetArray("cookiesAllowList");
for(unsigned cookiesAllowListIndex = 0; cookiesAllowListIndex < cookiesAllowListJsonList.GetLength(); ++cookiesAllowListIndex)
{
m_cookiesAllowList.push_back(cookiesAllowListJsonList[cookiesAllowListIndex].AsString());
}
m_cookiesAllowListHasBeenSet = true;
}
return *this;
}
JsonValue CookieObject::Jsonize() const
{
JsonValue payload;
if(m_optionHasBeenSet)
{
payload.WithString("option", ForwardValuesMapper::GetNameForForwardValues(m_option));
}
if(m_cookiesAllowListHasBeenSet)
{
Array<JsonValue> cookiesAllowListJsonList(m_cookiesAllowList.size());
for(unsigned cookiesAllowListIndex = 0; cookiesAllowListIndex < cookiesAllowListJsonList.GetLength(); ++cookiesAllowListIndex)
{
cookiesAllowListJsonList[cookiesAllowListIndex].AsString(m_cookiesAllowList[cookiesAllowListIndex]);
}
payload.WithArray("cookiesAllowList", std::move(cookiesAllowListJsonList));
}
return payload;
}
} // namespace Model
} // namespace Lightsail
} // namespace Aws

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CopySnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CopySnapshotRequest::CopySnapshotRequest() :
m_sourceSnapshotNameHasBeenSet(false),
m_sourceResourceNameHasBeenSet(false),
m_restoreDateHasBeenSet(false),
m_useLatestRestorableAutoSnapshot(false),
m_useLatestRestorableAutoSnapshotHasBeenSet(false),
m_targetSnapshotNameHasBeenSet(false),
m_sourceRegion(RegionName::NOT_SET),
m_sourceRegionHasBeenSet(false)
{
}
Aws::String CopySnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_sourceSnapshotNameHasBeenSet)
{
payload.WithString("sourceSnapshotName", m_sourceSnapshotName);
}
if(m_sourceResourceNameHasBeenSet)
{
payload.WithString("sourceResourceName", m_sourceResourceName);
}
if(m_restoreDateHasBeenSet)
{
payload.WithString("restoreDate", m_restoreDate);
}
if(m_useLatestRestorableAutoSnapshotHasBeenSet)
{
payload.WithBool("useLatestRestorableAutoSnapshot", m_useLatestRestorableAutoSnapshot);
}
if(m_targetSnapshotNameHasBeenSet)
{
payload.WithString("targetSnapshotName", m_targetSnapshotName);
}
if(m_sourceRegionHasBeenSet)
{
payload.WithString("sourceRegion", RegionNameMapper::GetNameForRegionName(m_sourceRegion));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CopySnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CopySnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CopySnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CopySnapshotResult::CopySnapshotResult()
{
}
CopySnapshotResult::CopySnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CopySnapshotResult& CopySnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateCertificateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateCertificateRequest::CreateCertificateRequest() :
m_certificateNameHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_subjectAlternativeNamesHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateCertificateRequest::SerializePayload() const
{
JsonValue payload;
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_subjectAlternativeNamesHasBeenSet)
{
Array<JsonValue> subjectAlternativeNamesJsonList(m_subjectAlternativeNames.size());
for(unsigned subjectAlternativeNamesIndex = 0; subjectAlternativeNamesIndex < subjectAlternativeNamesJsonList.GetLength(); ++subjectAlternativeNamesIndex)
{
subjectAlternativeNamesJsonList[subjectAlternativeNamesIndex].AsString(m_subjectAlternativeNames[subjectAlternativeNamesIndex]);
}
payload.WithArray("subjectAlternativeNames", std::move(subjectAlternativeNamesJsonList));
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateCertificateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateCertificate"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateCertificateResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateCertificateResult::CreateCertificateResult()
{
}
CreateCertificateResult::CreateCertificateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateCertificateResult& CreateCertificateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("certificate"))
{
m_certificate = jsonValue.GetObject("certificate");
}
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateCloudFormationStackRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateCloudFormationStackRequest::CreateCloudFormationStackRequest() :
m_instancesHasBeenSet(false)
{
}
Aws::String CreateCloudFormationStackRequest::SerializePayload() const
{
JsonValue payload;
if(m_instancesHasBeenSet)
{
Array<JsonValue> instancesJsonList(m_instances.size());
for(unsigned instancesIndex = 0; instancesIndex < instancesJsonList.GetLength(); ++instancesIndex)
{
instancesJsonList[instancesIndex].AsObject(m_instances[instancesIndex].Jsonize());
}
payload.WithArray("instances", std::move(instancesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateCloudFormationStackRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateCloudFormationStack"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateCloudFormationStackResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateCloudFormationStackResult::CreateCloudFormationStackResult()
{
}
CreateCloudFormationStackResult::CreateCloudFormationStackResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateCloudFormationStackResult& CreateCloudFormationStackResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateContactMethodRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateContactMethodRequest::CreateContactMethodRequest() :
m_protocol(ContactProtocol::NOT_SET),
m_protocolHasBeenSet(false),
m_contactEndpointHasBeenSet(false)
{
}
Aws::String CreateContactMethodRequest::SerializePayload() const
{
JsonValue payload;
if(m_protocolHasBeenSet)
{
payload.WithString("protocol", ContactProtocolMapper::GetNameForContactProtocol(m_protocol));
}
if(m_contactEndpointHasBeenSet)
{
payload.WithString("contactEndpoint", m_contactEndpoint);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateContactMethodRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateContactMethod"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateContactMethodResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateContactMethodResult::CreateContactMethodResult()
{
}
CreateContactMethodResult::CreateContactMethodResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateContactMethodResult& CreateContactMethodResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,111 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskFromSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDiskFromSnapshotRequest::CreateDiskFromSnapshotRequest() :
m_diskNameHasBeenSet(false),
m_diskSnapshotNameHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_sizeInGb(0),
m_sizeInGbHasBeenSet(false),
m_tagsHasBeenSet(false),
m_addOnsHasBeenSet(false),
m_sourceDiskNameHasBeenSet(false),
m_restoreDateHasBeenSet(false),
m_useLatestRestorableAutoSnapshot(false),
m_useLatestRestorableAutoSnapshotHasBeenSet(false)
{
}
Aws::String CreateDiskFromSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskNameHasBeenSet)
{
payload.WithString("diskName", m_diskName);
}
if(m_diskSnapshotNameHasBeenSet)
{
payload.WithString("diskSnapshotName", m_diskSnapshotName);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_sizeInGbHasBeenSet)
{
payload.WithInteger("sizeInGb", m_sizeInGb);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_addOnsHasBeenSet)
{
Array<JsonValue> addOnsJsonList(m_addOns.size());
for(unsigned addOnsIndex = 0; addOnsIndex < addOnsJsonList.GetLength(); ++addOnsIndex)
{
addOnsJsonList[addOnsIndex].AsObject(m_addOns[addOnsIndex].Jsonize());
}
payload.WithArray("addOns", std::move(addOnsJsonList));
}
if(m_sourceDiskNameHasBeenSet)
{
payload.WithString("sourceDiskName", m_sourceDiskName);
}
if(m_restoreDateHasBeenSet)
{
payload.WithString("restoreDate", m_restoreDate);
}
if(m_useLatestRestorableAutoSnapshotHasBeenSet)
{
payload.WithBool("useLatestRestorableAutoSnapshot", m_useLatestRestorableAutoSnapshot);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDiskFromSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDiskFromSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskFromSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDiskFromSnapshotResult::CreateDiskFromSnapshotResult()
{
}
CreateDiskFromSnapshotResult::CreateDiskFromSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDiskFromSnapshotResult& CreateDiskFromSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDiskRequest::CreateDiskRequest() :
m_diskNameHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_sizeInGb(0),
m_sizeInGbHasBeenSet(false),
m_tagsHasBeenSet(false),
m_addOnsHasBeenSet(false)
{
}
Aws::String CreateDiskRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskNameHasBeenSet)
{
payload.WithString("diskName", m_diskName);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_sizeInGbHasBeenSet)
{
payload.WithInteger("sizeInGb", m_sizeInGb);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_addOnsHasBeenSet)
{
Array<JsonValue> addOnsJsonList(m_addOns.size());
for(unsigned addOnsIndex = 0; addOnsIndex < addOnsJsonList.GetLength(); ++addOnsIndex)
{
addOnsJsonList[addOnsIndex].AsObject(m_addOns[addOnsIndex].Jsonize());
}
payload.WithArray("addOns", std::move(addOnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDiskRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDisk"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDiskResult::CreateDiskResult()
{
}
CreateDiskResult::CreateDiskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDiskResult& CreateDiskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,69 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDiskSnapshotRequest::CreateDiskSnapshotRequest() :
m_diskNameHasBeenSet(false),
m_diskSnapshotNameHasBeenSet(false),
m_instanceNameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateDiskSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskNameHasBeenSet)
{
payload.WithString("diskName", m_diskName);
}
if(m_diskSnapshotNameHasBeenSet)
{
payload.WithString("diskSnapshotName", m_diskSnapshotName);
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("instanceName", m_instanceName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDiskSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDiskSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDiskSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDiskSnapshotResult::CreateDiskSnapshotResult()
{
}
CreateDiskSnapshotResult::CreateDiskSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDiskSnapshotResult& CreateDiskSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,95 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDistributionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDistributionRequest::CreateDistributionRequest() :
m_distributionNameHasBeenSet(false),
m_originHasBeenSet(false),
m_defaultCacheBehaviorHasBeenSet(false),
m_cacheBehaviorSettingsHasBeenSet(false),
m_cacheBehaviorsHasBeenSet(false),
m_bundleIdHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateDistributionRequest::SerializePayload() const
{
JsonValue payload;
if(m_distributionNameHasBeenSet)
{
payload.WithString("distributionName", m_distributionName);
}
if(m_originHasBeenSet)
{
payload.WithObject("origin", m_origin.Jsonize());
}
if(m_defaultCacheBehaviorHasBeenSet)
{
payload.WithObject("defaultCacheBehavior", m_defaultCacheBehavior.Jsonize());
}
if(m_cacheBehaviorSettingsHasBeenSet)
{
payload.WithObject("cacheBehaviorSettings", m_cacheBehaviorSettings.Jsonize());
}
if(m_cacheBehaviorsHasBeenSet)
{
Array<JsonValue> cacheBehaviorsJsonList(m_cacheBehaviors.size());
for(unsigned cacheBehaviorsIndex = 0; cacheBehaviorsIndex < cacheBehaviorsJsonList.GetLength(); ++cacheBehaviorsIndex)
{
cacheBehaviorsJsonList[cacheBehaviorsIndex].AsObject(m_cacheBehaviors[cacheBehaviorsIndex].Jsonize());
}
payload.WithArray("cacheBehaviors", std::move(cacheBehaviorsJsonList));
}
if(m_bundleIdHasBeenSet)
{
payload.WithString("bundleId", m_bundleId);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDistributionRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDistribution"));
return headers;
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDistributionResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDistributionResult::CreateDistributionResult()
{
}
CreateDistributionResult::CreateDistributionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDistributionResult& CreateDistributionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("distribution"))
{
m_distribution = jsonValue.GetObject("distribution");
}
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDomainEntryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDomainEntryRequest::CreateDomainEntryRequest() :
m_domainNameHasBeenSet(false),
m_domainEntryHasBeenSet(false)
{
}
Aws::String CreateDomainEntryRequest::SerializePayload() const
{
JsonValue payload;
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_domainEntryHasBeenSet)
{
payload.WithObject("domainEntry", m_domainEntry.Jsonize());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDomainEntryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDomainEntry"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDomainEntryResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDomainEntryResult::CreateDomainEntryResult()
{
}
CreateDomainEntryResult::CreateDomainEntryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDomainEntryResult& CreateDomainEntryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDomainRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDomainRequest::CreateDomainRequest() :
m_domainNameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateDomainRequest::SerializePayload() const
{
JsonValue payload;
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDomainRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateDomain"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateDomainResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDomainResult::CreateDomainResult()
{
}
CreateDomainResult::CreateDomainResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDomainResult& CreateDomainResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstanceSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateInstanceSnapshotRequest::CreateInstanceSnapshotRequest() :
m_instanceSnapshotNameHasBeenSet(false),
m_instanceNameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateInstanceSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_instanceSnapshotNameHasBeenSet)
{
payload.WithString("instanceSnapshotName", m_instanceSnapshotName);
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("instanceName", m_instanceName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateInstanceSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateInstanceSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstanceSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateInstanceSnapshotResult::CreateInstanceSnapshotResult()
{
}
CreateInstanceSnapshotResult::CreateInstanceSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateInstanceSnapshotResult& CreateInstanceSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,146 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstancesFromSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateInstancesFromSnapshotRequest::CreateInstancesFromSnapshotRequest() :
m_instanceNamesHasBeenSet(false),
m_attachedDiskMappingHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_instanceSnapshotNameHasBeenSet(false),
m_bundleIdHasBeenSet(false),
m_userDataHasBeenSet(false),
m_keyPairNameHasBeenSet(false),
m_tagsHasBeenSet(false),
m_addOnsHasBeenSet(false),
m_sourceInstanceNameHasBeenSet(false),
m_restoreDateHasBeenSet(false),
m_useLatestRestorableAutoSnapshot(false),
m_useLatestRestorableAutoSnapshotHasBeenSet(false)
{
}
Aws::String CreateInstancesFromSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_instanceNamesHasBeenSet)
{
Array<JsonValue> instanceNamesJsonList(m_instanceNames.size());
for(unsigned instanceNamesIndex = 0; instanceNamesIndex < instanceNamesJsonList.GetLength(); ++instanceNamesIndex)
{
instanceNamesJsonList[instanceNamesIndex].AsString(m_instanceNames[instanceNamesIndex]);
}
payload.WithArray("instanceNames", std::move(instanceNamesJsonList));
}
if(m_attachedDiskMappingHasBeenSet)
{
JsonValue attachedDiskMappingJsonMap;
for(auto& attachedDiskMappingItem : m_attachedDiskMapping)
{
Array<JsonValue> diskMapListJsonList(attachedDiskMappingItem.second.size());
for(unsigned diskMapListIndex = 0; diskMapListIndex < diskMapListJsonList.GetLength(); ++diskMapListIndex)
{
diskMapListJsonList[diskMapListIndex].AsObject(attachedDiskMappingItem.second[diskMapListIndex].Jsonize());
}
attachedDiskMappingJsonMap.WithArray(attachedDiskMappingItem.first, std::move(diskMapListJsonList));
}
payload.WithObject("attachedDiskMapping", std::move(attachedDiskMappingJsonMap));
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_instanceSnapshotNameHasBeenSet)
{
payload.WithString("instanceSnapshotName", m_instanceSnapshotName);
}
if(m_bundleIdHasBeenSet)
{
payload.WithString("bundleId", m_bundleId);
}
if(m_userDataHasBeenSet)
{
payload.WithString("userData", m_userData);
}
if(m_keyPairNameHasBeenSet)
{
payload.WithString("keyPairName", m_keyPairName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_addOnsHasBeenSet)
{
Array<JsonValue> addOnsJsonList(m_addOns.size());
for(unsigned addOnsIndex = 0; addOnsIndex < addOnsJsonList.GetLength(); ++addOnsIndex)
{
addOnsJsonList[addOnsIndex].AsObject(m_addOns[addOnsIndex].Jsonize());
}
payload.WithArray("addOns", std::move(addOnsJsonList));
}
if(m_sourceInstanceNameHasBeenSet)
{
payload.WithString("sourceInstanceName", m_sourceInstanceName);
}
if(m_restoreDateHasBeenSet)
{
payload.WithString("restoreDate", m_restoreDate);
}
if(m_useLatestRestorableAutoSnapshotHasBeenSet)
{
payload.WithBool("useLatestRestorableAutoSnapshot", m_useLatestRestorableAutoSnapshot);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateInstancesFromSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateInstancesFromSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstancesFromSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateInstancesFromSnapshotResult::CreateInstancesFromSnapshotResult()
{
}
CreateInstancesFromSnapshotResult::CreateInstancesFromSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateInstancesFromSnapshotResult& CreateInstancesFromSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstancesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateInstancesRequest::CreateInstancesRequest() :
m_instanceNamesHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_blueprintIdHasBeenSet(false),
m_bundleIdHasBeenSet(false),
m_userDataHasBeenSet(false),
m_keyPairNameHasBeenSet(false),
m_tagsHasBeenSet(false),
m_addOnsHasBeenSet(false)
{
}
Aws::String CreateInstancesRequest::SerializePayload() const
{
JsonValue payload;
if(m_instanceNamesHasBeenSet)
{
Array<JsonValue> instanceNamesJsonList(m_instanceNames.size());
for(unsigned instanceNamesIndex = 0; instanceNamesIndex < instanceNamesJsonList.GetLength(); ++instanceNamesIndex)
{
instanceNamesJsonList[instanceNamesIndex].AsString(m_instanceNames[instanceNamesIndex]);
}
payload.WithArray("instanceNames", std::move(instanceNamesJsonList));
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_blueprintIdHasBeenSet)
{
payload.WithString("blueprintId", m_blueprintId);
}
if(m_bundleIdHasBeenSet)
{
payload.WithString("bundleId", m_bundleId);
}
if(m_userDataHasBeenSet)
{
payload.WithString("userData", m_userData);
}
if(m_keyPairNameHasBeenSet)
{
payload.WithString("keyPairName", m_keyPairName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_addOnsHasBeenSet)
{
Array<JsonValue> addOnsJsonList(m_addOns.size());
for(unsigned addOnsIndex = 0; addOnsIndex < addOnsJsonList.GetLength(); ++addOnsIndex)
{
addOnsJsonList[addOnsIndex].AsObject(m_addOns[addOnsIndex].Jsonize());
}
payload.WithArray("addOns", std::move(addOnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateInstancesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateInstances"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateInstancesResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateInstancesResult::CreateInstancesResult()
{
}
CreateInstancesResult::CreateInstancesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateInstancesResult& CreateInstancesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateKeyPairRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateKeyPairRequest::CreateKeyPairRequest() :
m_keyPairNameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateKeyPairRequest::SerializePayload() const
{
JsonValue payload;
if(m_keyPairNameHasBeenSet)
{
payload.WithString("keyPairName", m_keyPairName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateKeyPairRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateKeyPair"));
return headers;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateKeyPairResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateKeyPairResult::CreateKeyPairResult()
{
}
CreateKeyPairResult::CreateKeyPairResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateKeyPairResult& CreateKeyPairResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("keyPair"))
{
m_keyPair = jsonValue.GetObject("keyPair");
}
if(jsonValue.ValueExists("publicKeyBase64"))
{
m_publicKeyBase64 = jsonValue.GetString("publicKeyBase64");
}
if(jsonValue.ValueExists("privateKeyBase64"))
{
m_privateKeyBase64 = jsonValue.GetString("privateKeyBase64");
}
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetObject("operation");
}
return *this;
}

View File

@@ -0,0 +1,96 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateLoadBalancerRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateLoadBalancerRequest::CreateLoadBalancerRequest() :
m_loadBalancerNameHasBeenSet(false),
m_instancePort(0),
m_instancePortHasBeenSet(false),
m_healthCheckPathHasBeenSet(false),
m_certificateNameHasBeenSet(false),
m_certificateDomainNameHasBeenSet(false),
m_certificateAlternativeNamesHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateLoadBalancerRequest::SerializePayload() const
{
JsonValue payload;
if(m_loadBalancerNameHasBeenSet)
{
payload.WithString("loadBalancerName", m_loadBalancerName);
}
if(m_instancePortHasBeenSet)
{
payload.WithInteger("instancePort", m_instancePort);
}
if(m_healthCheckPathHasBeenSet)
{
payload.WithString("healthCheckPath", m_healthCheckPath);
}
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
if(m_certificateDomainNameHasBeenSet)
{
payload.WithString("certificateDomainName", m_certificateDomainName);
}
if(m_certificateAlternativeNamesHasBeenSet)
{
Array<JsonValue> certificateAlternativeNamesJsonList(m_certificateAlternativeNames.size());
for(unsigned certificateAlternativeNamesIndex = 0; certificateAlternativeNamesIndex < certificateAlternativeNamesJsonList.GetLength(); ++certificateAlternativeNamesIndex)
{
certificateAlternativeNamesJsonList[certificateAlternativeNamesIndex].AsString(m_certificateAlternativeNames[certificateAlternativeNamesIndex]);
}
payload.WithArray("certificateAlternativeNames", std::move(certificateAlternativeNamesJsonList));
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateLoadBalancerRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateLoadBalancer"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateLoadBalancerResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateLoadBalancerResult::CreateLoadBalancerResult()
{
}
CreateLoadBalancerResult::CreateLoadBalancerResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateLoadBalancerResult& CreateLoadBalancerResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,81 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateLoadBalancerTlsCertificateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateLoadBalancerTlsCertificateRequest::CreateLoadBalancerTlsCertificateRequest() :
m_loadBalancerNameHasBeenSet(false),
m_certificateNameHasBeenSet(false),
m_certificateDomainNameHasBeenSet(false),
m_certificateAlternativeNamesHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateLoadBalancerTlsCertificateRequest::SerializePayload() const
{
JsonValue payload;
if(m_loadBalancerNameHasBeenSet)
{
payload.WithString("loadBalancerName", m_loadBalancerName);
}
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
if(m_certificateDomainNameHasBeenSet)
{
payload.WithString("certificateDomainName", m_certificateDomainName);
}
if(m_certificateAlternativeNamesHasBeenSet)
{
Array<JsonValue> certificateAlternativeNamesJsonList(m_certificateAlternativeNames.size());
for(unsigned certificateAlternativeNamesIndex = 0; certificateAlternativeNamesIndex < certificateAlternativeNamesJsonList.GetLength(); ++certificateAlternativeNamesIndex)
{
certificateAlternativeNamesJsonList[certificateAlternativeNamesIndex].AsString(m_certificateAlternativeNames[certificateAlternativeNamesIndex]);
}
payload.WithArray("certificateAlternativeNames", std::move(certificateAlternativeNamesJsonList));
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateLoadBalancerTlsCertificateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateLoadBalancerTlsCertificate"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateLoadBalancerTlsCertificateResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateLoadBalancerTlsCertificateResult::CreateLoadBalancerTlsCertificateResult()
{
}
CreateLoadBalancerTlsCertificateResult::CreateLoadBalancerTlsCertificateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateLoadBalancerTlsCertificateResult& CreateLoadBalancerTlsCertificateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseFromSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateRelationalDatabaseFromSnapshotRequest::CreateRelationalDatabaseFromSnapshotRequest() :
m_relationalDatabaseNameHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_publiclyAccessible(false),
m_publiclyAccessibleHasBeenSet(false),
m_relationalDatabaseSnapshotNameHasBeenSet(false),
m_relationalDatabaseBundleIdHasBeenSet(false),
m_sourceRelationalDatabaseNameHasBeenSet(false),
m_restoreTimeHasBeenSet(false),
m_useLatestRestorableTime(false),
m_useLatestRestorableTimeHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateRelationalDatabaseFromSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_relationalDatabaseNameHasBeenSet)
{
payload.WithString("relationalDatabaseName", m_relationalDatabaseName);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_publiclyAccessibleHasBeenSet)
{
payload.WithBool("publiclyAccessible", m_publiclyAccessible);
}
if(m_relationalDatabaseSnapshotNameHasBeenSet)
{
payload.WithString("relationalDatabaseSnapshotName", m_relationalDatabaseSnapshotName);
}
if(m_relationalDatabaseBundleIdHasBeenSet)
{
payload.WithString("relationalDatabaseBundleId", m_relationalDatabaseBundleId);
}
if(m_sourceRelationalDatabaseNameHasBeenSet)
{
payload.WithString("sourceRelationalDatabaseName", m_sourceRelationalDatabaseName);
}
if(m_restoreTimeHasBeenSet)
{
payload.WithDouble("restoreTime", m_restoreTime.SecondsWithMSPrecision());
}
if(m_useLatestRestorableTimeHasBeenSet)
{
payload.WithBool("useLatestRestorableTime", m_useLatestRestorableTime);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateRelationalDatabaseFromSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateRelationalDatabaseFromSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseFromSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateRelationalDatabaseFromSnapshotResult::CreateRelationalDatabaseFromSnapshotResult()
{
}
CreateRelationalDatabaseFromSnapshotResult::CreateRelationalDatabaseFromSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateRelationalDatabaseFromSnapshotResult& CreateRelationalDatabaseFromSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,119 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateRelationalDatabaseRequest::CreateRelationalDatabaseRequest() :
m_relationalDatabaseNameHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_relationalDatabaseBlueprintIdHasBeenSet(false),
m_relationalDatabaseBundleIdHasBeenSet(false),
m_masterDatabaseNameHasBeenSet(false),
m_masterUsernameHasBeenSet(false),
m_masterUserPasswordHasBeenSet(false),
m_preferredBackupWindowHasBeenSet(false),
m_preferredMaintenanceWindowHasBeenSet(false),
m_publiclyAccessible(false),
m_publiclyAccessibleHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateRelationalDatabaseRequest::SerializePayload() const
{
JsonValue payload;
if(m_relationalDatabaseNameHasBeenSet)
{
payload.WithString("relationalDatabaseName", m_relationalDatabaseName);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("availabilityZone", m_availabilityZone);
}
if(m_relationalDatabaseBlueprintIdHasBeenSet)
{
payload.WithString("relationalDatabaseBlueprintId", m_relationalDatabaseBlueprintId);
}
if(m_relationalDatabaseBundleIdHasBeenSet)
{
payload.WithString("relationalDatabaseBundleId", m_relationalDatabaseBundleId);
}
if(m_masterDatabaseNameHasBeenSet)
{
payload.WithString("masterDatabaseName", m_masterDatabaseName);
}
if(m_masterUsernameHasBeenSet)
{
payload.WithString("masterUsername", m_masterUsername);
}
if(m_masterUserPasswordHasBeenSet)
{
payload.WithString("masterUserPassword", m_masterUserPassword);
}
if(m_preferredBackupWindowHasBeenSet)
{
payload.WithString("preferredBackupWindow", m_preferredBackupWindow);
}
if(m_preferredMaintenanceWindowHasBeenSet)
{
payload.WithString("preferredMaintenanceWindow", m_preferredMaintenanceWindow);
}
if(m_publiclyAccessibleHasBeenSet)
{
payload.WithBool("publiclyAccessible", m_publiclyAccessible);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateRelationalDatabaseRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateRelationalDatabase"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateRelationalDatabaseResult::CreateRelationalDatabaseResult()
{
}
CreateRelationalDatabaseResult::CreateRelationalDatabaseResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateRelationalDatabaseResult& CreateRelationalDatabaseResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateRelationalDatabaseSnapshotRequest::CreateRelationalDatabaseSnapshotRequest() :
m_relationalDatabaseNameHasBeenSet(false),
m_relationalDatabaseSnapshotNameHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateRelationalDatabaseSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_relationalDatabaseNameHasBeenSet)
{
payload.WithString("relationalDatabaseName", m_relationalDatabaseName);
}
if(m_relationalDatabaseSnapshotNameHasBeenSet)
{
payload.WithString("relationalDatabaseSnapshotName", m_relationalDatabaseSnapshotName);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateRelationalDatabaseSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.CreateRelationalDatabaseSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/CreateRelationalDatabaseSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateRelationalDatabaseSnapshotResult::CreateRelationalDatabaseSnapshotResult()
{
}
CreateRelationalDatabaseSnapshotResult::CreateRelationalDatabaseSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateRelationalDatabaseSnapshotResult& CreateRelationalDatabaseSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteAlarmRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAlarmRequest::DeleteAlarmRequest() :
m_alarmNameHasBeenSet(false)
{
}
Aws::String DeleteAlarmRequest::SerializePayload() const
{
JsonValue payload;
if(m_alarmNameHasBeenSet)
{
payload.WithString("alarmName", m_alarmName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAlarmRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteAlarm"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteAlarmResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteAlarmResult::DeleteAlarmResult()
{
}
DeleteAlarmResult::DeleteAlarmResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteAlarmResult& DeleteAlarmResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteAutoSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAutoSnapshotRequest::DeleteAutoSnapshotRequest() :
m_resourceNameHasBeenSet(false),
m_dateHasBeenSet(false)
{
}
Aws::String DeleteAutoSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceNameHasBeenSet)
{
payload.WithString("resourceName", m_resourceName);
}
if(m_dateHasBeenSet)
{
payload.WithString("date", m_date);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAutoSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteAutoSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteAutoSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteAutoSnapshotResult::DeleteAutoSnapshotResult()
{
}
DeleteAutoSnapshotResult::DeleteAutoSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteAutoSnapshotResult& DeleteAutoSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteCertificateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteCertificateRequest::DeleteCertificateRequest() :
m_certificateNameHasBeenSet(false)
{
}
Aws::String DeleteCertificateRequest::SerializePayload() const
{
JsonValue payload;
if(m_certificateNameHasBeenSet)
{
payload.WithString("certificateName", m_certificateName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteCertificateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteCertificate"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteCertificateResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteCertificateResult::DeleteCertificateResult()
{
}
DeleteCertificateResult::DeleteCertificateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteCertificateResult& DeleteCertificateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteContactMethodRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteContactMethodRequest::DeleteContactMethodRequest() :
m_protocol(ContactProtocol::NOT_SET),
m_protocolHasBeenSet(false)
{
}
Aws::String DeleteContactMethodRequest::SerializePayload() const
{
JsonValue payload;
if(m_protocolHasBeenSet)
{
payload.WithString("protocol", ContactProtocolMapper::GetNameForContactProtocol(m_protocol));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteContactMethodRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteContactMethod"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteContactMethodResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteContactMethodResult::DeleteContactMethodResult()
{
}
DeleteContactMethodResult::DeleteContactMethodResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteContactMethodResult& DeleteContactMethodResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteDiskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteDiskRequest::DeleteDiskRequest() :
m_diskNameHasBeenSet(false),
m_forceDeleteAddOns(false),
m_forceDeleteAddOnsHasBeenSet(false)
{
}
Aws::String DeleteDiskRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskNameHasBeenSet)
{
payload.WithString("diskName", m_diskName);
}
if(m_forceDeleteAddOnsHasBeenSet)
{
payload.WithBool("forceDeleteAddOns", m_forceDeleteAddOns);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteDiskRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteDisk"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteDiskResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteDiskResult::DeleteDiskResult()
{
}
DeleteDiskResult::DeleteDiskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteDiskResult& DeleteDiskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteDiskSnapshotRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteDiskSnapshotRequest::DeleteDiskSnapshotRequest() :
m_diskSnapshotNameHasBeenSet(false)
{
}
Aws::String DeleteDiskSnapshotRequest::SerializePayload() const
{
JsonValue payload;
if(m_diskSnapshotNameHasBeenSet)
{
payload.WithString("diskSnapshotName", m_diskSnapshotName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteDiskSnapshotRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Lightsail_20161128.DeleteDiskSnapshot"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lightsail/model/DeleteDiskSnapshotResult.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::Lightsail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteDiskSnapshotResult::DeleteDiskSnapshotResult()
{
}
DeleteDiskSnapshotResult::DeleteDiskSnapshotResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteDiskSnapshotResult& DeleteDiskSnapshotResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("operations"))
{
Array<JsonView> operationsJsonList = jsonValue.GetArray("operations");
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
m_operations.push_back(operationsJsonList[operationsIndex].AsObject());
}
}
return *this;
}

Some files were not shown because too many files have changed in this diff Show More