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,256 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/AccessControlRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
AccessControlRule::AccessControlRule() :
m_nameHasBeenSet(false),
m_effect(AccessControlRuleEffect::NOT_SET),
m_effectHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_ipRangesHasBeenSet(false),
m_notIpRangesHasBeenSet(false),
m_actionsHasBeenSet(false),
m_notActionsHasBeenSet(false),
m_userIdsHasBeenSet(false),
m_notUserIdsHasBeenSet(false),
m_dateCreatedHasBeenSet(false),
m_dateModifiedHasBeenSet(false)
{
}
AccessControlRule::AccessControlRule(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_effect(AccessControlRuleEffect::NOT_SET),
m_effectHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_ipRangesHasBeenSet(false),
m_notIpRangesHasBeenSet(false),
m_actionsHasBeenSet(false),
m_notActionsHasBeenSet(false),
m_userIdsHasBeenSet(false),
m_notUserIdsHasBeenSet(false),
m_dateCreatedHasBeenSet(false),
m_dateModifiedHasBeenSet(false)
{
*this = jsonValue;
}
AccessControlRule& AccessControlRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Effect"))
{
m_effect = AccessControlRuleEffectMapper::GetAccessControlRuleEffectForName(jsonValue.GetString("Effect"));
m_effectHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("IpRanges"))
{
Array<JsonView> ipRangesJsonList = jsonValue.GetArray("IpRanges");
for(unsigned ipRangesIndex = 0; ipRangesIndex < ipRangesJsonList.GetLength(); ++ipRangesIndex)
{
m_ipRanges.push_back(ipRangesJsonList[ipRangesIndex].AsString());
}
m_ipRangesHasBeenSet = true;
}
if(jsonValue.ValueExists("NotIpRanges"))
{
Array<JsonView> notIpRangesJsonList = jsonValue.GetArray("NotIpRanges");
for(unsigned notIpRangesIndex = 0; notIpRangesIndex < notIpRangesJsonList.GetLength(); ++notIpRangesIndex)
{
m_notIpRanges.push_back(notIpRangesJsonList[notIpRangesIndex].AsString());
}
m_notIpRangesHasBeenSet = true;
}
if(jsonValue.ValueExists("Actions"))
{
Array<JsonView> actionsJsonList = jsonValue.GetArray("Actions");
for(unsigned actionsIndex = 0; actionsIndex < actionsJsonList.GetLength(); ++actionsIndex)
{
m_actions.push_back(actionsJsonList[actionsIndex].AsString());
}
m_actionsHasBeenSet = true;
}
if(jsonValue.ValueExists("NotActions"))
{
Array<JsonView> notActionsJsonList = jsonValue.GetArray("NotActions");
for(unsigned notActionsIndex = 0; notActionsIndex < notActionsJsonList.GetLength(); ++notActionsIndex)
{
m_notActions.push_back(notActionsJsonList[notActionsIndex].AsString());
}
m_notActionsHasBeenSet = true;
}
if(jsonValue.ValueExists("UserIds"))
{
Array<JsonView> userIdsJsonList = jsonValue.GetArray("UserIds");
for(unsigned userIdsIndex = 0; userIdsIndex < userIdsJsonList.GetLength(); ++userIdsIndex)
{
m_userIds.push_back(userIdsJsonList[userIdsIndex].AsString());
}
m_userIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("NotUserIds"))
{
Array<JsonView> notUserIdsJsonList = jsonValue.GetArray("NotUserIds");
for(unsigned notUserIdsIndex = 0; notUserIdsIndex < notUserIdsJsonList.GetLength(); ++notUserIdsIndex)
{
m_notUserIds.push_back(notUserIdsJsonList[notUserIdsIndex].AsString());
}
m_notUserIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("DateCreated"))
{
m_dateCreated = jsonValue.GetDouble("DateCreated");
m_dateCreatedHasBeenSet = true;
}
if(jsonValue.ValueExists("DateModified"))
{
m_dateModified = jsonValue.GetDouble("DateModified");
m_dateModifiedHasBeenSet = true;
}
return *this;
}
JsonValue AccessControlRule::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_effectHasBeenSet)
{
payload.WithString("Effect", AccessControlRuleEffectMapper::GetNameForAccessControlRuleEffect(m_effect));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_ipRangesHasBeenSet)
{
Array<JsonValue> ipRangesJsonList(m_ipRanges.size());
for(unsigned ipRangesIndex = 0; ipRangesIndex < ipRangesJsonList.GetLength(); ++ipRangesIndex)
{
ipRangesJsonList[ipRangesIndex].AsString(m_ipRanges[ipRangesIndex]);
}
payload.WithArray("IpRanges", std::move(ipRangesJsonList));
}
if(m_notIpRangesHasBeenSet)
{
Array<JsonValue> notIpRangesJsonList(m_notIpRanges.size());
for(unsigned notIpRangesIndex = 0; notIpRangesIndex < notIpRangesJsonList.GetLength(); ++notIpRangesIndex)
{
notIpRangesJsonList[notIpRangesIndex].AsString(m_notIpRanges[notIpRangesIndex]);
}
payload.WithArray("NotIpRanges", std::move(notIpRangesJsonList));
}
if(m_actionsHasBeenSet)
{
Array<JsonValue> actionsJsonList(m_actions.size());
for(unsigned actionsIndex = 0; actionsIndex < actionsJsonList.GetLength(); ++actionsIndex)
{
actionsJsonList[actionsIndex].AsString(m_actions[actionsIndex]);
}
payload.WithArray("Actions", std::move(actionsJsonList));
}
if(m_notActionsHasBeenSet)
{
Array<JsonValue> notActionsJsonList(m_notActions.size());
for(unsigned notActionsIndex = 0; notActionsIndex < notActionsJsonList.GetLength(); ++notActionsIndex)
{
notActionsJsonList[notActionsIndex].AsString(m_notActions[notActionsIndex]);
}
payload.WithArray("NotActions", std::move(notActionsJsonList));
}
if(m_userIdsHasBeenSet)
{
Array<JsonValue> userIdsJsonList(m_userIds.size());
for(unsigned userIdsIndex = 0; userIdsIndex < userIdsJsonList.GetLength(); ++userIdsIndex)
{
userIdsJsonList[userIdsIndex].AsString(m_userIds[userIdsIndex]);
}
payload.WithArray("UserIds", std::move(userIdsJsonList));
}
if(m_notUserIdsHasBeenSet)
{
Array<JsonValue> notUserIdsJsonList(m_notUserIds.size());
for(unsigned notUserIdsIndex = 0; notUserIdsIndex < notUserIdsJsonList.GetLength(); ++notUserIdsIndex)
{
notUserIdsJsonList[notUserIdsIndex].AsString(m_notUserIds[notUserIdsIndex]);
}
payload.WithArray("NotUserIds", std::move(notUserIdsJsonList));
}
if(m_dateCreatedHasBeenSet)
{
payload.WithDouble("DateCreated", m_dateCreated.SecondsWithMSPrecision());
}
if(m_dateModifiedHasBeenSet)
{
payload.WithDouble("DateModified", m_dateModified.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/AccessControlRuleEffect.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 WorkMail
{
namespace Model
{
namespace AccessControlRuleEffectMapper
{
static const int ALLOW_HASH = HashingUtils::HashString("ALLOW");
static const int DENY_HASH = HashingUtils::HashString("DENY");
AccessControlRuleEffect GetAccessControlRuleEffectForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ALLOW_HASH)
{
return AccessControlRuleEffect::ALLOW;
}
else if (hashCode == DENY_HASH)
{
return AccessControlRuleEffect::DENY;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AccessControlRuleEffect>(hashCode);
}
return AccessControlRuleEffect::NOT_SET;
}
Aws::String GetNameForAccessControlRuleEffect(AccessControlRuleEffect enumValue)
{
switch(enumValue)
{
case AccessControlRuleEffect::ALLOW:
return "ALLOW";
case AccessControlRuleEffect::DENY:
return "DENY";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AccessControlRuleEffectMapper
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/AssociateDelegateToResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AssociateDelegateToResourceRequest::AssociateDelegateToResourceRequest() :
m_organizationIdHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_entityIdHasBeenSet(false)
{
}
Aws::String AssociateDelegateToResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AssociateDelegateToResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.AssociateDelegateToResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/AssociateDelegateToResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AssociateDelegateToResourceResult::AssociateDelegateToResourceResult()
{
}
AssociateDelegateToResourceResult::AssociateDelegateToResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AssociateDelegateToResourceResult& AssociateDelegateToResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/AssociateMemberToGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AssociateMemberToGroupRequest::AssociateMemberToGroupRequest() :
m_organizationIdHasBeenSet(false),
m_groupIdHasBeenSet(false),
m_memberIdHasBeenSet(false)
{
}
Aws::String AssociateMemberToGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_groupIdHasBeenSet)
{
payload.WithString("GroupId", m_groupId);
}
if(m_memberIdHasBeenSet)
{
payload.WithString("MemberId", m_memberId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AssociateMemberToGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.AssociateMemberToGroup"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/AssociateMemberToGroupResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AssociateMemberToGroupResult::AssociateMemberToGroupResult()
{
}
AssociateMemberToGroupResult::AssociateMemberToGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AssociateMemberToGroupResult& AssociateMemberToGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/BookingOptions.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
BookingOptions::BookingOptions() :
m_autoAcceptRequests(false),
m_autoAcceptRequestsHasBeenSet(false),
m_autoDeclineRecurringRequests(false),
m_autoDeclineRecurringRequestsHasBeenSet(false),
m_autoDeclineConflictingRequests(false),
m_autoDeclineConflictingRequestsHasBeenSet(false)
{
}
BookingOptions::BookingOptions(JsonView jsonValue) :
m_autoAcceptRequests(false),
m_autoAcceptRequestsHasBeenSet(false),
m_autoDeclineRecurringRequests(false),
m_autoDeclineRecurringRequestsHasBeenSet(false),
m_autoDeclineConflictingRequests(false),
m_autoDeclineConflictingRequestsHasBeenSet(false)
{
*this = jsonValue;
}
BookingOptions& BookingOptions::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AutoAcceptRequests"))
{
m_autoAcceptRequests = jsonValue.GetBool("AutoAcceptRequests");
m_autoAcceptRequestsHasBeenSet = true;
}
if(jsonValue.ValueExists("AutoDeclineRecurringRequests"))
{
m_autoDeclineRecurringRequests = jsonValue.GetBool("AutoDeclineRecurringRequests");
m_autoDeclineRecurringRequestsHasBeenSet = true;
}
if(jsonValue.ValueExists("AutoDeclineConflictingRequests"))
{
m_autoDeclineConflictingRequests = jsonValue.GetBool("AutoDeclineConflictingRequests");
m_autoDeclineConflictingRequestsHasBeenSet = true;
}
return *this;
}
JsonValue BookingOptions::Jsonize() const
{
JsonValue payload;
if(m_autoAcceptRequestsHasBeenSet)
{
payload.WithBool("AutoAcceptRequests", m_autoAcceptRequests);
}
if(m_autoDeclineRecurringRequestsHasBeenSet)
{
payload.WithBool("AutoDeclineRecurringRequests", m_autoDeclineRecurringRequests);
}
if(m_autoDeclineConflictingRequestsHasBeenSet)
{
payload.WithBool("AutoDeclineConflictingRequests", m_autoDeclineConflictingRequests);
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/CreateAliasRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateAliasRequest::CreateAliasRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_aliasHasBeenSet(false)
{
}
Aws::String CreateAliasRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_aliasHasBeenSet)
{
payload.WithString("Alias", m_alias);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateAliasRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.CreateAlias"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/CreateAliasResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateAliasResult::CreateAliasResult()
{
}
CreateAliasResult::CreateAliasResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateAliasResult& CreateAliasResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/CreateGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateGroupRequest::CreateGroupRequest() :
m_organizationIdHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
Aws::String CreateGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.CreateGroup"));
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/workmail/model/CreateGroupResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateGroupResult::CreateGroupResult()
{
}
CreateGroupResult::CreateGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateGroupResult& CreateGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("GroupId"))
{
m_groupId = jsonValue.GetString("GroupId");
}
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/workmail/model/CreateResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateResourceRequest::CreateResourceRequest() :
m_organizationIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_type(ResourceType::NOT_SET),
m_typeHasBeenSet(false)
{
}
Aws::String CreateResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", ResourceTypeMapper::GetNameForResourceType(m_type));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.CreateResource"));
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/workmail/model/CreateResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateResourceResult::CreateResourceResult()
{
}
CreateResourceResult::CreateResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateResourceResult& CreateResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
}
return *this;
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/CreateUserRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateUserRequest::CreateUserRequest() :
m_organizationIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_displayNameHasBeenSet(false),
m_passwordHasBeenSet(false)
{
}
Aws::String CreateUserRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_displayNameHasBeenSet)
{
payload.WithString("DisplayName", m_displayName);
}
if(m_passwordHasBeenSet)
{
payload.WithString("Password", m_password);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateUserRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.CreateUser"));
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/workmail/model/CreateUserResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateUserResult::CreateUserResult()
{
}
CreateUserResult::CreateUserResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateUserResult& CreateUserResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("UserId"))
{
m_userId = jsonValue.GetString("UserId");
}
return *this;
}

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/Delegate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Delegate::Delegate() :
m_idHasBeenSet(false),
m_type(MemberType::NOT_SET),
m_typeHasBeenSet(false)
{
}
Delegate::Delegate(JsonView jsonValue) :
m_idHasBeenSet(false),
m_type(MemberType::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
Delegate& Delegate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = MemberTypeMapper::GetMemberTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue Delegate::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", MemberTypeMapper::GetNameForMemberType(m_type));
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/DeleteAccessControlRuleRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAccessControlRuleRequest::DeleteAccessControlRuleRequest() :
m_organizationIdHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
Aws::String DeleteAccessControlRuleRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAccessControlRuleRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteAccessControlRule"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteAccessControlRuleResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteAccessControlRuleResult::DeleteAccessControlRuleResult()
{
}
DeleteAccessControlRuleResult::DeleteAccessControlRuleResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteAccessControlRuleResult& DeleteAccessControlRuleResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteAliasRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAliasRequest::DeleteAliasRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_aliasHasBeenSet(false)
{
}
Aws::String DeleteAliasRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_aliasHasBeenSet)
{
payload.WithString("Alias", m_alias);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAliasRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteAlias"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteAliasResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteAliasResult::DeleteAliasResult()
{
}
DeleteAliasResult::DeleteAliasResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteAliasResult& DeleteAliasResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteGroupRequest::DeleteGroupRequest() :
m_organizationIdHasBeenSet(false),
m_groupIdHasBeenSet(false)
{
}
Aws::String DeleteGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_groupIdHasBeenSet)
{
payload.WithString("GroupId", m_groupId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteGroup"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteGroupResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteGroupResult::DeleteGroupResult()
{
}
DeleteGroupResult::DeleteGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteGroupResult& DeleteGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteMailboxPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteMailboxPermissionsRequest::DeleteMailboxPermissionsRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_granteeIdHasBeenSet(false)
{
}
Aws::String DeleteMailboxPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_granteeIdHasBeenSet)
{
payload.WithString("GranteeId", m_granteeId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteMailboxPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteMailboxPermissions"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteMailboxPermissionsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteMailboxPermissionsResult::DeleteMailboxPermissionsResult()
{
}
DeleteMailboxPermissionsResult::DeleteMailboxPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteMailboxPermissionsResult& DeleteMailboxPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteResourceRequest::DeleteResourceRequest() :
m_organizationIdHasBeenSet(false),
m_resourceIdHasBeenSet(false)
{
}
Aws::String DeleteResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteResourceResult::DeleteResourceResult()
{
}
DeleteResourceResult::DeleteResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteResourceResult& DeleteResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteRetentionPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteRetentionPolicyRequest::DeleteRetentionPolicyRequest() :
m_organizationIdHasBeenSet(false),
m_idHasBeenSet(false)
{
}
Aws::String DeleteRetentionPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteRetentionPolicyRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteRetentionPolicy"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteRetentionPolicyResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteRetentionPolicyResult::DeleteRetentionPolicyResult()
{
}
DeleteRetentionPolicyResult::DeleteRetentionPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteRetentionPolicyResult& DeleteRetentionPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeleteUserRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteUserRequest::DeleteUserRequest() :
m_organizationIdHasBeenSet(false),
m_userIdHasBeenSet(false)
{
}
Aws::String DeleteUserRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteUserRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeleteUser"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeleteUserResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteUserResult::DeleteUserResult()
{
}
DeleteUserResult::DeleteUserResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteUserResult& DeleteUserResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DeregisterFromWorkMailRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeregisterFromWorkMailRequest::DeregisterFromWorkMailRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false)
{
}
Aws::String DeregisterFromWorkMailRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeregisterFromWorkMailRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DeregisterFromWorkMail"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DeregisterFromWorkMailResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeregisterFromWorkMailResult::DeregisterFromWorkMailResult()
{
}
DeregisterFromWorkMailResult::DeregisterFromWorkMailResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeregisterFromWorkMailResult& DeregisterFromWorkMailResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DescribeGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeGroupRequest::DescribeGroupRequest() :
m_organizationIdHasBeenSet(false),
m_groupIdHasBeenSet(false)
{
}
Aws::String DescribeGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_groupIdHasBeenSet)
{
payload.WithString("GroupId", m_groupId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DescribeGroup"));
return headers;
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DescribeGroupResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeGroupResult::DescribeGroupResult() :
m_state(EntityState::NOT_SET)
{
}
DescribeGroupResult::DescribeGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_state(EntityState::NOT_SET)
{
*this = result;
}
DescribeGroupResult& DescribeGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("GroupId"))
{
m_groupId = jsonValue.GetString("GroupId");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Email"))
{
m_email = jsonValue.GetString("Email");
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
}
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/workmail/model/DescribeOrganizationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeOrganizationRequest::DescribeOrganizationRequest() :
m_organizationIdHasBeenSet(false)
{
}
Aws::String DescribeOrganizationRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeOrganizationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DescribeOrganization"));
return headers;
}

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DescribeOrganizationResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeOrganizationResult::DescribeOrganizationResult()
{
}
DescribeOrganizationResult::DescribeOrganizationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeOrganizationResult& DescribeOrganizationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("OrganizationId"))
{
m_organizationId = jsonValue.GetString("OrganizationId");
}
if(jsonValue.ValueExists("Alias"))
{
m_alias = jsonValue.GetString("Alias");
}
if(jsonValue.ValueExists("State"))
{
m_state = jsonValue.GetString("State");
}
if(jsonValue.ValueExists("DirectoryId"))
{
m_directoryId = jsonValue.GetString("DirectoryId");
}
if(jsonValue.ValueExists("DirectoryType"))
{
m_directoryType = jsonValue.GetString("DirectoryType");
}
if(jsonValue.ValueExists("DefaultMailDomain"))
{
m_defaultMailDomain = jsonValue.GetString("DefaultMailDomain");
}
if(jsonValue.ValueExists("CompletedDate"))
{
m_completedDate = jsonValue.GetDouble("CompletedDate");
}
if(jsonValue.ValueExists("ErrorMessage"))
{
m_errorMessage = jsonValue.GetString("ErrorMessage");
}
if(jsonValue.ValueExists("ARN"))
{
m_aRN = jsonValue.GetString("ARN");
}
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/workmail/model/DescribeResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeResourceRequest::DescribeResourceRequest() :
m_organizationIdHasBeenSet(false),
m_resourceIdHasBeenSet(false)
{
}
Aws::String DescribeResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DescribeResource"));
return headers;
}

View File

@@ -0,0 +1,86 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DescribeResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeResourceResult::DescribeResourceResult() :
m_type(ResourceType::NOT_SET),
m_state(EntityState::NOT_SET)
{
}
DescribeResourceResult::DescribeResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_type(ResourceType::NOT_SET),
m_state(EntityState::NOT_SET)
{
*this = result;
}
DescribeResourceResult& DescribeResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
}
if(jsonValue.ValueExists("Email"))
{
m_email = jsonValue.GetString("Email");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Type"))
{
m_type = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("Type"));
}
if(jsonValue.ValueExists("BookingOptions"))
{
m_bookingOptions = jsonValue.GetObject("BookingOptions");
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
}
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/workmail/model/DescribeUserRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeUserRequest::DescribeUserRequest() :
m_organizationIdHasBeenSet(false),
m_userIdHasBeenSet(false)
{
}
Aws::String DescribeUserRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeUserRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DescribeUser"));
return headers;
}

