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,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/ConnectionType.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 Cloud9
{
namespace Model
{
namespace ConnectionTypeMapper
{
static const int CONNECT_SSH_HASH = HashingUtils::HashString("CONNECT_SSH");
static const int CONNECT_SSM_HASH = HashingUtils::HashString("CONNECT_SSM");
ConnectionType GetConnectionTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CONNECT_SSH_HASH)
{
return ConnectionType::CONNECT_SSH;
}
else if (hashCode == CONNECT_SSM_HASH)
{
return ConnectionType::CONNECT_SSM;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ConnectionType>(hashCode);
}
return ConnectionType::NOT_SET;
}
Aws::String GetNameForConnectionType(ConnectionType enumValue)
{
switch(enumValue)
{
case ConnectionType::CONNECT_SSH:
return "CONNECT_SSH";
case ConnectionType::CONNECT_SSM:
return "CONNECT_SSM";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ConnectionTypeMapper
} // namespace Model
} // namespace Cloud9
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/CreateEnvironmentEC2Request.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateEnvironmentEC2Request::CreateEnvironmentEC2Request() :
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_clientRequestTokenHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_subnetIdHasBeenSet(false),
m_automaticStopTimeMinutes(0),
m_automaticStopTimeMinutesHasBeenSet(false),
m_ownerArnHasBeenSet(false),
m_tagsHasBeenSet(false),
m_connectionType(ConnectionType::NOT_SET),
m_connectionTypeHasBeenSet(false)
{
}
Aws::String CreateEnvironmentEC2Request::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_clientRequestTokenHasBeenSet)
{
payload.WithString("clientRequestToken", m_clientRequestToken);
}
if(m_instanceTypeHasBeenSet)
{
payload.WithString("instanceType", m_instanceType);
}
if(m_subnetIdHasBeenSet)
{
payload.WithString("subnetId", m_subnetId);
}
if(m_automaticStopTimeMinutesHasBeenSet)
{
payload.WithInteger("automaticStopTimeMinutes", m_automaticStopTimeMinutes);
}
if(m_ownerArnHasBeenSet)
{
payload.WithString("ownerArn", m_ownerArn);
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_connectionTypeHasBeenSet)
{
payload.WithString("connectionType", ConnectionTypeMapper::GetNameForConnectionType(m_connectionType));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateEnvironmentEC2Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.CreateEnvironmentEC2"));
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/cloud9/model/CreateEnvironmentEC2Result.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateEnvironmentEC2Result::CreateEnvironmentEC2Result()
{
}
CreateEnvironmentEC2Result::CreateEnvironmentEC2Result(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateEnvironmentEC2Result& CreateEnvironmentEC2Result::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("environmentId"))
{
m_environmentId = jsonValue.GetString("environmentId");
}
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/cloud9/model/CreateEnvironmentMembershipRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateEnvironmentMembershipRequest::CreateEnvironmentMembershipRequest() :
m_environmentIdHasBeenSet(false),
m_userArnHasBeenSet(false),
m_permissions(MemberPermissions::NOT_SET),
m_permissionsHasBeenSet(false)
{
}
Aws::String CreateEnvironmentMembershipRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
if(m_permissionsHasBeenSet)
{
payload.WithString("permissions", MemberPermissionsMapper::GetNameForMemberPermissions(m_permissions));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateEnvironmentMembershipRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.CreateEnvironmentMembership"));
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/cloud9/model/CreateEnvironmentMembershipResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateEnvironmentMembershipResult::CreateEnvironmentMembershipResult()
{
}
CreateEnvironmentMembershipResult::CreateEnvironmentMembershipResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateEnvironmentMembershipResult& CreateEnvironmentMembershipResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("membership"))
{
m_membership = jsonValue.GetObject("membership");
}
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/cloud9/model/DeleteEnvironmentMembershipRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteEnvironmentMembershipRequest::DeleteEnvironmentMembershipRequest() :
m_environmentIdHasBeenSet(false),
m_userArnHasBeenSet(false)
{
}
Aws::String DeleteEnvironmentMembershipRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteEnvironmentMembershipRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.DeleteEnvironmentMembership"));
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/cloud9/model/DeleteEnvironmentMembershipResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteEnvironmentMembershipResult::DeleteEnvironmentMembershipResult()
{
}
DeleteEnvironmentMembershipResult::DeleteEnvironmentMembershipResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteEnvironmentMembershipResult& DeleteEnvironmentMembershipResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/cloud9/model/DeleteEnvironmentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteEnvironmentRequest::DeleteEnvironmentRequest() :
m_environmentIdHasBeenSet(false)
{
}
Aws::String DeleteEnvironmentRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteEnvironmentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.DeleteEnvironment"));
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/cloud9/model/DeleteEnvironmentResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteEnvironmentResult::DeleteEnvironmentResult()
{
}
DeleteEnvironmentResult::DeleteEnvironmentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteEnvironmentResult& DeleteEnvironmentResult::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/cloud9/model/DescribeEnvironmentMembershipsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeEnvironmentMembershipsRequest::DescribeEnvironmentMembershipsRequest() :
m_userArnHasBeenSet(false),
m_environmentIdHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribeEnvironmentMembershipsRequest::SerializePayload() const
{
JsonValue payload;
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(PermissionsMapper::GetNameForPermissions(m_permissions[permissionsIndex]));
}
payload.WithArray("permissions", std::move(permissionsJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeEnvironmentMembershipsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.DescribeEnvironmentMemberships"));
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/cloud9/model/DescribeEnvironmentMembershipsResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeEnvironmentMembershipsResult::DescribeEnvironmentMembershipsResult()
{
}
DescribeEnvironmentMembershipsResult::DescribeEnvironmentMembershipsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeEnvironmentMembershipsResult& DescribeEnvironmentMembershipsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("memberships"))
{
Array<JsonView> membershipsJsonList = jsonValue.GetArray("memberships");
for(unsigned membershipsIndex = 0; membershipsIndex < membershipsJsonList.GetLength(); ++membershipsIndex)
{
m_memberships.push_back(membershipsJsonList[membershipsIndex].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/cloud9/model/DescribeEnvironmentStatusRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeEnvironmentStatusRequest::DescribeEnvironmentStatusRequest() :
m_environmentIdHasBeenSet(false)
{
}
Aws::String DescribeEnvironmentStatusRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeEnvironmentStatusRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.DescribeEnvironmentStatus"));
return headers;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/DescribeEnvironmentStatusResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeEnvironmentStatusResult::DescribeEnvironmentStatusResult() :
m_status(EnvironmentStatus::NOT_SET)
{
}
DescribeEnvironmentStatusResult::DescribeEnvironmentStatusResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(EnvironmentStatus::NOT_SET)
{
*this = result;
}
DescribeEnvironmentStatusResult& DescribeEnvironmentStatusResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("status"))
{
m_status = EnvironmentStatusMapper::GetEnvironmentStatusForName(jsonValue.GetString("status"));
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/DescribeEnvironmentsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeEnvironmentsRequest::DescribeEnvironmentsRequest() :
m_environmentIdsHasBeenSet(false)
{
}
Aws::String DescribeEnvironmentsRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdsHasBeenSet)
{
Array<JsonValue> environmentIdsJsonList(m_environmentIds.size());
for(unsigned environmentIdsIndex = 0; environmentIdsIndex < environmentIdsJsonList.GetLength(); ++environmentIdsIndex)
{
environmentIdsJsonList[environmentIdsIndex].AsString(m_environmentIds[environmentIdsIndex]);
}
payload.WithArray("environmentIds", std::move(environmentIdsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeEnvironmentsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.DescribeEnvironments"));
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/cloud9/model/DescribeEnvironmentsResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeEnvironmentsResult::DescribeEnvironmentsResult()
{
}
DescribeEnvironmentsResult::DescribeEnvironmentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeEnvironmentsResult& DescribeEnvironmentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("environments"))
{
Array<JsonView> environmentsJsonList = jsonValue.GetArray("environments");
for(unsigned environmentsIndex = 0; environmentsIndex < environmentsJsonList.GetLength(); ++environmentsIndex)
{
m_environments.push_back(environmentsJsonList[environmentsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,166 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/Environment.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Cloud9
{
namespace Model
{
Environment::Environment() :
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_type(EnvironmentType::NOT_SET),
m_typeHasBeenSet(false),
m_connectionType(ConnectionType::NOT_SET),
m_connectionTypeHasBeenSet(false),
m_arnHasBeenSet(false),
m_ownerArnHasBeenSet(false),
m_lifecycleHasBeenSet(false)
{
}
Environment::Environment(JsonView jsonValue) :
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_type(EnvironmentType::NOT_SET),
m_typeHasBeenSet(false),
m_connectionType(ConnectionType::NOT_SET),
m_connectionTypeHasBeenSet(false),
m_arnHasBeenSet(false),
m_ownerArnHasBeenSet(false),
m_lifecycleHasBeenSet(false)
{
*this = jsonValue;
}
Environment& Environment::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("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = EnvironmentTypeMapper::GetEnvironmentTypeForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("connectionType"))
{
m_connectionType = ConnectionTypeMapper::GetConnectionTypeForName(jsonValue.GetString("connectionType"));
m_connectionTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("ownerArn"))
{
m_ownerArn = jsonValue.GetString("ownerArn");
m_ownerArnHasBeenSet = true;
}
if(jsonValue.ValueExists("lifecycle"))
{
m_lifecycle = jsonValue.GetObject("lifecycle");
m_lifecycleHasBeenSet = true;
}
return *this;
}
JsonValue Environment::Jsonize() const
{
JsonValue payload;
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_typeHasBeenSet)
{
payload.WithString("type", EnvironmentTypeMapper::GetNameForEnvironmentType(m_type));
}
if(m_connectionTypeHasBeenSet)
{
payload.WithString("connectionType", ConnectionTypeMapper::GetNameForConnectionType(m_connectionType));
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_ownerArnHasBeenSet)
{
payload.WithString("ownerArn", m_ownerArn);
}
if(m_lifecycleHasBeenSet)
{
payload.WithObject("lifecycle", m_lifecycle.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Cloud9
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/EnvironmentLifecycle.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Cloud9
{
namespace Model
{
EnvironmentLifecycle::EnvironmentLifecycle() :
m_status(EnvironmentLifecycleStatus::NOT_SET),
m_statusHasBeenSet(false),
m_reasonHasBeenSet(false),
m_failureResourceHasBeenSet(false)
{
}
EnvironmentLifecycle::EnvironmentLifecycle(JsonView jsonValue) :
m_status(EnvironmentLifecycleStatus::NOT_SET),
m_statusHasBeenSet(false),
m_reasonHasBeenSet(false),
m_failureResourceHasBeenSet(false)
{
*this = jsonValue;
}
EnvironmentLifecycle& EnvironmentLifecycle::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("status"))
{
m_status = EnvironmentLifecycleStatusMapper::GetEnvironmentLifecycleStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("reason"))
{
m_reason = jsonValue.GetString("reason");
m_reasonHasBeenSet = true;
}
if(jsonValue.ValueExists("failureResource"))
{
m_failureResource = jsonValue.GetString("failureResource");
m_failureResourceHasBeenSet = true;
}
return *this;
}
JsonValue EnvironmentLifecycle::Jsonize() const
{
JsonValue payload;
if(m_statusHasBeenSet)
{
payload.WithString("status", EnvironmentLifecycleStatusMapper::GetNameForEnvironmentLifecycleStatus(m_status));
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
if(m_failureResourceHasBeenSet)
{
payload.WithString("failureResource", m_failureResource);
}
return payload;
}
} // namespace Model
} // namespace Cloud9
} // 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/cloud9/model/EnvironmentLifecycleStatus.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 Cloud9
{
namespace Model
{
namespace EnvironmentLifecycleStatusMapper
{
static const int CREATING_HASH = HashingUtils::HashString("CREATING");
static const int CREATED_HASH = HashingUtils::HashString("CREATED");
static const int CREATE_FAILED_HASH = HashingUtils::HashString("CREATE_FAILED");
static const int DELETING_HASH = HashingUtils::HashString("DELETING");
static const int DELETE_FAILED_HASH = HashingUtils::HashString("DELETE_FAILED");
EnvironmentLifecycleStatus GetEnvironmentLifecycleStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATING_HASH)
{
return EnvironmentLifecycleStatus::CREATING;
}
else if (hashCode == CREATED_HASH)
{
return EnvironmentLifecycleStatus::CREATED;
}
else if (hashCode == CREATE_FAILED_HASH)
{
return EnvironmentLifecycleStatus::CREATE_FAILED;
}
else if (hashCode == DELETING_HASH)
{
return EnvironmentLifecycleStatus::DELETING;
}
else if (hashCode == DELETE_FAILED_HASH)
{
return EnvironmentLifecycleStatus::DELETE_FAILED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EnvironmentLifecycleStatus>(hashCode);
}
return EnvironmentLifecycleStatus::NOT_SET;
}
Aws::String GetNameForEnvironmentLifecycleStatus(EnvironmentLifecycleStatus enumValue)
{
switch(enumValue)
{
case EnvironmentLifecycleStatus::CREATING:
return "CREATING";
case EnvironmentLifecycleStatus::CREATED:
return "CREATED";
case EnvironmentLifecycleStatus::CREATE_FAILED:
return "CREATE_FAILED";
case EnvironmentLifecycleStatus::DELETING:
return "DELETING";
case EnvironmentLifecycleStatus::DELETE_FAILED:
return "DELETE_FAILED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EnvironmentLifecycleStatusMapper
} // namespace Model
} // namespace Cloud9
} // namespace Aws

View File

@@ -0,0 +1,119 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/EnvironmentMember.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Cloud9
{
namespace Model
{
EnvironmentMember::EnvironmentMember() :
m_permissions(Permissions::NOT_SET),
m_permissionsHasBeenSet(false),
m_userIdHasBeenSet(false),
m_userArnHasBeenSet(false),
m_environmentIdHasBeenSet(false),
m_lastAccessHasBeenSet(false)
{
}
EnvironmentMember::EnvironmentMember(JsonView jsonValue) :
m_permissions(Permissions::NOT_SET),
m_permissionsHasBeenSet(false),
m_userIdHasBeenSet(false),
m_userArnHasBeenSet(false),
m_environmentIdHasBeenSet(false),
m_lastAccessHasBeenSet(false)
{
*this = jsonValue;
}
EnvironmentMember& EnvironmentMember::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("permissions"))
{
m_permissions = PermissionsMapper::GetPermissionsForName(jsonValue.GetString("permissions"));
m_permissionsHasBeenSet = true;
}
if(jsonValue.ValueExists("userId"))
{
m_userId = jsonValue.GetString("userId");
m_userIdHasBeenSet = true;
}
if(jsonValue.ValueExists("userArn"))
{
m_userArn = jsonValue.GetString("userArn");
m_userArnHasBeenSet = true;
}
if(jsonValue.ValueExists("environmentId"))
{
m_environmentId = jsonValue.GetString("environmentId");
m_environmentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("lastAccess"))
{
m_lastAccess = jsonValue.GetDouble("lastAccess");
m_lastAccessHasBeenSet = true;
}
return *this;
}
JsonValue EnvironmentMember::Jsonize() const
{
JsonValue payload;
if(m_permissionsHasBeenSet)
{
payload.WithString("permissions", PermissionsMapper::GetNameForPermissions(m_permissions));
}
if(m_userIdHasBeenSet)
{
payload.WithString("userId", m_userId);
}
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_lastAccessHasBeenSet)
{
payload.WithDouble("lastAccess", m_lastAccess.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Cloud9
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/EnvironmentStatus.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 Cloud9
{
namespace Model
{
namespace EnvironmentStatusMapper
{
static const int error_HASH = HashingUtils::HashString("error");
static const int creating_HASH = HashingUtils::HashString("creating");
static const int connecting_HASH = HashingUtils::HashString("connecting");
static const int ready_HASH = HashingUtils::HashString("ready");
static const int stopping_HASH = HashingUtils::HashString("stopping");
static const int stopped_HASH = HashingUtils::HashString("stopped");
static const int deleting_HASH = HashingUtils::HashString("deleting");
EnvironmentStatus GetEnvironmentStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == error_HASH)
{
return EnvironmentStatus::error;
}
else if (hashCode == creating_HASH)
{
return EnvironmentStatus::creating;
}
else if (hashCode == connecting_HASH)
{
return EnvironmentStatus::connecting;
}
else if (hashCode == ready_HASH)
{
return EnvironmentStatus::ready;
}
else if (hashCode == stopping_HASH)
{
return EnvironmentStatus::stopping;
}
else if (hashCode == stopped_HASH)
{
return EnvironmentStatus::stopped;
}
else if (hashCode == deleting_HASH)
{
return EnvironmentStatus::deleting;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EnvironmentStatus>(hashCode);
}
return EnvironmentStatus::NOT_SET;
}
Aws::String GetNameForEnvironmentStatus(EnvironmentStatus enumValue)
{
switch(enumValue)
{
case EnvironmentStatus::error:
return "error";
case EnvironmentStatus::creating:
return "creating";
case EnvironmentStatus::connecting:
return "connecting";
case EnvironmentStatus::ready:
return "ready";
case EnvironmentStatus::stopping:
return "stopping";
case EnvironmentStatus::stopped:
return "stopped";
case EnvironmentStatus::deleting:
return "deleting";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EnvironmentStatusMapper
} // namespace Model
} // namespace Cloud9
} // 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/cloud9/model/EnvironmentType.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 Cloud9
{
namespace Model
{
namespace EnvironmentTypeMapper
{
static const int ssh_HASH = HashingUtils::HashString("ssh");
static const int ec2_HASH = HashingUtils::HashString("ec2");
EnvironmentType GetEnvironmentTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ssh_HASH)
{
return EnvironmentType::ssh;
}
else if (hashCode == ec2_HASH)
{
return EnvironmentType::ec2;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EnvironmentType>(hashCode);
}
return EnvironmentType::NOT_SET;
}
Aws::String GetNameForEnvironmentType(EnvironmentType enumValue)
{
switch(enumValue)
{
case EnvironmentType::ssh:
return "ssh";
case EnvironmentType::ec2:
return "ec2";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EnvironmentTypeMapper
} // namespace Model
} // namespace Cloud9
} // namespace Aws

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/ListEnvironmentsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListEnvironmentsRequest::ListEnvironmentsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListEnvironmentsRequest::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 ListEnvironmentsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.ListEnvironments"));
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/cloud9/model/ListEnvironmentsResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListEnvironmentsResult::ListEnvironmentsResult()
{
}
ListEnvironmentsResult::ListEnvironmentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListEnvironmentsResult& ListEnvironmentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("environmentIds"))
{
Array<JsonView> environmentIdsJsonList = jsonValue.GetArray("environmentIds");
for(unsigned environmentIdsIndex = 0; environmentIdsIndex < environmentIdsJsonList.GetLength(); ++environmentIdsIndex)
{
m_environmentIds.push_back(environmentIdsJsonList[environmentIdsIndex].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/cloud9/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::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", "AWSCloud9WorkspaceManagementService.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/cloud9/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::Cloud9::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,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/MemberPermissions.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 Cloud9
{
namespace Model
{
namespace MemberPermissionsMapper
{
static const int read_write_HASH = HashingUtils::HashString("read-write");
static const int read_only_HASH = HashingUtils::HashString("read-only");
MemberPermissions GetMemberPermissionsForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == read_write_HASH)
{
return MemberPermissions::read_write;
}
else if (hashCode == read_only_HASH)
{
return MemberPermissions::read_only;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<MemberPermissions>(hashCode);
}
return MemberPermissions::NOT_SET;
}
Aws::String GetNameForMemberPermissions(MemberPermissions enumValue)
{
switch(enumValue)
{
case MemberPermissions::read_write:
return "read-write";
case MemberPermissions::read_only:
return "read-only";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace MemberPermissionsMapper
} // namespace Model
} // namespace Cloud9
} // 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/cloud9/model/Permissions.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 Cloud9
{
namespace Model
{
namespace PermissionsMapper
{
static const int owner_HASH = HashingUtils::HashString("owner");
static const int read_write_HASH = HashingUtils::HashString("read-write");
static const int read_only_HASH = HashingUtils::HashString("read-only");
Permissions GetPermissionsForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == owner_HASH)
{
return Permissions::owner;
}
else if (hashCode == read_write_HASH)
{
return Permissions::read_write;
}
else if (hashCode == read_only_HASH)
{
return Permissions::read_only;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Permissions>(hashCode);
}
return Permissions::NOT_SET;
}
Aws::String GetNameForPermissions(Permissions enumValue)
{
switch(enumValue)
{
case Permissions::owner:
return "owner";
case Permissions::read_write:
return "read-write";
case Permissions::read_only:
return "read-only";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PermissionsMapper
} // namespace Model
} // namespace Cloud9
} // 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/cloud9/model/Tag.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Cloud9
{
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 Cloud9
} // 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/cloud9/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::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", "AWSCloud9WorkspaceManagementService.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/cloud9/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::Cloud9::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/cloud9/model/UntagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::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", "AWSCloud9WorkspaceManagementService.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/cloud9/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::Cloud9::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,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloud9/model/UpdateEnvironmentMembershipRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateEnvironmentMembershipRequest::UpdateEnvironmentMembershipRequest() :
m_environmentIdHasBeenSet(false),
m_userArnHasBeenSet(false),
m_permissions(MemberPermissions::NOT_SET),
m_permissionsHasBeenSet(false)
{
}
Aws::String UpdateEnvironmentMembershipRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
if(m_permissionsHasBeenSet)
{
payload.WithString("permissions", MemberPermissionsMapper::GetNameForMemberPermissions(m_permissions));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateEnvironmentMembershipRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.UpdateEnvironmentMembership"));
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/cloud9/model/UpdateEnvironmentMembershipResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateEnvironmentMembershipResult::UpdateEnvironmentMembershipResult()
{
}
UpdateEnvironmentMembershipResult::UpdateEnvironmentMembershipResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateEnvironmentMembershipResult& UpdateEnvironmentMembershipResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("membership"))
{
m_membership = jsonValue.GetObject("membership");
}
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/cloud9/model/UpdateEnvironmentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateEnvironmentRequest::UpdateEnvironmentRequest() :
m_environmentIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false)
{
}
Aws::String UpdateEnvironmentRequest::SerializePayload() const
{
JsonValue payload;
if(m_environmentIdHasBeenSet)
{
payload.WithString("environmentId", m_environmentId);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateEnvironmentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSCloud9WorkspaceManagementService.UpdateEnvironment"));
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/cloud9/model/UpdateEnvironmentResult.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::Cloud9::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateEnvironmentResult::UpdateEnvironmentResult()
{
}
UpdateEnvironmentResult::UpdateEnvironmentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateEnvironmentResult& UpdateEnvironmentResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}