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

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

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/CallInstructionsMessageType.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
CallInstructionsMessageType::CallInstructionsMessageType() :
m_textHasBeenSet(false)
{
}
CallInstructionsMessageType::CallInstructionsMessageType(JsonView jsonValue) :
m_textHasBeenSet(false)
{
*this = jsonValue;
}
CallInstructionsMessageType& CallInstructionsMessageType::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Text"))
{
m_text = jsonValue.GetString("Text");
m_textHasBeenSet = true;
}
return *this;
}
JsonValue CallInstructionsMessageType::Jsonize() const
{
JsonValue payload;
if(m_textHasBeenSet)
{
payload.WithString("Text", m_text);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // 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/sms-voice/model/CloudWatchLogsDestination.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
CloudWatchLogsDestination::CloudWatchLogsDestination() :
m_iamRoleArnHasBeenSet(false),
m_logGroupArnHasBeenSet(false)
{
}
CloudWatchLogsDestination::CloudWatchLogsDestination(JsonView jsonValue) :
m_iamRoleArnHasBeenSet(false),
m_logGroupArnHasBeenSet(false)
{
*this = jsonValue;
}
CloudWatchLogsDestination& CloudWatchLogsDestination::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("LogGroupArn"))
{
m_logGroupArn = jsonValue.GetString("LogGroupArn");
m_logGroupArnHasBeenSet = true;
}
return *this;
}
JsonValue CloudWatchLogsDestination::Jsonize() const
{
JsonValue payload;
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
if(m_logGroupArnHasBeenSet)
{
payload.WithString("LogGroupArn", m_logGroupArn);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // 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/sms-voice/model/CreateConfigurationSetEventDestinationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateConfigurationSetEventDestinationRequest::CreateConfigurationSetEventDestinationRequest() :
m_configurationSetNameHasBeenSet(false),
m_eventDestinationHasBeenSet(false),
m_eventDestinationNameHasBeenSet(false)
{
}
Aws::String CreateConfigurationSetEventDestinationRequest::SerializePayload() const
{
JsonValue payload;
if(m_eventDestinationHasBeenSet)
{
payload.WithObject("EventDestination", m_eventDestination.Jsonize());
}
if(m_eventDestinationNameHasBeenSet)
{
payload.WithString("EventDestinationName", m_eventDestinationName);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/CreateConfigurationSetEventDestinationResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateConfigurationSetEventDestinationResult::CreateConfigurationSetEventDestinationResult()
{
}
CreateConfigurationSetEventDestinationResult::CreateConfigurationSetEventDestinationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateConfigurationSetEventDestinationResult& CreateConfigurationSetEventDestinationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/CreateConfigurationSetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateConfigurationSetRequest::CreateConfigurationSetRequest() :
m_configurationSetNameHasBeenSet(false)
{
}
Aws::String CreateConfigurationSetRequest::SerializePayload() const
{
JsonValue payload;
if(m_configurationSetNameHasBeenSet)
{
payload.WithString("ConfigurationSetName", m_configurationSetName);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/CreateConfigurationSetResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateConfigurationSetResult::CreateConfigurationSetResult()
{
}
CreateConfigurationSetResult::CreateConfigurationSetResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateConfigurationSetResult& CreateConfigurationSetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

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

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/DeleteConfigurationSetEventDestinationResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteConfigurationSetEventDestinationResult::DeleteConfigurationSetEventDestinationResult()
{
}
DeleteConfigurationSetEventDestinationResult::DeleteConfigurationSetEventDestinationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteConfigurationSetEventDestinationResult& DeleteConfigurationSetEventDestinationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

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

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/DeleteConfigurationSetResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteConfigurationSetResult::DeleteConfigurationSetResult()
{
}
DeleteConfigurationSetResult::DeleteConfigurationSetResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteConfigurationSetResult& DeleteConfigurationSetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,144 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/EventDestination.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
EventDestination::EventDestination() :
m_cloudWatchLogsDestinationHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_kinesisFirehoseDestinationHasBeenSet(false),
m_matchingEventTypesHasBeenSet(false),
m_nameHasBeenSet(false),
m_snsDestinationHasBeenSet(false)
{
}
EventDestination::EventDestination(JsonView jsonValue) :
m_cloudWatchLogsDestinationHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_kinesisFirehoseDestinationHasBeenSet(false),
m_matchingEventTypesHasBeenSet(false),
m_nameHasBeenSet(false),
m_snsDestinationHasBeenSet(false)
{
*this = jsonValue;
}
EventDestination& EventDestination::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CloudWatchLogsDestination"))
{
m_cloudWatchLogsDestination = jsonValue.GetObject("CloudWatchLogsDestination");
m_cloudWatchLogsDestinationHasBeenSet = true;
}
if(jsonValue.ValueExists("Enabled"))
{
m_enabled = jsonValue.GetBool("Enabled");
m_enabledHasBeenSet = true;
}
if(jsonValue.ValueExists("KinesisFirehoseDestination"))
{
m_kinesisFirehoseDestination = jsonValue.GetObject("KinesisFirehoseDestination");
m_kinesisFirehoseDestinationHasBeenSet = true;
}
if(jsonValue.ValueExists("MatchingEventTypes"))
{
Array<JsonView> matchingEventTypesJsonList = jsonValue.GetArray("MatchingEventTypes");
for(unsigned matchingEventTypesIndex = 0; matchingEventTypesIndex < matchingEventTypesJsonList.GetLength(); ++matchingEventTypesIndex)
{
m_matchingEventTypes.push_back(EventTypeMapper::GetEventTypeForName(matchingEventTypesJsonList[matchingEventTypesIndex].AsString()));
}
m_matchingEventTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("SnsDestination"))
{
m_snsDestination = jsonValue.GetObject("SnsDestination");
m_snsDestinationHasBeenSet = true;
}
return *this;
}
JsonValue EventDestination::Jsonize() const
{
JsonValue payload;
if(m_cloudWatchLogsDestinationHasBeenSet)
{
payload.WithObject("CloudWatchLogsDestination", m_cloudWatchLogsDestination.Jsonize());
}
if(m_enabledHasBeenSet)
{
payload.WithBool("Enabled", m_enabled);
}
if(m_kinesisFirehoseDestinationHasBeenSet)
{
payload.WithObject("KinesisFirehoseDestination", m_kinesisFirehoseDestination.Jsonize());
}
if(m_matchingEventTypesHasBeenSet)
{
Array<JsonValue> matchingEventTypesJsonList(m_matchingEventTypes.size());
for(unsigned matchingEventTypesIndex = 0; matchingEventTypesIndex < matchingEventTypesJsonList.GetLength(); ++matchingEventTypesIndex)
{
matchingEventTypesJsonList[matchingEventTypesIndex].AsString(EventTypeMapper::GetNameForEventType(m_matchingEventTypes[matchingEventTypesIndex]));
}
payload.WithArray("MatchingEventTypes", std::move(matchingEventTypesJsonList));
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_snsDestinationHasBeenSet)
{
payload.WithObject("SnsDestination", m_snsDestination.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/EventDestinationDefinition.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
EventDestinationDefinition::EventDestinationDefinition() :
m_cloudWatchLogsDestinationHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_kinesisFirehoseDestinationHasBeenSet(false),
m_matchingEventTypesHasBeenSet(false),
m_snsDestinationHasBeenSet(false)
{
}
EventDestinationDefinition::EventDestinationDefinition(JsonView jsonValue) :
m_cloudWatchLogsDestinationHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_kinesisFirehoseDestinationHasBeenSet(false),
m_matchingEventTypesHasBeenSet(false),
m_snsDestinationHasBeenSet(false)
{
*this = jsonValue;
}
EventDestinationDefinition& EventDestinationDefinition::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CloudWatchLogsDestination"))
{
m_cloudWatchLogsDestination = jsonValue.GetObject("CloudWatchLogsDestination");
m_cloudWatchLogsDestinationHasBeenSet = true;
}
if(jsonValue.ValueExists("Enabled"))
{
m_enabled = jsonValue.GetBool("Enabled");
m_enabledHasBeenSet = true;
}
if(jsonValue.ValueExists("KinesisFirehoseDestination"))
{
m_kinesisFirehoseDestination = jsonValue.GetObject("KinesisFirehoseDestination");
m_kinesisFirehoseDestinationHasBeenSet = true;
}
if(jsonValue.ValueExists("MatchingEventTypes"))
{
Array<JsonView> matchingEventTypesJsonList = jsonValue.GetArray("MatchingEventTypes");
for(unsigned matchingEventTypesIndex = 0; matchingEventTypesIndex < matchingEventTypesJsonList.GetLength(); ++matchingEventTypesIndex)
{
m_matchingEventTypes.push_back(EventTypeMapper::GetEventTypeForName(matchingEventTypesJsonList[matchingEventTypesIndex].AsString()));
}
m_matchingEventTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("SnsDestination"))
{
m_snsDestination = jsonValue.GetObject("SnsDestination");
m_snsDestinationHasBeenSet = true;
}
return *this;
}
JsonValue EventDestinationDefinition::Jsonize() const
{
JsonValue payload;
if(m_cloudWatchLogsDestinationHasBeenSet)
{
payload.WithObject("CloudWatchLogsDestination", m_cloudWatchLogsDestination.Jsonize());
}
if(m_enabledHasBeenSet)
{
payload.WithBool("Enabled", m_enabled);
}
if(m_kinesisFirehoseDestinationHasBeenSet)
{
payload.WithObject("KinesisFirehoseDestination", m_kinesisFirehoseDestination.Jsonize());
}
if(m_matchingEventTypesHasBeenSet)
{
Array<JsonValue> matchingEventTypesJsonList(m_matchingEventTypes.size());
for(unsigned matchingEventTypesIndex = 0; matchingEventTypesIndex < matchingEventTypesJsonList.GetLength(); ++matchingEventTypesIndex)
{
matchingEventTypesJsonList[matchingEventTypesIndex].AsString(EventTypeMapper::GetNameForEventType(m_matchingEventTypes[matchingEventTypesIndex]));
}
payload.WithArray("MatchingEventTypes", std::move(matchingEventTypesJsonList));
}
if(m_snsDestinationHasBeenSet)
{
payload.WithObject("SnsDestination", m_snsDestination.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // 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/sms-voice/model/EventType.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 PinpointSMSVoice
{
namespace Model
{
namespace EventTypeMapper
{
static const int INITIATED_CALL_HASH = HashingUtils::HashString("INITIATED_CALL");
static const int RINGING_HASH = HashingUtils::HashString("RINGING");
static const int ANSWERED_HASH = HashingUtils::HashString("ANSWERED");
static const int COMPLETED_CALL_HASH = HashingUtils::HashString("COMPLETED_CALL");
static const int BUSY_HASH = HashingUtils::HashString("BUSY");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
static const int NO_ANSWER_HASH = HashingUtils::HashString("NO_ANSWER");
EventType GetEventTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == INITIATED_CALL_HASH)
{
return EventType::INITIATED_CALL;
}
else if (hashCode == RINGING_HASH)
{
return EventType::RINGING;
}
else if (hashCode == ANSWERED_HASH)
{
return EventType::ANSWERED;
}
else if (hashCode == COMPLETED_CALL_HASH)
{
return EventType::COMPLETED_CALL;
}
else if (hashCode == BUSY_HASH)
{
return EventType::BUSY;
}
else if (hashCode == FAILED_HASH)
{
return EventType::FAILED;
}
else if (hashCode == NO_ANSWER_HASH)
{
return EventType::NO_ANSWER;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EventType>(hashCode);
}
return EventType::NOT_SET;
}
Aws::String GetNameForEventType(EventType enumValue)
{
switch(enumValue)
{
case EventType::INITIATED_CALL:
return "INITIATED_CALL";
case EventType::RINGING:
return "RINGING";
case EventType::ANSWERED:
return "ANSWERED";
case EventType::COMPLETED_CALL:
return "COMPLETED_CALL";
case EventType::BUSY:
return "BUSY";
case EventType::FAILED:
return "FAILED";
case EventType::NO_ANSWER:
return "NO_ANSWER";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EventTypeMapper
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws

View File

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

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/GetConfigurationSetEventDestinationsResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetConfigurationSetEventDestinationsResult::GetConfigurationSetEventDestinationsResult()
{
}
GetConfigurationSetEventDestinationsResult::GetConfigurationSetEventDestinationsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetConfigurationSetEventDestinationsResult& GetConfigurationSetEventDestinationsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("EventDestinations"))
{
Array<JsonView> eventDestinationsJsonList = jsonValue.GetArray("EventDestinations");
for(unsigned eventDestinationsIndex = 0; eventDestinationsIndex < eventDestinationsJsonList.GetLength(); ++eventDestinationsIndex)
{
m_eventDestinations.push_back(eventDestinationsJsonList[eventDestinationsIndex].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/sms-voice/model/KinesisFirehoseDestination.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
KinesisFirehoseDestination::KinesisFirehoseDestination() :
m_deliveryStreamArnHasBeenSet(false),
m_iamRoleArnHasBeenSet(false)
{
}
KinesisFirehoseDestination::KinesisFirehoseDestination(JsonView jsonValue) :
m_deliveryStreamArnHasBeenSet(false),
m_iamRoleArnHasBeenSet(false)
{
*this = jsonValue;
}
KinesisFirehoseDestination& KinesisFirehoseDestination::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("DeliveryStreamArn"))
{
m_deliveryStreamArn = jsonValue.GetString("DeliveryStreamArn");
m_deliveryStreamArnHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRoleArn"))
{
m_iamRoleArn = jsonValue.GetString("IamRoleArn");
m_iamRoleArnHasBeenSet = true;
}
return *this;
}
JsonValue KinesisFirehoseDestination::Jsonize() const
{
JsonValue payload;
if(m_deliveryStreamArnHasBeenSet)
{
payload.WithString("DeliveryStreamArn", m_deliveryStreamArn);
}
if(m_iamRoleArnHasBeenSet)
{
payload.WithString("IamRoleArn", m_iamRoleArn);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws

View File

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

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/ListConfigurationSetsResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListConfigurationSetsResult::ListConfigurationSetsResult()
{
}
ListConfigurationSetsResult::ListConfigurationSetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListConfigurationSetsResult& ListConfigurationSetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ConfigurationSets"))
{
Array<JsonView> configurationSetsJsonList = jsonValue.GetArray("ConfigurationSets");
for(unsigned configurationSetsIndex = 0; configurationSetsIndex < configurationSetsJsonList.GetLength(); ++configurationSetsIndex)
{
m_configurationSets.push_back(configurationSetsJsonList[configurationSetsIndex].AsString());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/PlainTextMessageType.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
PlainTextMessageType::PlainTextMessageType() :
m_languageCodeHasBeenSet(false),
m_textHasBeenSet(false),
m_voiceIdHasBeenSet(false)
{
}
PlainTextMessageType::PlainTextMessageType(JsonView jsonValue) :
m_languageCodeHasBeenSet(false),
m_textHasBeenSet(false),
m_voiceIdHasBeenSet(false)
{
*this = jsonValue;
}
PlainTextMessageType& PlainTextMessageType::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = jsonValue.GetString("LanguageCode");
m_languageCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("Text"))
{
m_text = jsonValue.GetString("Text");
m_textHasBeenSet = true;
}
if(jsonValue.ValueExists("VoiceId"))
{
m_voiceId = jsonValue.GetString("VoiceId");
m_voiceIdHasBeenSet = true;
}
return *this;
}
JsonValue PlainTextMessageType::Jsonize() const
{
JsonValue payload;
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", m_languageCode);
}
if(m_textHasBeenSet)
{
payload.WithString("Text", m_text);
}
if(m_voiceIdHasBeenSet)
{
payload.WithString("VoiceId", m_voiceId);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/SSMLMessageType.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
SSMLMessageType::SSMLMessageType() :
m_languageCodeHasBeenSet(false),
m_textHasBeenSet(false),
m_voiceIdHasBeenSet(false)
{
}
SSMLMessageType::SSMLMessageType(JsonView jsonValue) :
m_languageCodeHasBeenSet(false),
m_textHasBeenSet(false),
m_voiceIdHasBeenSet(false)
{
*this = jsonValue;
}
SSMLMessageType& SSMLMessageType::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = jsonValue.GetString("LanguageCode");
m_languageCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("Text"))
{
m_text = jsonValue.GetString("Text");
m_textHasBeenSet = true;
}
if(jsonValue.ValueExists("VoiceId"))
{
m_voiceId = jsonValue.GetString("VoiceId");
m_voiceIdHasBeenSet = true;
}
return *this;
}
JsonValue SSMLMessageType::Jsonize() const
{
JsonValue payload;
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", m_languageCode);
}
if(m_textHasBeenSet)
{
payload.WithString("Text", m_text);
}
if(m_voiceIdHasBeenSet)
{
payload.WithString("VoiceId", m_voiceId);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // 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/sms-voice/model/SendVoiceMessageRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SendVoiceMessageRequest::SendVoiceMessageRequest() :
m_callerIdHasBeenSet(false),
m_configurationSetNameHasBeenSet(false),
m_contentHasBeenSet(false),
m_destinationPhoneNumberHasBeenSet(false),
m_originationPhoneNumberHasBeenSet(false)
{
}
Aws::String SendVoiceMessageRequest::SerializePayload() const
{
JsonValue payload;
if(m_callerIdHasBeenSet)
{
payload.WithString("CallerId", m_callerId);
}
if(m_configurationSetNameHasBeenSet)
{
payload.WithString("ConfigurationSetName", m_configurationSetName);
}
if(m_contentHasBeenSet)
{
payload.WithObject("Content", m_content.Jsonize());
}
if(m_destinationPhoneNumberHasBeenSet)
{
payload.WithString("DestinationPhoneNumber", m_destinationPhoneNumber);
}
if(m_originationPhoneNumberHasBeenSet)
{
payload.WithString("OriginationPhoneNumber", m_originationPhoneNumber);
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/SnsDestination.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
SnsDestination::SnsDestination() :
m_topicArnHasBeenSet(false)
{
}
SnsDestination::SnsDestination(JsonView jsonValue) :
m_topicArnHasBeenSet(false)
{
*this = jsonValue;
}
SnsDestination& SnsDestination::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("TopicArn"))
{
m_topicArn = jsonValue.GetString("TopicArn");
m_topicArnHasBeenSet = true;
}
return *this;
}
JsonValue SnsDestination::Jsonize() const
{
JsonValue payload;
if(m_topicArnHasBeenSet)
{
payload.WithString("TopicArn", m_topicArn);
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/UpdateConfigurationSetEventDestinationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateConfigurationSetEventDestinationRequest::UpdateConfigurationSetEventDestinationRequest() :
m_configurationSetNameHasBeenSet(false),
m_eventDestinationHasBeenSet(false),
m_eventDestinationNameHasBeenSet(false)
{
}
Aws::String UpdateConfigurationSetEventDestinationRequest::SerializePayload() const
{
JsonValue payload;
if(m_eventDestinationHasBeenSet)
{
payload.WithObject("EventDestination", m_eventDestination.Jsonize());
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/UpdateConfigurationSetEventDestinationResult.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::PinpointSMSVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateConfigurationSetEventDestinationResult::UpdateConfigurationSetEventDestinationResult()
{
}
UpdateConfigurationSetEventDestinationResult::UpdateConfigurationSetEventDestinationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateConfigurationSetEventDestinationResult& UpdateConfigurationSetEventDestinationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sms-voice/model/VoiceMessageContent.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace PinpointSMSVoice
{
namespace Model
{
VoiceMessageContent::VoiceMessageContent() :
m_callInstructionsMessageHasBeenSet(false),
m_plainTextMessageHasBeenSet(false),
m_sSMLMessageHasBeenSet(false)
{
}
VoiceMessageContent::VoiceMessageContent(JsonView jsonValue) :
m_callInstructionsMessageHasBeenSet(false),
m_plainTextMessageHasBeenSet(false),
m_sSMLMessageHasBeenSet(false)
{
*this = jsonValue;
}
VoiceMessageContent& VoiceMessageContent::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CallInstructionsMessage"))
{
m_callInstructionsMessage = jsonValue.GetObject("CallInstructionsMessage");
m_callInstructionsMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("PlainTextMessage"))
{
m_plainTextMessage = jsonValue.GetObject("PlainTextMessage");
m_plainTextMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("SSMLMessage"))
{
m_sSMLMessage = jsonValue.GetObject("SSMLMessage");
m_sSMLMessageHasBeenSet = true;
}
return *this;
}
JsonValue VoiceMessageContent::Jsonize() const
{
JsonValue payload;
if(m_callInstructionsMessageHasBeenSet)
{
payload.WithObject("CallInstructionsMessage", m_callInstructionsMessage.Jsonize());
}
if(m_plainTextMessageHasBeenSet)
{
payload.WithObject("PlainTextMessage", m_plainTextMessage.Jsonize());
}
if(m_sSMLMessageHasBeenSet)
{
payload.WithObject("SSMLMessage", m_sSMLMessage.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace PinpointSMSVoice
} // namespace Aws