View File

@@ -0,0 +1,86 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DescribeUserResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeUserResult::DescribeUserResult() :
m_state(EntityState::NOT_SET),
m_userRole(UserRole::NOT_SET)
{
}
DescribeUserResult::DescribeUserResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_state(EntityState::NOT_SET),
m_userRole(UserRole::NOT_SET)
{
*this = result;
}
DescribeUserResult& DescribeUserResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("UserId"))
{
m_userId = jsonValue.GetString("UserId");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Email"))
{
m_email = jsonValue.GetString("Email");
}
if(jsonValue.ValueExists("DisplayName"))
{
m_displayName = jsonValue.GetString("DisplayName");
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
}
if(jsonValue.ValueExists("UserRole"))
{
m_userRole = UserRoleMapper::GetUserRoleForName(jsonValue.GetString("UserRole"));
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
}
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/workmail/model/DisassociateDelegateFromResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DisassociateDelegateFromResourceRequest::DisassociateDelegateFromResourceRequest() :
m_organizationIdHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_entityIdHasBeenSet(false)
{
}
Aws::String DisassociateDelegateFromResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DisassociateDelegateFromResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DisassociateDelegateFromResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/DisassociateDelegateFromResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DisassociateDelegateFromResourceResult::DisassociateDelegateFromResourceResult()
{
}
DisassociateDelegateFromResourceResult::DisassociateDelegateFromResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DisassociateDelegateFromResourceResult& DisassociateDelegateFromResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/DisassociateMemberFromGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DisassociateMemberFromGroupRequest::DisassociateMemberFromGroupRequest() :
m_organizationIdHasBeenSet(false),
m_groupIdHasBeenSet(false),
m_memberIdHasBeenSet(false)
{
}
Aws::String DisassociateMemberFromGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_groupIdHasBeenSet)
{
payload.WithString("GroupId", m_groupId);
}
if(m_memberIdHasBeenSet)
{
payload.WithString("MemberId", m_memberId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DisassociateMemberFromGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.DisassociateMemberFromGroup"));
return headers;
}

View File

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

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/EntityState.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 WorkMail
{
namespace Model
{
namespace EntityStateMapper
{
static const int ENABLED_HASH = HashingUtils::HashString("ENABLED");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
static const int DELETED_HASH = HashingUtils::HashString("DELETED");
EntityState GetEntityStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ENABLED_HASH)
{
return EntityState::ENABLED;
}
else if (hashCode == DISABLED_HASH)
{
return EntityState::DISABLED;
}
else if (hashCode == DELETED_HASH)
{
return EntityState::DELETED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EntityState>(hashCode);
}
return EntityState::NOT_SET;
}
Aws::String GetNameForEntityState(EntityState enumValue)
{
switch(enumValue)
{
case EntityState::ENABLED:
return "ENABLED";
case EntityState::DISABLED:
return "DISABLED";
case EntityState::DELETED:
return "DELETED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EntityStateMapper
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/FolderConfiguration.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
FolderConfiguration::FolderConfiguration() :
m_name(FolderName::NOT_SET),
m_nameHasBeenSet(false),
m_action(RetentionAction::NOT_SET),
m_actionHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false)
{
}
FolderConfiguration::FolderConfiguration(JsonView jsonValue) :
m_name(FolderName::NOT_SET),
m_nameHasBeenSet(false),
m_action(RetentionAction::NOT_SET),
m_actionHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false)
{
*this = jsonValue;
}
FolderConfiguration& FolderConfiguration::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = FolderNameMapper::GetFolderNameForName(jsonValue.GetString("Name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Action"))
{
m_action = RetentionActionMapper::GetRetentionActionForName(jsonValue.GetString("Action"));
m_actionHasBeenSet = true;
}
if(jsonValue.ValueExists("Period"))
{
m_period = jsonValue.GetInteger("Period");
m_periodHasBeenSet = true;
}
return *this;
}
JsonValue FolderConfiguration::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", FolderNameMapper::GetNameForFolderName(m_name));
}
if(m_actionHasBeenSet)
{
payload.WithString("Action", RetentionActionMapper::GetNameForRetentionAction(m_action));
}
if(m_periodHasBeenSet)
{
payload.WithInteger("Period", m_period);
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/FolderName.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 WorkMail
{
namespace Model
{
namespace FolderNameMapper
{
static const int INBOX_HASH = HashingUtils::HashString("INBOX");
static const int DELETED_ITEMS_HASH = HashingUtils::HashString("DELETED_ITEMS");
static const int SENT_ITEMS_HASH = HashingUtils::HashString("SENT_ITEMS");
static const int DRAFTS_HASH = HashingUtils::HashString("DRAFTS");
static const int JUNK_EMAIL_HASH = HashingUtils::HashString("JUNK_EMAIL");
FolderName GetFolderNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == INBOX_HASH)
{
return FolderName::INBOX;
}
else if (hashCode == DELETED_ITEMS_HASH)
{
return FolderName::DELETED_ITEMS;
}
else if (hashCode == SENT_ITEMS_HASH)
{
return FolderName::SENT_ITEMS;
}
else if (hashCode == DRAFTS_HASH)
{
return FolderName::DRAFTS;
}
else if (hashCode == JUNK_EMAIL_HASH)
{
return FolderName::JUNK_EMAIL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<FolderName>(hashCode);
}
return FolderName::NOT_SET;
}
Aws::String GetNameForFolderName(FolderName enumValue)
{
switch(enumValue)
{
case FolderName::INBOX:
return "INBOX";
case FolderName::DELETED_ITEMS:
return "DELETED_ITEMS";
case FolderName::SENT_ITEMS:
return "SENT_ITEMS";
case FolderName::DRAFTS:
return "DRAFTS";
case FolderName::JUNK_EMAIL:
return "JUNK_EMAIL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace FolderNameMapper
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/GetAccessControlEffectRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetAccessControlEffectRequest::GetAccessControlEffectRequest() :
m_organizationIdHasBeenSet(false),
m_ipAddressHasBeenSet(false),
m_actionHasBeenSet(false),
m_userIdHasBeenSet(false)
{
}
Aws::String GetAccessControlEffectRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_ipAddressHasBeenSet)
{
payload.WithString("IpAddress", m_ipAddress);
}
if(m_actionHasBeenSet)
{
payload.WithString("Action", m_action);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetAccessControlEffectRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.GetAccessControlEffect"));
return headers;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/GetAccessControlEffectResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetAccessControlEffectResult::GetAccessControlEffectResult() :
m_effect(AccessControlRuleEffect::NOT_SET)
{
}
GetAccessControlEffectResult::GetAccessControlEffectResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_effect(AccessControlRuleEffect::NOT_SET)
{
*this = result;
}
GetAccessControlEffectResult& GetAccessControlEffectResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Effect"))
{
m_effect = AccessControlRuleEffectMapper::GetAccessControlRuleEffectForName(jsonValue.GetString("Effect"));
}
if(jsonValue.ValueExists("MatchedRules"))
{
Array<JsonView> matchedRulesJsonList = jsonValue.GetArray("MatchedRules");
for(unsigned matchedRulesIndex = 0; matchedRulesIndex < matchedRulesJsonList.GetLength(); ++matchedRulesIndex)
{
m_matchedRules.push_back(matchedRulesJsonList[matchedRulesIndex].AsString());
}
}
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/workmail/model/GetDefaultRetentionPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetDefaultRetentionPolicyRequest::GetDefaultRetentionPolicyRequest() :
m_organizationIdHasBeenSet(false)
{
}
Aws::String GetDefaultRetentionPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetDefaultRetentionPolicyRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.GetDefaultRetentionPolicy"));
return headers;
}

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/GetDefaultRetentionPolicyResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDefaultRetentionPolicyResult::GetDefaultRetentionPolicyResult()
{
}
GetDefaultRetentionPolicyResult::GetDefaultRetentionPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetDefaultRetentionPolicyResult& GetDefaultRetentionPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
}
if(jsonValue.ValueExists("FolderConfigurations"))
{
Array<JsonView> folderConfigurationsJsonList = jsonValue.GetArray("FolderConfigurations");
for(unsigned folderConfigurationsIndex = 0; folderConfigurationsIndex < folderConfigurationsJsonList.GetLength(); ++folderConfigurationsIndex)
{
m_folderConfigurations.push_back(folderConfigurationsJsonList[folderConfigurationsIndex].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/workmail/model/GetMailboxDetailsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetMailboxDetailsRequest::GetMailboxDetailsRequest() :
m_organizationIdHasBeenSet(false),
m_userIdHasBeenSet(false)
{
}
Aws::String GetMailboxDetailsRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetMailboxDetailsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.GetMailboxDetails"));
return headers;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/GetMailboxDetailsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetMailboxDetailsResult::GetMailboxDetailsResult() :
m_mailboxQuota(0),
m_mailboxSize(0.0)
{
}
GetMailboxDetailsResult::GetMailboxDetailsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_mailboxQuota(0),
m_mailboxSize(0.0)
{
*this = result;
}
GetMailboxDetailsResult& GetMailboxDetailsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("MailboxQuota"))
{
m_mailboxQuota = jsonValue.GetInteger("MailboxQuota");
}
if(jsonValue.ValueExists("MailboxSize"))
{
m_mailboxSize = jsonValue.GetDouble("MailboxSize");
}
return *this;
}

View File

@@ -0,0 +1,133 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/Group.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Group::Group() :
m_idHasBeenSet(false),
m_emailHasBeenSet(false),
m_nameHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
}
Group::Group(JsonView jsonValue) :
m_idHasBeenSet(false),
m_emailHasBeenSet(false),
m_nameHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
*this = jsonValue;
}
Group& Group::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Email"))
{
m_email = jsonValue.GetString("Email");
m_emailHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
m_enabledDateHasBeenSet = true;
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
m_disabledDateHasBeenSet = true;
}
return *this;
}
JsonValue Group::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_emailHasBeenSet)
{
payload.WithString("Email", m_email);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", EntityStateMapper::GetNameForEntityState(m_state));
}
if(m_enabledDateHasBeenSet)
{
payload.WithDouble("EnabledDate", m_enabledDate.SecondsWithMSPrecision());
}
if(m_disabledDateHasBeenSet)
{
payload.WithDouble("DisabledDate", m_disabledDate.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/ListAccessControlRulesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAccessControlRulesRequest::ListAccessControlRulesRequest() :
m_organizationIdHasBeenSet(false)
{
}
Aws::String ListAccessControlRulesRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAccessControlRulesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListAccessControlRules"));
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/workmail/model/ListAccessControlRulesResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAccessControlRulesResult::ListAccessControlRulesResult()
{
}
ListAccessControlRulesResult::ListAccessControlRulesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAccessControlRulesResult& ListAccessControlRulesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Rules"))
{
Array<JsonView> rulesJsonList = jsonValue.GetArray("Rules");
for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex)
{
m_rules.push_back(rulesJsonList[rulesIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListAliasesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAliasesRequest::ListAliasesRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAliasesRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAliasesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListAliases"));
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/workmail/model/ListAliasesResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAliasesResult::ListAliasesResult()
{
}
ListAliasesResult::ListAliasesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAliasesResult& ListAliasesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Aliases"))
{
Array<JsonView> aliasesJsonList = jsonValue.GetArray("Aliases");
for(unsigned aliasesIndex = 0; aliasesIndex < aliasesJsonList.GetLength(); ++aliasesIndex)
{
m_aliases.push_back(aliasesJsonList[aliasesIndex].AsString());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListGroupMembersRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListGroupMembersRequest::ListGroupMembersRequest() :
m_organizationIdHasBeenSet(false),
m_groupIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListGroupMembersRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_groupIdHasBeenSet)
{
payload.WithString("GroupId", m_groupId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListGroupMembersRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListGroupMembers"));
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/workmail/model/ListGroupMembersResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListGroupMembersResult::ListGroupMembersResult()
{
}
ListGroupMembersResult::ListGroupMembersResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListGroupMembersResult& ListGroupMembersResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Members"))
{
Array<JsonView> membersJsonList = jsonValue.GetArray("Members");
for(unsigned membersIndex = 0; membersIndex < membersJsonList.GetLength(); ++membersIndex)
{
m_members.push_back(membersJsonList[membersIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListGroupsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListGroupsRequest::ListGroupsRequest() :
m_organizationIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListGroupsRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListGroupsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListGroups"));
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/workmail/model/ListGroupsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListGroupsResult::ListGroupsResult()
{
}
ListGroupsResult::ListGroupsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListGroupsResult& ListGroupsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Groups"))
{
Array<JsonView> groupsJsonList = jsonValue.GetArray("Groups");
for(unsigned groupsIndex = 0; groupsIndex < groupsJsonList.GetLength(); ++groupsIndex)
{
m_groups.push_back(groupsJsonList[groupsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListMailboxPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListMailboxPermissionsRequest::ListMailboxPermissionsRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListMailboxPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListMailboxPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListMailboxPermissions"));
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/workmail/model/ListMailboxPermissionsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListMailboxPermissionsResult::ListMailboxPermissionsResult()
{
}
ListMailboxPermissionsResult::ListMailboxPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListMailboxPermissionsResult& ListMailboxPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("Permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(permissionsJsonList[permissionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/workmail/model/ListOrganizationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListOrganizationsRequest::ListOrganizationsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListOrganizationsRequest::SerializePayload() const
{
JsonValue payload;
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListOrganizationsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListOrganizations"));
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/workmail/model/ListOrganizationsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListOrganizationsResult::ListOrganizationsResult()
{
}
ListOrganizationsResult::ListOrganizationsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListOrganizationsResult& ListOrganizationsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("OrganizationSummaries"))
{
Array<JsonView> organizationSummariesJsonList = jsonValue.GetArray("OrganizationSummaries");
for(unsigned organizationSummariesIndex = 0; organizationSummariesIndex < organizationSummariesJsonList.GetLength(); ++organizationSummariesIndex)
{
m_organizationSummaries.push_back(organizationSummariesJsonList[organizationSummariesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListResourceDelegatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListResourceDelegatesRequest::ListResourceDelegatesRequest() :
m_organizationIdHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListResourceDelegatesRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListResourceDelegatesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListResourceDelegates"));
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/workmail/model/ListResourceDelegatesResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListResourceDelegatesResult::ListResourceDelegatesResult()
{
}
ListResourceDelegatesResult::ListResourceDelegatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListResourceDelegatesResult& ListResourceDelegatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Delegates"))
{
Array<JsonView> delegatesJsonList = jsonValue.GetArray("Delegates");
for(unsigned delegatesIndex = 0; delegatesIndex < delegatesJsonList.GetLength(); ++delegatesIndex)
{
m_delegates.push_back(delegatesJsonList[delegatesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListResourcesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListResourcesRequest::ListResourcesRequest() :
m_organizationIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListResourcesRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListResourcesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListResources"));
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/workmail/model/ListResourcesResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListResourcesResult::ListResourcesResult()
{
}
ListResourcesResult::ListResourcesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListResourcesResult& ListResourcesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Resources"))
{
Array<JsonView> resourcesJsonList = jsonValue.GetArray("Resources");
for(unsigned resourcesIndex = 0; resourcesIndex < resourcesJsonList.GetLength(); ++resourcesIndex)
{
m_resources.push_back(resourcesJsonList[resourcesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/workmail/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceARNHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceARNHasBeenSet)
{
payload.WithString("ResourceARN", m_resourceARN);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListTagsForResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListTagsForResource"));
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/workmail/model/ListTagsForResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("Tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/ListUsersRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListUsersRequest::ListUsersRequest() :
m_organizationIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListUsersRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListUsersRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ListUsers"));
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/workmail/model/ListUsersResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListUsersResult::ListUsersResult()
{
}
ListUsersResult::ListUsersResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListUsersResult& ListUsersResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Users"))
{
Array<JsonView> usersJsonList = jsonValue.GetArray("Users");
for(unsigned usersIndex = 0; usersIndex < usersJsonList.GetLength(); ++usersIndex)
{
m_users.push_back(usersJsonList[usersIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,134 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/Member.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Member::Member() :
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_type(MemberType::NOT_SET),
m_typeHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
}
Member::Member(JsonView jsonValue) :
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_type(MemberType::NOT_SET),
m_typeHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
*this = jsonValue;
}
Member& Member::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = MemberTypeMapper::GetMemberTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
m_enabledDateHasBeenSet = true;
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
m_disabledDateHasBeenSet = true;
}
return *this;
}
JsonValue Member::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", MemberTypeMapper::GetNameForMemberType(m_type));
}
if(m_stateHasBeenSet)
{
payload.WithString("State", EntityStateMapper::GetNameForEntityState(m_state));
}
if(m_enabledDateHasBeenSet)
{
payload.WithDouble("EnabledDate", m_enabledDate.SecondsWithMSPrecision());
}
if(m_disabledDateHasBeenSet)
{
payload.WithDouble("DisabledDate", m_disabledDate.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/MemberType.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 WorkMail
{
namespace Model
{
namespace MemberTypeMapper
{
static const int GROUP_HASH = HashingUtils::HashString("GROUP");
static const int USER_HASH = HashingUtils::HashString("USER");
MemberType GetMemberTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == GROUP_HASH)
{
return MemberType::GROUP;
}
else if (hashCode == USER_HASH)
{
return MemberType::USER;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<MemberType>(hashCode);
}
return MemberType::NOT_SET;
}
Aws::String GetNameForMemberType(MemberType enumValue)
{
switch(enumValue)
{
case MemberType::GROUP:
return "GROUP";
case MemberType::USER:
return "USER";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace MemberTypeMapper
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/OrganizationSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
OrganizationSummary::OrganizationSummary() :
m_organizationIdHasBeenSet(false),
m_aliasHasBeenSet(false),
m_errorMessageHasBeenSet(false),
m_stateHasBeenSet(false)
{
}
OrganizationSummary::OrganizationSummary(JsonView jsonValue) :
m_organizationIdHasBeenSet(false),
m_aliasHasBeenSet(false),
m_errorMessageHasBeenSet(false),
m_stateHasBeenSet(false)
{
*this = jsonValue;
}
OrganizationSummary& OrganizationSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("OrganizationId"))
{
m_organizationId = jsonValue.GetString("OrganizationId");
m_organizationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Alias"))
{
m_alias = jsonValue.GetString("Alias");
m_aliasHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorMessage"))
{
m_errorMessage = jsonValue.GetString("ErrorMessage");
m_errorMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = jsonValue.GetString("State");
m_stateHasBeenSet = true;
}
return *this;
}
JsonValue OrganizationSummary::Jsonize() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_aliasHasBeenSet)
{
payload.WithString("Alias", m_alias);
}
if(m_errorMessageHasBeenSet)
{
payload.WithString("ErrorMessage", m_errorMessage);
}
if(m_stateHasBeenSet)
{
payload.WithString("State", m_state);
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/Permission.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Permission::Permission() :
m_granteeIdHasBeenSet(false),
m_granteeType(MemberType::NOT_SET),
m_granteeTypeHasBeenSet(false),
m_permissionValuesHasBeenSet(false)
{
}
Permission::Permission(JsonView jsonValue) :
m_granteeIdHasBeenSet(false),
m_granteeType(MemberType::NOT_SET),
m_granteeTypeHasBeenSet(false),
m_permissionValuesHasBeenSet(false)
{
*this = jsonValue;
}
Permission& Permission::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("GranteeId"))
{
m_granteeId = jsonValue.GetString("GranteeId");
m_granteeIdHasBeenSet = true;
}
if(jsonValue.ValueExists("GranteeType"))
{
m_granteeType = MemberTypeMapper::GetMemberTypeForName(jsonValue.GetString("GranteeType"));
m_granteeTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("PermissionValues"))
{
Array<JsonView> permissionValuesJsonList = jsonValue.GetArray("PermissionValues");
for(unsigned permissionValuesIndex = 0; permissionValuesIndex < permissionValuesJsonList.GetLength(); ++permissionValuesIndex)
{
m_permissionValues.push_back(PermissionTypeMapper::GetPermissionTypeForName(permissionValuesJsonList[permissionValuesIndex].AsString()));
}
m_permissionValuesHasBeenSet = true;
}
return *this;
}
JsonValue Permission::Jsonize() const
{
JsonValue payload;
if(m_granteeIdHasBeenSet)
{
payload.WithString("GranteeId", m_granteeId);
}
if(m_granteeTypeHasBeenSet)
{
payload.WithString("GranteeType", MemberTypeMapper::GetNameForMemberType(m_granteeType));
}
if(m_permissionValuesHasBeenSet)
{
Array<JsonValue> permissionValuesJsonList(m_permissionValues.size());
for(unsigned permissionValuesIndex = 0; permissionValuesIndex < permissionValuesJsonList.GetLength(); ++permissionValuesIndex)
{
permissionValuesJsonList[permissionValuesIndex].AsString(PermissionTypeMapper::GetNameForPermissionType(m_permissionValues[permissionValuesIndex]));
}
payload.WithArray("PermissionValues", std::move(permissionValuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/PermissionType.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 WorkMail
{
namespace Model
{
namespace PermissionTypeMapper
{
static const int FULL_ACCESS_HASH = HashingUtils::HashString("FULL_ACCESS");
static const int SEND_AS_HASH = HashingUtils::HashString("SEND_AS");
static const int SEND_ON_BEHALF_HASH = HashingUtils::HashString("SEND_ON_BEHALF");
PermissionType GetPermissionTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == FULL_ACCESS_HASH)
{
return PermissionType::FULL_ACCESS;
}
else if (hashCode == SEND_AS_HASH)
{
return PermissionType::SEND_AS;
}
else if (hashCode == SEND_ON_BEHALF_HASH)
{
return PermissionType::SEND_ON_BEHALF;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PermissionType>(hashCode);
}
return PermissionType::NOT_SET;
}
Aws::String GetNameForPermissionType(PermissionType enumValue)
{
switch(enumValue)
{
case PermissionType::FULL_ACCESS:
return "FULL_ACCESS";
case PermissionType::SEND_AS:
return "SEND_AS";
case PermissionType::SEND_ON_BEHALF:
return "SEND_ON_BEHALF";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PermissionTypeMapper
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/PutAccessControlRuleRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutAccessControlRuleRequest::PutAccessControlRuleRequest() :
m_nameHasBeenSet(false),
m_effect(AccessControlRuleEffect::NOT_SET),
m_effectHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_ipRangesHasBeenSet(false),
m_notIpRangesHasBeenSet(false),
m_actionsHasBeenSet(false),
m_notActionsHasBeenSet(false),
m_userIdsHasBeenSet(false),
m_notUserIdsHasBeenSet(false),
m_organizationIdHasBeenSet(false)
{
}
Aws::String PutAccessControlRuleRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_effectHasBeenSet)
{
payload.WithString("Effect", AccessControlRuleEffectMapper::GetNameForAccessControlRuleEffect(m_effect));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_ipRangesHasBeenSet)
{
Array<JsonValue> ipRangesJsonList(m_ipRanges.size());
for(unsigned ipRangesIndex = 0; ipRangesIndex < ipRangesJsonList.GetLength(); ++ipRangesIndex)
{
ipRangesJsonList[ipRangesIndex].AsString(m_ipRanges[ipRangesIndex]);
}
payload.WithArray("IpRanges", std::move(ipRangesJsonList));
}
if(m_notIpRangesHasBeenSet)
{
Array<JsonValue> notIpRangesJsonList(m_notIpRanges.size());
for(unsigned notIpRangesIndex = 0; notIpRangesIndex < notIpRangesJsonList.GetLength(); ++notIpRangesIndex)
{
notIpRangesJsonList[notIpRangesIndex].AsString(m_notIpRanges[notIpRangesIndex]);
}
payload.WithArray("NotIpRanges", std::move(notIpRangesJsonList));
}
if(m_actionsHasBeenSet)
{
Array<JsonValue> actionsJsonList(m_actions.size());
for(unsigned actionsIndex = 0; actionsIndex < actionsJsonList.GetLength(); ++actionsIndex)
{
actionsJsonList[actionsIndex].AsString(m_actions[actionsIndex]);
}
payload.WithArray("Actions", std::move(actionsJsonList));
}
if(m_notActionsHasBeenSet)
{
Array<JsonValue> notActionsJsonList(m_notActions.size());
for(unsigned notActionsIndex = 0; notActionsIndex < notActionsJsonList.GetLength(); ++notActionsIndex)
{
notActionsJsonList[notActionsIndex].AsString(m_notActions[notActionsIndex]);
}
payload.WithArray("NotActions", std::move(notActionsJsonList));
}
if(m_userIdsHasBeenSet)
{
Array<JsonValue> userIdsJsonList(m_userIds.size());
for(unsigned userIdsIndex = 0; userIdsIndex < userIdsJsonList.GetLength(); ++userIdsIndex)
{
userIdsJsonList[userIdsIndex].AsString(m_userIds[userIdsIndex]);
}
payload.WithArray("UserIds", std::move(userIdsJsonList));
}
if(m_notUserIdsHasBeenSet)
{
Array<JsonValue> notUserIdsJsonList(m_notUserIds.size());
for(unsigned notUserIdsIndex = 0; notUserIdsIndex < notUserIdsJsonList.GetLength(); ++notUserIdsIndex)
{
notUserIdsJsonList[notUserIdsIndex].AsString(m_notUserIds[notUserIdsIndex]);
}
payload.WithArray("NotUserIds", std::move(notUserIdsJsonList));
}
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PutAccessControlRuleRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.PutAccessControlRule"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/PutAccessControlRuleResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutAccessControlRuleResult::PutAccessControlRuleResult()
{
}
PutAccessControlRuleResult::PutAccessControlRuleResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutAccessControlRuleResult& PutAccessControlRuleResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/PutMailboxPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutMailboxPermissionsRequest::PutMailboxPermissionsRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_granteeIdHasBeenSet(false),
m_permissionValuesHasBeenSet(false)
{
}
Aws::String PutMailboxPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_granteeIdHasBeenSet)
{
payload.WithString("GranteeId", m_granteeId);
}
if(m_permissionValuesHasBeenSet)
{
Array<JsonValue> permissionValuesJsonList(m_permissionValues.size());
for(unsigned permissionValuesIndex = 0; permissionValuesIndex < permissionValuesJsonList.GetLength(); ++permissionValuesIndex)
{
permissionValuesJsonList[permissionValuesIndex].AsString(PermissionTypeMapper::GetNameForPermissionType(m_permissionValues[permissionValuesIndex]));
}
payload.WithArray("PermissionValues", std::move(permissionValuesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PutMailboxPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.PutMailboxPermissions"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/PutMailboxPermissionsResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutMailboxPermissionsResult::PutMailboxPermissionsResult()
{
}
PutMailboxPermissionsResult::PutMailboxPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutMailboxPermissionsResult& PutMailboxPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/PutRetentionPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutRetentionPolicyRequest::PutRetentionPolicyRequest() :
m_organizationIdHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_folderConfigurationsHasBeenSet(false)
{
}
Aws::String PutRetentionPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_folderConfigurationsHasBeenSet)
{
Array<JsonValue> folderConfigurationsJsonList(m_folderConfigurations.size());
for(unsigned folderConfigurationsIndex = 0; folderConfigurationsIndex < folderConfigurationsJsonList.GetLength(); ++folderConfigurationsIndex)
{
folderConfigurationsJsonList[folderConfigurationsIndex].AsObject(m_folderConfigurations[folderConfigurationsIndex].Jsonize());
}
payload.WithArray("FolderConfigurations", std::move(folderConfigurationsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PutRetentionPolicyRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.PutRetentionPolicy"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/PutRetentionPolicyResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutRetentionPolicyResult::PutRetentionPolicyResult()
{
}
PutRetentionPolicyResult::PutRetentionPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutRetentionPolicyResult& PutRetentionPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/RegisterToWorkMailRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
RegisterToWorkMailRequest::RegisterToWorkMailRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_emailHasBeenSet(false)
{
}
Aws::String RegisterToWorkMailRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_emailHasBeenSet)
{
payload.WithString("Email", m_email);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection RegisterToWorkMailRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.RegisterToWorkMail"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/RegisterToWorkMailResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
RegisterToWorkMailResult::RegisterToWorkMailResult()
{
}
RegisterToWorkMailResult::RegisterToWorkMailResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
RegisterToWorkMailResult& RegisterToWorkMailResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/ResetPasswordRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ResetPasswordRequest::ResetPasswordRequest() :
m_organizationIdHasBeenSet(false),
m_userIdHasBeenSet(false),
m_passwordHasBeenSet(false)
{
}
Aws::String ResetPasswordRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
if(m_passwordHasBeenSet)
{
payload.WithString("Password", m_password);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ResetPasswordRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.ResetPassword"));
return headers;
}

View File

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

View File

@@ -0,0 +1,149 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/Resource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Resource::Resource() :
m_idHasBeenSet(false),
m_emailHasBeenSet(false),
m_nameHasBeenSet(false),
m_type(ResourceType::NOT_SET),
m_typeHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
}
Resource::Resource(JsonView jsonValue) :
m_idHasBeenSet(false),
m_emailHasBeenSet(false),
m_nameHasBeenSet(false),
m_type(ResourceType::NOT_SET),
m_typeHasBeenSet(false),
m_state(EntityState::NOT_SET),
m_stateHasBeenSet(false),
m_enabledDateHasBeenSet(false),
m_disabledDateHasBeenSet(false)
{
*this = jsonValue;
}
Resource& Resource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Email"))
{
m_email = jsonValue.GetString("Email");
m_emailHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("State"))
{
m_state = EntityStateMapper::GetEntityStateForName(jsonValue.GetString("State"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("EnabledDate"))
{
m_enabledDate = jsonValue.GetDouble("EnabledDate");
m_enabledDateHasBeenSet = true;
}
if(jsonValue.ValueExists("DisabledDate"))
{
m_disabledDate = jsonValue.GetDouble("DisabledDate");
m_disabledDateHasBeenSet = true;
}
return *this;
}
JsonValue Resource::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_emailHasBeenSet)
{
payload.WithString("Email", m_email);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", ResourceTypeMapper::GetNameForResourceType(m_type));
}
if(m_stateHasBeenSet)
{
payload.WithString("State", EntityStateMapper::GetNameForEntityState(m_state));
}
if(m_enabledDateHasBeenSet)
{
payload.WithDouble("EnabledDate", m_enabledDate.SecondsWithMSPrecision());
}
if(m_disabledDateHasBeenSet)
{
payload.WithDouble("DisabledDate", m_disabledDate.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/ResourceType.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 WorkMail
{
namespace Model
{
namespace ResourceTypeMapper
{
static const int ROOM_HASH = HashingUtils::HashString("ROOM");
static const int EQUIPMENT_HASH = HashingUtils::HashString("EQUIPMENT");
ResourceType GetResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ROOM_HASH)
{
return ResourceType::ROOM;
}
else if (hashCode == EQUIPMENT_HASH)
{
return ResourceType::EQUIPMENT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ResourceType>(hashCode);
}
return ResourceType::NOT_SET;
}
Aws::String GetNameForResourceType(ResourceType enumValue)
{
switch(enumValue)
{
case ResourceType::ROOM:
return "ROOM";
case ResourceType::EQUIPMENT:
return "EQUIPMENT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeMapper
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/RetentionAction.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 WorkMail
{
namespace Model
{
namespace RetentionActionMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int DELETE__HASH = HashingUtils::HashString("DELETE");
static const int PERMANENTLY_DELETE_HASH = HashingUtils::HashString("PERMANENTLY_DELETE");
RetentionAction GetRetentionActionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return RetentionAction::NONE;
}
else if (hashCode == DELETE__HASH)
{
return RetentionAction::DELETE_;
}
else if (hashCode == PERMANENTLY_DELETE_HASH)
{
return RetentionAction::PERMANENTLY_DELETE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<RetentionAction>(hashCode);
}
return RetentionAction::NOT_SET;
}
Aws::String GetNameForRetentionAction(RetentionAction enumValue)
{
switch(enumValue)
{
case RetentionAction::NONE:
return "NONE";
case RetentionAction::DELETE_:
return "DELETE";
case RetentionAction::PERMANENTLY_DELETE:
return "PERMANENTLY_DELETE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace RetentionActionMapper
} // namespace Model
} // namespace WorkMail
} // 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/workmail/model/Tag.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace WorkMail
{
namespace Model
{
Tag::Tag() :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Tag::Tag(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Tag& Tag::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Tag::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace WorkMail
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
TagResourceRequest::TagResourceRequest() :
m_resourceARNHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String TagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceARNHasBeenSet)
{
payload.WithString("ResourceARN", m_resourceARN);
}
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 TagResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.TagResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/TagResourceResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/UntagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UntagResourceRequest::UntagResourceRequest() :
m_resourceARNHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceARNHasBeenSet)
{
payload.WithString("ResourceARN", m_resourceARN);
}
if(m_tagKeysHasBeenSet)
{
Array<JsonValue> tagKeysJsonList(m_tagKeys.size());
for(unsigned tagKeysIndex = 0; tagKeysIndex < tagKeysJsonList.GetLength(); ++tagKeysIndex)
{
tagKeysJsonList[tagKeysIndex].AsString(m_tagKeys[tagKeysIndex]);
}
payload.WithArray("TagKeys", std::move(tagKeysJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UntagResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.UntagResource"));
return headers;
}

View File

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

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/UpdateMailboxQuotaRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateMailboxQuotaRequest::UpdateMailboxQuotaRequest() :
m_organizationIdHasBeenSet(false),
m_userIdHasBeenSet(false),
m_mailboxQuota(0),
m_mailboxQuotaHasBeenSet(false)
{
}
Aws::String UpdateMailboxQuotaRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_userIdHasBeenSet)
{
payload.WithString("UserId", m_userId);
}
if(m_mailboxQuotaHasBeenSet)
{
payload.WithInteger("MailboxQuota", m_mailboxQuota);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateMailboxQuotaRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.UpdateMailboxQuota"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/workmail/model/UpdateMailboxQuotaResult.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::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateMailboxQuotaResult::UpdateMailboxQuotaResult()
{
}
UpdateMailboxQuotaResult::UpdateMailboxQuotaResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateMailboxQuotaResult& UpdateMailboxQuotaResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/workmail/model/UpdatePrimaryEmailAddressRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::WorkMail::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdatePrimaryEmailAddressRequest::UpdatePrimaryEmailAddressRequest() :
m_organizationIdHasBeenSet(false),
m_entityIdHasBeenSet(false),
m_emailHasBeenSet(false)
{
}
Aws::String UpdatePrimaryEmailAddressRequest::SerializePayload() const
{
JsonValue payload;
if(m_organizationIdHasBeenSet)
{
payload.WithString("OrganizationId", m_organizationId);
}
if(m_entityIdHasBeenSet)
{
payload.WithString("EntityId", m_entityId);
}
if(m_emailHasBeenSet)
{
payload.WithString("Email", m_email);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdatePrimaryEmailAddressRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkMailService.UpdatePrimaryEmailAddress"));
return headers;
}

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