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/batch/model/ArrayJobDependency.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 Batch
{
namespace Model
{
namespace ArrayJobDependencyMapper
{
static const int N_TO_N_HASH = HashingUtils::HashString("N_TO_N");
static const int SEQUENTIAL_HASH = HashingUtils::HashString("SEQUENTIAL");
ArrayJobDependency GetArrayJobDependencyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == N_TO_N_HASH)
{
return ArrayJobDependency::N_TO_N;
}
else if (hashCode == SEQUENTIAL_HASH)
{
return ArrayJobDependency::SEQUENTIAL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ArrayJobDependency>(hashCode);
}
return ArrayJobDependency::NOT_SET;
}
Aws::String GetNameForArrayJobDependency(ArrayJobDependency enumValue)
{
switch(enumValue)
{
case ArrayJobDependency::N_TO_N:
return "N_TO_N";
case ArrayJobDependency::SEQUENTIAL:
return "SEQUENTIAL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ArrayJobDependencyMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ArrayProperties.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ArrayProperties::ArrayProperties() :
m_size(0),
m_sizeHasBeenSet(false)
{
}
ArrayProperties::ArrayProperties(JsonView jsonValue) :
m_size(0),
m_sizeHasBeenSet(false)
{
*this = jsonValue;
}
ArrayProperties& ArrayProperties::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("size"))
{
m_size = jsonValue.GetInteger("size");
m_sizeHasBeenSet = true;
}
return *this;
}
JsonValue ArrayProperties::Jsonize() const
{
JsonValue payload;
if(m_sizeHasBeenSet)
{
payload.WithInteger("size", m_size);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ArrayPropertiesDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ArrayPropertiesDetail::ArrayPropertiesDetail() :
m_statusSummaryHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_index(0),
m_indexHasBeenSet(false)
{
}
ArrayPropertiesDetail::ArrayPropertiesDetail(JsonView jsonValue) :
m_statusSummaryHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_index(0),
m_indexHasBeenSet(false)
{
*this = jsonValue;
}
ArrayPropertiesDetail& ArrayPropertiesDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("statusSummary"))
{
Aws::Map<Aws::String, JsonView> statusSummaryJsonMap = jsonValue.GetObject("statusSummary").GetAllObjects();
for(auto& statusSummaryItem : statusSummaryJsonMap)
{
m_statusSummary[statusSummaryItem.first] = statusSummaryItem.second.AsInteger();
}
m_statusSummaryHasBeenSet = true;
}
if(jsonValue.ValueExists("size"))
{
m_size = jsonValue.GetInteger("size");
m_sizeHasBeenSet = true;
}
if(jsonValue.ValueExists("index"))
{
m_index = jsonValue.GetInteger("index");
m_indexHasBeenSet = true;
}
return *this;
}
JsonValue ArrayPropertiesDetail::Jsonize() const
{
JsonValue payload;
if(m_statusSummaryHasBeenSet)
{
JsonValue statusSummaryJsonMap;
for(auto& statusSummaryItem : m_statusSummary)
{
statusSummaryJsonMap.WithInteger(statusSummaryItem.first, statusSummaryItem.second);
}
payload.WithObject("statusSummary", std::move(statusSummaryJsonMap));
}
if(m_sizeHasBeenSet)
{
payload.WithInteger("size", m_size);
}
if(m_indexHasBeenSet)
{
payload.WithInteger("index", m_index);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ArrayPropertiesSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ArrayPropertiesSummary::ArrayPropertiesSummary() :
m_size(0),
m_sizeHasBeenSet(false),
m_index(0),
m_indexHasBeenSet(false)
{
}
ArrayPropertiesSummary::ArrayPropertiesSummary(JsonView jsonValue) :
m_size(0),
m_sizeHasBeenSet(false),
m_index(0),
m_indexHasBeenSet(false)
{
*this = jsonValue;
}
ArrayPropertiesSummary& ArrayPropertiesSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("size"))
{
m_size = jsonValue.GetInteger("size");
m_sizeHasBeenSet = true;
}
if(jsonValue.ValueExists("index"))
{
m_index = jsonValue.GetInteger("index");
m_indexHasBeenSet = true;
}
return *this;
}
JsonValue ArrayPropertiesSummary::Jsonize() const
{
JsonValue payload;
if(m_sizeHasBeenSet)
{
payload.WithInteger("size", m_size);
}
if(m_indexHasBeenSet)
{
payload.WithInteger("index", m_index);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,144 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/AttemptContainerDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
AttemptContainerDetail::AttemptContainerDetail() :
m_containerInstanceArnHasBeenSet(false),
m_taskArnHasBeenSet(false),
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false),
m_logStreamNameHasBeenSet(false),
m_networkInterfacesHasBeenSet(false)
{
}
AttemptContainerDetail::AttemptContainerDetail(JsonView jsonValue) :
m_containerInstanceArnHasBeenSet(false),
m_taskArnHasBeenSet(false),
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false),
m_logStreamNameHasBeenSet(false),
m_networkInterfacesHasBeenSet(false)
{
*this = jsonValue;
}
AttemptContainerDetail& AttemptContainerDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("containerInstanceArn"))
{
m_containerInstanceArn = jsonValue.GetString("containerInstanceArn");
m_containerInstanceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("taskArn"))
{
m_taskArn = jsonValue.GetString("taskArn");
m_taskArnHasBeenSet = true;
}
if(jsonValue.ValueExists("exitCode"))
{
m_exitCode = jsonValue.GetInteger("exitCode");
m_exitCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("reason"))
{
m_reason = jsonValue.GetString("reason");
m_reasonHasBeenSet = true;
}
if(jsonValue.ValueExists("logStreamName"))
{
m_logStreamName = jsonValue.GetString("logStreamName");
m_logStreamNameHasBeenSet = true;
}
if(jsonValue.ValueExists("networkInterfaces"))
{
Array<JsonView> networkInterfacesJsonList = jsonValue.GetArray("networkInterfaces");
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
m_networkInterfaces.push_back(networkInterfacesJsonList[networkInterfacesIndex].AsObject());
}
m_networkInterfacesHasBeenSet = true;
}
return *this;
}
JsonValue AttemptContainerDetail::Jsonize() const
{
JsonValue payload;
if(m_containerInstanceArnHasBeenSet)
{
payload.WithString("containerInstanceArn", m_containerInstanceArn);
}
if(m_taskArnHasBeenSet)
{
payload.WithString("taskArn", m_taskArn);
}
if(m_exitCodeHasBeenSet)
{
payload.WithInteger("exitCode", m_exitCode);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
if(m_logStreamNameHasBeenSet)
{
payload.WithString("logStreamName", m_logStreamName);
}
if(m_networkInterfacesHasBeenSet)
{
Array<JsonValue> networkInterfacesJsonList(m_networkInterfaces.size());
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
networkInterfacesJsonList[networkInterfacesIndex].AsObject(m_networkInterfaces[networkInterfacesIndex].Jsonize());
}
payload.WithArray("networkInterfaces", std::move(networkInterfacesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,108 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/AttemptDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
AttemptDetail::AttemptDetail() :
m_containerHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_statusReasonHasBeenSet(false)
{
}
AttemptDetail::AttemptDetail(JsonView jsonValue) :
m_containerHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_statusReasonHasBeenSet(false)
{
*this = jsonValue;
}
AttemptDetail& AttemptDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("container"))
{
m_container = jsonValue.GetObject("container");
m_containerHasBeenSet = true;
}
if(jsonValue.ValueExists("startedAt"))
{
m_startedAt = jsonValue.GetInt64("startedAt");
m_startedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("stoppedAt"))
{
m_stoppedAt = jsonValue.GetInt64("stoppedAt");
m_stoppedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("statusReason"))
{
m_statusReason = jsonValue.GetString("statusReason");
m_statusReasonHasBeenSet = true;
}
return *this;
}
JsonValue AttemptDetail::Jsonize() const
{
JsonValue payload;
if(m_containerHasBeenSet)
{
payload.WithObject("container", m_container.Jsonize());
}
if(m_startedAtHasBeenSet)
{
payload.WithInt64("startedAt", m_startedAt);
}
if(m_stoppedAtHasBeenSet)
{
payload.WithInt64("stoppedAt", m_stoppedAt);
}
if(m_statusReasonHasBeenSet)
{
payload.WithString("statusReason", m_statusReason);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/CEState.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 Batch
{
namespace Model
{
namespace CEStateMapper
{
static const int ENABLED_HASH = HashingUtils::HashString("ENABLED");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
CEState GetCEStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ENABLED_HASH)
{
return CEState::ENABLED;
}
else if (hashCode == DISABLED_HASH)
{
return CEState::DISABLED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CEState>(hashCode);
}
return CEState::NOT_SET;
}
Aws::String GetNameForCEState(CEState enumValue)
{
switch(enumValue)
{
case CEState::ENABLED:
return "ENABLED";
case CEState::DISABLED:
return "DISABLED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CEStateMapper
} // namespace Model
} // namespace Batch
} // 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/batch/model/CEStatus.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 Batch
{
namespace Model
{
namespace CEStatusMapper
{
static const int CREATING_HASH = HashingUtils::HashString("CREATING");
static const int UPDATING_HASH = HashingUtils::HashString("UPDATING");
static const int DELETING_HASH = HashingUtils::HashString("DELETING");
static const int DELETED_HASH = HashingUtils::HashString("DELETED");
static const int VALID_HASH = HashingUtils::HashString("VALID");
static const int INVALID_HASH = HashingUtils::HashString("INVALID");
CEStatus GetCEStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATING_HASH)
{
return CEStatus::CREATING;
}
else if (hashCode == UPDATING_HASH)
{
return CEStatus::UPDATING;
}
else if (hashCode == DELETING_HASH)
{
return CEStatus::DELETING;
}
else if (hashCode == DELETED_HASH)
{
return CEStatus::DELETED;
}
else if (hashCode == VALID_HASH)
{
return CEStatus::VALID;
}
else if (hashCode == INVALID_HASH)
{
return CEStatus::INVALID;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CEStatus>(hashCode);
}
return CEStatus::NOT_SET;
}
Aws::String GetNameForCEStatus(CEStatus enumValue)
{
switch(enumValue)
{
case CEStatus::CREATING:
return "CREATING";
case CEStatus::UPDATING:
return "UPDATING";
case CEStatus::DELETING:
return "DELETING";
case CEStatus::DELETED:
return "DELETED";
case CEStatus::VALID:
return "VALID";
case CEStatus::INVALID:
return "INVALID";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CEStatusMapper
} // namespace Model
} // namespace Batch
} // 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/batch/model/CEType.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 Batch
{
namespace Model
{
namespace CETypeMapper
{
static const int MANAGED_HASH = HashingUtils::HashString("MANAGED");
static const int UNMANAGED_HASH = HashingUtils::HashString("UNMANAGED");
CEType GetCETypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == MANAGED_HASH)
{
return CEType::MANAGED;
}
else if (hashCode == UNMANAGED_HASH)
{
return CEType::UNMANAGED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CEType>(hashCode);
}
return CEType::NOT_SET;
}
Aws::String GetNameForCEType(CEType enumValue)
{
switch(enumValue)
{
case CEType::MANAGED:
return "MANAGED";
case CEType::UNMANAGED:
return "UNMANAGED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CETypeMapper
} // namespace Model
} // namespace Batch
} // 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/batch/model/CRAllocationStrategy.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 Batch
{
namespace Model
{
namespace CRAllocationStrategyMapper
{
static const int BEST_FIT_HASH = HashingUtils::HashString("BEST_FIT");
static const int BEST_FIT_PROGRESSIVE_HASH = HashingUtils::HashString("BEST_FIT_PROGRESSIVE");
static const int SPOT_CAPACITY_OPTIMIZED_HASH = HashingUtils::HashString("SPOT_CAPACITY_OPTIMIZED");
CRAllocationStrategy GetCRAllocationStrategyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == BEST_FIT_HASH)
{
return CRAllocationStrategy::BEST_FIT;
}
else if (hashCode == BEST_FIT_PROGRESSIVE_HASH)
{
return CRAllocationStrategy::BEST_FIT_PROGRESSIVE;
}
else if (hashCode == SPOT_CAPACITY_OPTIMIZED_HASH)
{
return CRAllocationStrategy::SPOT_CAPACITY_OPTIMIZED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CRAllocationStrategy>(hashCode);
}
return CRAllocationStrategy::NOT_SET;
}
Aws::String GetNameForCRAllocationStrategy(CRAllocationStrategy enumValue)
{
switch(enumValue)
{
case CRAllocationStrategy::BEST_FIT:
return "BEST_FIT";
case CRAllocationStrategy::BEST_FIT_PROGRESSIVE:
return "BEST_FIT_PROGRESSIVE";
case CRAllocationStrategy::SPOT_CAPACITY_OPTIMIZED:
return "SPOT_CAPACITY_OPTIMIZED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CRAllocationStrategyMapper
} // namespace Model
} // namespace Batch
} // 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/batch/model/CRType.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 Batch
{
namespace Model
{
namespace CRTypeMapper
{
static const int EC2_HASH = HashingUtils::HashString("EC2");
static const int SPOT_HASH = HashingUtils::HashString("SPOT");
CRType GetCRTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EC2_HASH)
{
return CRType::EC2;
}
else if (hashCode == SPOT_HASH)
{
return CRType::SPOT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CRType>(hashCode);
}
return CRType::NOT_SET;
}
Aws::String GetNameForCRType(CRType enumValue)
{
switch(enumValue)
{
case CRType::EC2:
return "EC2";
case CRType::SPOT:
return "SPOT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CRTypeMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/CancelJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CancelJobRequest::CancelJobRequest() :
m_jobIdHasBeenSet(false),
m_reasonHasBeenSet(false)
{
}
Aws::String CancelJobRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobIdHasBeenSet)
{
payload.WithString("jobId", m_jobId);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,182 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ComputeEnvironmentDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ComputeEnvironmentDetail::ComputeEnvironmentDetail() :
m_computeEnvironmentNameHasBeenSet(false),
m_computeEnvironmentArnHasBeenSet(false),
m_ecsClusterArnHasBeenSet(false),
m_type(CEType::NOT_SET),
m_typeHasBeenSet(false),
m_state(CEState::NOT_SET),
m_stateHasBeenSet(false),
m_status(CEStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_computeResourcesHasBeenSet(false),
m_serviceRoleHasBeenSet(false)
{
}
ComputeEnvironmentDetail::ComputeEnvironmentDetail(JsonView jsonValue) :
m_computeEnvironmentNameHasBeenSet(false),
m_computeEnvironmentArnHasBeenSet(false),
m_ecsClusterArnHasBeenSet(false),
m_type(CEType::NOT_SET),
m_typeHasBeenSet(false),
m_state(CEState::NOT_SET),
m_stateHasBeenSet(false),
m_status(CEStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_computeResourcesHasBeenSet(false),
m_serviceRoleHasBeenSet(false)
{
*this = jsonValue;
}
ComputeEnvironmentDetail& ComputeEnvironmentDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("computeEnvironmentName"))
{
m_computeEnvironmentName = jsonValue.GetString("computeEnvironmentName");
m_computeEnvironmentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("computeEnvironmentArn"))
{
m_computeEnvironmentArn = jsonValue.GetString("computeEnvironmentArn");
m_computeEnvironmentArnHasBeenSet = true;
}
if(jsonValue.ValueExists("ecsClusterArn"))
{
m_ecsClusterArn = jsonValue.GetString("ecsClusterArn");
m_ecsClusterArnHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = CETypeMapper::GetCETypeForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = CEStateMapper::GetCEStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = CEStatusMapper::GetCEStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("statusReason"))
{
m_statusReason = jsonValue.GetString("statusReason");
m_statusReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("computeResources"))
{
m_computeResources = jsonValue.GetObject("computeResources");
m_computeResourcesHasBeenSet = true;
}
if(jsonValue.ValueExists("serviceRole"))
{
m_serviceRole = jsonValue.GetString("serviceRole");
m_serviceRoleHasBeenSet = true;
}
return *this;
}
JsonValue ComputeEnvironmentDetail::Jsonize() const
{
JsonValue payload;
if(m_computeEnvironmentNameHasBeenSet)
{
payload.WithString("computeEnvironmentName", m_computeEnvironmentName);
}
if(m_computeEnvironmentArnHasBeenSet)
{
payload.WithString("computeEnvironmentArn", m_computeEnvironmentArn);
}
if(m_ecsClusterArnHasBeenSet)
{
payload.WithString("ecsClusterArn", m_ecsClusterArn);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", CETypeMapper::GetNameForCEType(m_type));
}
if(m_stateHasBeenSet)
{
payload.WithString("state", CEStateMapper::GetNameForCEState(m_state));
}
if(m_statusHasBeenSet)
{
payload.WithString("status", CEStatusMapper::GetNameForCEStatus(m_status));
}
if(m_statusReasonHasBeenSet)
{
payload.WithString("statusReason", m_statusReason);
}
if(m_computeResourcesHasBeenSet)
{
payload.WithObject("computeResources", m_computeResources.Jsonize());
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("serviceRole", m_serviceRole);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ComputeEnvironmentOrder.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ComputeEnvironmentOrder::ComputeEnvironmentOrder() :
m_order(0),
m_orderHasBeenSet(false),
m_computeEnvironmentHasBeenSet(false)
{
}
ComputeEnvironmentOrder::ComputeEnvironmentOrder(JsonView jsonValue) :
m_order(0),
m_orderHasBeenSet(false),
m_computeEnvironmentHasBeenSet(false)
{
*this = jsonValue;
}
ComputeEnvironmentOrder& ComputeEnvironmentOrder::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("order"))
{
m_order = jsonValue.GetInteger("order");
m_orderHasBeenSet = true;
}
if(jsonValue.ValueExists("computeEnvironment"))
{
m_computeEnvironment = jsonValue.GetString("computeEnvironment");
m_computeEnvironmentHasBeenSet = true;
}
return *this;
}
JsonValue ComputeEnvironmentOrder::Jsonize() const
{
JsonValue payload;
if(m_orderHasBeenSet)
{
payload.WithInteger("order", m_order);
}
if(m_computeEnvironmentHasBeenSet)
{
payload.WithString("computeEnvironment", m_computeEnvironment);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,326 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ComputeResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ComputeResource::ComputeResource() :
m_type(CRType::NOT_SET),
m_typeHasBeenSet(false),
m_allocationStrategy(CRAllocationStrategy::NOT_SET),
m_allocationStrategyHasBeenSet(false),
m_minvCpus(0),
m_minvCpusHasBeenSet(false),
m_maxvCpus(0),
m_maxvCpusHasBeenSet(false),
m_desiredvCpus(0),
m_desiredvCpusHasBeenSet(false),
m_instanceTypesHasBeenSet(false),
m_imageIdHasBeenSet(false),
m_subnetsHasBeenSet(false),
m_securityGroupIdsHasBeenSet(false),
m_ec2KeyPairHasBeenSet(false),
m_instanceRoleHasBeenSet(false),
m_tagsHasBeenSet(false),
m_placementGroupHasBeenSet(false),
m_bidPercentage(0),
m_bidPercentageHasBeenSet(false),
m_spotIamFleetRoleHasBeenSet(false),
m_launchTemplateHasBeenSet(false)
{
}
ComputeResource::ComputeResource(JsonView jsonValue) :
m_type(CRType::NOT_SET),
m_typeHasBeenSet(false),
m_allocationStrategy(CRAllocationStrategy::NOT_SET),
m_allocationStrategyHasBeenSet(false),
m_minvCpus(0),
m_minvCpusHasBeenSet(false),
m_maxvCpus(0),
m_maxvCpusHasBeenSet(false),
m_desiredvCpus(0),
m_desiredvCpusHasBeenSet(false),
m_instanceTypesHasBeenSet(false),
m_imageIdHasBeenSet(false),
m_subnetsHasBeenSet(false),
m_securityGroupIdsHasBeenSet(false),
m_ec2KeyPairHasBeenSet(false),
m_instanceRoleHasBeenSet(false),
m_tagsHasBeenSet(false),
m_placementGroupHasBeenSet(false),
m_bidPercentage(0),
m_bidPercentageHasBeenSet(false),
m_spotIamFleetRoleHasBeenSet(false),
m_launchTemplateHasBeenSet(false)
{
*this = jsonValue;
}
ComputeResource& ComputeResource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("type"))
{
m_type = CRTypeMapper::GetCRTypeForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("allocationStrategy"))
{
m_allocationStrategy = CRAllocationStrategyMapper::GetCRAllocationStrategyForName(jsonValue.GetString("allocationStrategy"));
m_allocationStrategyHasBeenSet = true;
}
if(jsonValue.ValueExists("minvCpus"))
{
m_minvCpus = jsonValue.GetInteger("minvCpus");
m_minvCpusHasBeenSet = true;
}
if(jsonValue.ValueExists("maxvCpus"))
{
m_maxvCpus = jsonValue.GetInteger("maxvCpus");
m_maxvCpusHasBeenSet = true;
}
if(jsonValue.ValueExists("desiredvCpus"))
{
m_desiredvCpus = jsonValue.GetInteger("desiredvCpus");
m_desiredvCpusHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceTypes"))
{
Array<JsonView> instanceTypesJsonList = jsonValue.GetArray("instanceTypes");
for(unsigned instanceTypesIndex = 0; instanceTypesIndex < instanceTypesJsonList.GetLength(); ++instanceTypesIndex)
{
m_instanceTypes.push_back(instanceTypesJsonList[instanceTypesIndex].AsString());
}
m_instanceTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("imageId"))
{
m_imageId = jsonValue.GetString("imageId");
m_imageIdHasBeenSet = true;
}
if(jsonValue.ValueExists("subnets"))
{
Array<JsonView> subnetsJsonList = jsonValue.GetArray("subnets");
for(unsigned subnetsIndex = 0; subnetsIndex < subnetsJsonList.GetLength(); ++subnetsIndex)
{
m_subnets.push_back(subnetsJsonList[subnetsIndex].AsString());
}
m_subnetsHasBeenSet = true;
}
if(jsonValue.ValueExists("securityGroupIds"))
{
Array<JsonView> securityGroupIdsJsonList = jsonValue.GetArray("securityGroupIds");
for(unsigned securityGroupIdsIndex = 0; securityGroupIdsIndex < securityGroupIdsJsonList.GetLength(); ++securityGroupIdsIndex)
{
m_securityGroupIds.push_back(securityGroupIdsJsonList[securityGroupIdsIndex].AsString());
}
m_securityGroupIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("ec2KeyPair"))
{
m_ec2KeyPair = jsonValue.GetString("ec2KeyPair");
m_ec2KeyPairHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceRole"))
{
m_instanceRole = jsonValue.GetString("instanceRole");
m_instanceRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
m_tagsHasBeenSet = true;
}
if(jsonValue.ValueExists("placementGroup"))
{
m_placementGroup = jsonValue.GetString("placementGroup");
m_placementGroupHasBeenSet = true;
}
if(jsonValue.ValueExists("bidPercentage"))
{
m_bidPercentage = jsonValue.GetInteger("bidPercentage");
m_bidPercentageHasBeenSet = true;
}
if(jsonValue.ValueExists("spotIamFleetRole"))
{
m_spotIamFleetRole = jsonValue.GetString("spotIamFleetRole");
m_spotIamFleetRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("launchTemplate"))
{
m_launchTemplate = jsonValue.GetObject("launchTemplate");
m_launchTemplateHasBeenSet = true;
}
return *this;
}
JsonValue ComputeResource::Jsonize() const
{
JsonValue payload;
if(m_typeHasBeenSet)
{
payload.WithString("type", CRTypeMapper::GetNameForCRType(m_type));
}
if(m_allocationStrategyHasBeenSet)
{
payload.WithString("allocationStrategy", CRAllocationStrategyMapper::GetNameForCRAllocationStrategy(m_allocationStrategy));
}
if(m_minvCpusHasBeenSet)
{
payload.WithInteger("minvCpus", m_minvCpus);
}
if(m_maxvCpusHasBeenSet)
{
payload.WithInteger("maxvCpus", m_maxvCpus);
}
if(m_desiredvCpusHasBeenSet)
{
payload.WithInteger("desiredvCpus", m_desiredvCpus);
}
if(m_instanceTypesHasBeenSet)
{
Array<JsonValue> instanceTypesJsonList(m_instanceTypes.size());
for(unsigned instanceTypesIndex = 0; instanceTypesIndex < instanceTypesJsonList.GetLength(); ++instanceTypesIndex)
{
instanceTypesJsonList[instanceTypesIndex].AsString(m_instanceTypes[instanceTypesIndex]);
}
payload.WithArray("instanceTypes", std::move(instanceTypesJsonList));
}
if(m_imageIdHasBeenSet)
{
payload.WithString("imageId", m_imageId);
}
if(m_subnetsHasBeenSet)
{
Array<JsonValue> subnetsJsonList(m_subnets.size());
for(unsigned subnetsIndex = 0; subnetsIndex < subnetsJsonList.GetLength(); ++subnetsIndex)
{
subnetsJsonList[subnetsIndex].AsString(m_subnets[subnetsIndex]);
}
payload.WithArray("subnets", std::move(subnetsJsonList));
}
if(m_securityGroupIdsHasBeenSet)
{
Array<JsonValue> securityGroupIdsJsonList(m_securityGroupIds.size());
for(unsigned securityGroupIdsIndex = 0; securityGroupIdsIndex < securityGroupIdsJsonList.GetLength(); ++securityGroupIdsIndex)
{
securityGroupIdsJsonList[securityGroupIdsIndex].AsString(m_securityGroupIds[securityGroupIdsIndex]);
}
payload.WithArray("securityGroupIds", std::move(securityGroupIdsJsonList));
}
if(m_ec2KeyPairHasBeenSet)
{
payload.WithString("ec2KeyPair", m_ec2KeyPair);
}
if(m_instanceRoleHasBeenSet)
{
payload.WithString("instanceRole", m_instanceRole);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
if(m_placementGroupHasBeenSet)
{
payload.WithString("placementGroup", m_placementGroup);
}
if(m_bidPercentageHasBeenSet)
{
payload.WithInteger("bidPercentage", m_bidPercentage);
}
if(m_spotIamFleetRoleHasBeenSet)
{
payload.WithString("spotIamFleetRole", m_spotIamFleetRole);
}
if(m_launchTemplateHasBeenSet)
{
payload.WithObject("launchTemplate", m_launchTemplate.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,95 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ComputeResourceUpdate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ComputeResourceUpdate::ComputeResourceUpdate() :
m_minvCpus(0),
m_minvCpusHasBeenSet(false),
m_maxvCpus(0),
m_maxvCpusHasBeenSet(false),
m_desiredvCpus(0),
m_desiredvCpusHasBeenSet(false)
{
}
ComputeResourceUpdate::ComputeResourceUpdate(JsonView jsonValue) :
m_minvCpus(0),
m_minvCpusHasBeenSet(false),
m_maxvCpus(0),
m_maxvCpusHasBeenSet(false),
m_desiredvCpus(0),
m_desiredvCpusHasBeenSet(false)
{
*this = jsonValue;
}
ComputeResourceUpdate& ComputeResourceUpdate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("minvCpus"))
{
m_minvCpus = jsonValue.GetInteger("minvCpus");
m_minvCpusHasBeenSet = true;
}
if(jsonValue.ValueExists("maxvCpus"))
{
m_maxvCpus = jsonValue.GetInteger("maxvCpus");
m_maxvCpusHasBeenSet = true;
}
if(jsonValue.ValueExists("desiredvCpus"))
{
m_desiredvCpus = jsonValue.GetInteger("desiredvCpus");
m_desiredvCpusHasBeenSet = true;
}
return *this;
}
JsonValue ComputeResourceUpdate::Jsonize() const
{
JsonValue payload;
if(m_minvCpusHasBeenSet)
{
payload.WithInteger("minvCpus", m_minvCpus);
}
if(m_maxvCpusHasBeenSet)
{
payload.WithInteger("maxvCpus", m_maxvCpus);
}
if(m_desiredvCpusHasBeenSet)
{
payload.WithInteger("desiredvCpus", m_desiredvCpus);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,425 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ContainerDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ContainerDetail::ContainerDetail() :
m_imageHasBeenSet(false),
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_jobRoleArnHasBeenSet(false),
m_volumesHasBeenSet(false),
m_environmentHasBeenSet(false),
m_mountPointsHasBeenSet(false),
m_readonlyRootFilesystem(false),
m_readonlyRootFilesystemHasBeenSet(false),
m_ulimitsHasBeenSet(false),
m_privileged(false),
m_privilegedHasBeenSet(false),
m_userHasBeenSet(false),
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false),
m_containerInstanceArnHasBeenSet(false),
m_taskArnHasBeenSet(false),
m_logStreamNameHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_networkInterfacesHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false),
m_linuxParametersHasBeenSet(false)
{
}
ContainerDetail::ContainerDetail(JsonView jsonValue) :
m_imageHasBeenSet(false),
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_jobRoleArnHasBeenSet(false),
m_volumesHasBeenSet(false),
m_environmentHasBeenSet(false),
m_mountPointsHasBeenSet(false),
m_readonlyRootFilesystem(false),
m_readonlyRootFilesystemHasBeenSet(false),
m_ulimitsHasBeenSet(false),
m_privileged(false),
m_privilegedHasBeenSet(false),
m_userHasBeenSet(false),
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false),
m_containerInstanceArnHasBeenSet(false),
m_taskArnHasBeenSet(false),
m_logStreamNameHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_networkInterfacesHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false),
m_linuxParametersHasBeenSet(false)
{
*this = jsonValue;
}
ContainerDetail& ContainerDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("image"))
{
m_image = jsonValue.GetString("image");
m_imageHasBeenSet = true;
}
if(jsonValue.ValueExists("vcpus"))
{
m_vcpus = jsonValue.GetInteger("vcpus");
m_vcpusHasBeenSet = true;
}
if(jsonValue.ValueExists("memory"))
{
m_memory = jsonValue.GetInteger("memory");
m_memoryHasBeenSet = true;
}
if(jsonValue.ValueExists("command"))
{
Array<JsonView> commandJsonList = jsonValue.GetArray("command");
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
m_command.push_back(commandJsonList[commandIndex].AsString());
}
m_commandHasBeenSet = true;
}
if(jsonValue.ValueExists("jobRoleArn"))
{
m_jobRoleArn = jsonValue.GetString("jobRoleArn");
m_jobRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("volumes"))
{
Array<JsonView> volumesJsonList = jsonValue.GetArray("volumes");
for(unsigned volumesIndex = 0; volumesIndex < volumesJsonList.GetLength(); ++volumesIndex)
{
m_volumes.push_back(volumesJsonList[volumesIndex].AsObject());
}
m_volumesHasBeenSet = true;
}
if(jsonValue.ValueExists("environment"))
{
Array<JsonView> environmentJsonList = jsonValue.GetArray("environment");
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
m_environment.push_back(environmentJsonList[environmentIndex].AsObject());
}
m_environmentHasBeenSet = true;
}
if(jsonValue.ValueExists("mountPoints"))
{
Array<JsonView> mountPointsJsonList = jsonValue.GetArray("mountPoints");
for(unsigned mountPointsIndex = 0; mountPointsIndex < mountPointsJsonList.GetLength(); ++mountPointsIndex)
{
m_mountPoints.push_back(mountPointsJsonList[mountPointsIndex].AsObject());
}
m_mountPointsHasBeenSet = true;
}
if(jsonValue.ValueExists("readonlyRootFilesystem"))
{
m_readonlyRootFilesystem = jsonValue.GetBool("readonlyRootFilesystem");
m_readonlyRootFilesystemHasBeenSet = true;
}
if(jsonValue.ValueExists("ulimits"))
{
Array<JsonView> ulimitsJsonList = jsonValue.GetArray("ulimits");
for(unsigned ulimitsIndex = 0; ulimitsIndex < ulimitsJsonList.GetLength(); ++ulimitsIndex)
{
m_ulimits.push_back(ulimitsJsonList[ulimitsIndex].AsObject());
}
m_ulimitsHasBeenSet = true;
}
if(jsonValue.ValueExists("privileged"))
{
m_privileged = jsonValue.GetBool("privileged");
m_privilegedHasBeenSet = true;
}
if(jsonValue.ValueExists("user"))
{
m_user = jsonValue.GetString("user");
m_userHasBeenSet = true;
}
if(jsonValue.ValueExists("exitCode"))
{
m_exitCode = jsonValue.GetInteger("exitCode");
m_exitCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("reason"))
{
m_reason = jsonValue.GetString("reason");
m_reasonHasBeenSet = true;
}
if(jsonValue.ValueExists("containerInstanceArn"))
{
m_containerInstanceArn = jsonValue.GetString("containerInstanceArn");
m_containerInstanceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("taskArn"))
{
m_taskArn = jsonValue.GetString("taskArn");
m_taskArnHasBeenSet = true;
}
if(jsonValue.ValueExists("logStreamName"))
{
m_logStreamName = jsonValue.GetString("logStreamName");
m_logStreamNameHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceType"))
{
m_instanceType = jsonValue.GetString("instanceType");
m_instanceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("networkInterfaces"))
{
Array<JsonView> networkInterfacesJsonList = jsonValue.GetArray("networkInterfaces");
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
m_networkInterfaces.push_back(networkInterfacesJsonList[networkInterfacesIndex].AsObject());
}
m_networkInterfacesHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceRequirements"))
{
Array<JsonView> resourceRequirementsJsonList = jsonValue.GetArray("resourceRequirements");
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
m_resourceRequirements.push_back(resourceRequirementsJsonList[resourceRequirementsIndex].AsObject());
}
m_resourceRequirementsHasBeenSet = true;
}
if(jsonValue.ValueExists("linuxParameters"))
{
m_linuxParameters = jsonValue.GetObject("linuxParameters");
m_linuxParametersHasBeenSet = true;
}
return *this;
}
JsonValue ContainerDetail::Jsonize() const
{
JsonValue payload;
if(m_imageHasBeenSet)
{
payload.WithString("image", m_image);
}
if(m_vcpusHasBeenSet)
{
payload.WithInteger("vcpus", m_vcpus);
}
if(m_memoryHasBeenSet)
{
payload.WithInteger("memory", m_memory);
}
if(m_commandHasBeenSet)
{
Array<JsonValue> commandJsonList(m_command.size());
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
commandJsonList[commandIndex].AsString(m_command[commandIndex]);
}
payload.WithArray("command", std::move(commandJsonList));
}
if(m_jobRoleArnHasBeenSet)
{
payload.WithString("jobRoleArn", m_jobRoleArn);
}
if(m_volumesHasBeenSet)
{
Array<JsonValue> volumesJsonList(m_volumes.size());
for(unsigned volumesIndex = 0; volumesIndex < volumesJsonList.GetLength(); ++volumesIndex)
{
volumesJsonList[volumesIndex].AsObject(m_volumes[volumesIndex].Jsonize());
}
payload.WithArray("volumes", std::move(volumesJsonList));
}
if(m_environmentHasBeenSet)
{
Array<JsonValue> environmentJsonList(m_environment.size());
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
environmentJsonList[environmentIndex].AsObject(m_environment[environmentIndex].Jsonize());
}
payload.WithArray("environment", std::move(environmentJsonList));
}
if(m_mountPointsHasBeenSet)
{
Array<JsonValue> mountPointsJsonList(m_mountPoints.size());
for(unsigned mountPointsIndex = 0; mountPointsIndex < mountPointsJsonList.GetLength(); ++mountPointsIndex)
{
mountPointsJsonList[mountPointsIndex].AsObject(m_mountPoints[mountPointsIndex].Jsonize());
}
payload.WithArray("mountPoints", std::move(mountPointsJsonList));
}
if(m_readonlyRootFilesystemHasBeenSet)
{
payload.WithBool("readonlyRootFilesystem", m_readonlyRootFilesystem);
}
if(m_ulimitsHasBeenSet)
{
Array<JsonValue> ulimitsJsonList(m_ulimits.size());
for(unsigned ulimitsIndex = 0; ulimitsIndex < ulimitsJsonList.GetLength(); ++ulimitsIndex)
{
ulimitsJsonList[ulimitsIndex].AsObject(m_ulimits[ulimitsIndex].Jsonize());
}
payload.WithArray("ulimits", std::move(ulimitsJsonList));
}
if(m_privilegedHasBeenSet)
{
payload.WithBool("privileged", m_privileged);
}
if(m_userHasBeenSet)
{
payload.WithString("user", m_user);
}
if(m_exitCodeHasBeenSet)
{
payload.WithInteger("exitCode", m_exitCode);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
if(m_containerInstanceArnHasBeenSet)
{
payload.WithString("containerInstanceArn", m_containerInstanceArn);
}
if(m_taskArnHasBeenSet)
{
payload.WithString("taskArn", m_taskArn);
}
if(m_logStreamNameHasBeenSet)
{
payload.WithString("logStreamName", m_logStreamName);
}
if(m_instanceTypeHasBeenSet)
{
payload.WithString("instanceType", m_instanceType);
}
if(m_networkInterfacesHasBeenSet)
{
Array<JsonValue> networkInterfacesJsonList(m_networkInterfaces.size());
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
networkInterfacesJsonList[networkInterfacesIndex].AsObject(m_networkInterfaces[networkInterfacesIndex].Jsonize());
}
payload.WithArray("networkInterfaces", std::move(networkInterfacesJsonList));
}
if(m_resourceRequirementsHasBeenSet)
{
Array<JsonValue> resourceRequirementsJsonList(m_resourceRequirements.size());
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
resourceRequirementsJsonList[resourceRequirementsIndex].AsObject(m_resourceRequirements[resourceRequirementsIndex].Jsonize());
}
payload.WithArray("resourceRequirements", std::move(resourceRequirementsJsonList));
}
if(m_linuxParametersHasBeenSet)
{
payload.WithObject("linuxParameters", m_linuxParameters.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,162 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ContainerOverrides.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ContainerOverrides::ContainerOverrides() :
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_environmentHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false)
{
}
ContainerOverrides::ContainerOverrides(JsonView jsonValue) :
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_environmentHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false)
{
*this = jsonValue;
}
ContainerOverrides& ContainerOverrides::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("vcpus"))
{
m_vcpus = jsonValue.GetInteger("vcpus");
m_vcpusHasBeenSet = true;
}
if(jsonValue.ValueExists("memory"))
{
m_memory = jsonValue.GetInteger("memory");
m_memoryHasBeenSet = true;
}
if(jsonValue.ValueExists("command"))
{
Array<JsonView> commandJsonList = jsonValue.GetArray("command");
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
m_command.push_back(commandJsonList[commandIndex].AsString());
}
m_commandHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceType"))
{
m_instanceType = jsonValue.GetString("instanceType");
m_instanceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("environment"))
{
Array<JsonView> environmentJsonList = jsonValue.GetArray("environment");
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
m_environment.push_back(environmentJsonList[environmentIndex].AsObject());
}
m_environmentHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceRequirements"))
{
Array<JsonView> resourceRequirementsJsonList = jsonValue.GetArray("resourceRequirements");
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
m_resourceRequirements.push_back(resourceRequirementsJsonList[resourceRequirementsIndex].AsObject());
}
m_resourceRequirementsHasBeenSet = true;
}
return *this;
}
JsonValue ContainerOverrides::Jsonize() const
{
JsonValue payload;
if(m_vcpusHasBeenSet)
{
payload.WithInteger("vcpus", m_vcpus);
}
if(m_memoryHasBeenSet)
{
payload.WithInteger("memory", m_memory);
}
if(m_commandHasBeenSet)
{
Array<JsonValue> commandJsonList(m_command.size());
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
commandJsonList[commandIndex].AsString(m_command[commandIndex]);
}
payload.WithArray("command", std::move(commandJsonList));
}
if(m_instanceTypeHasBeenSet)
{
payload.WithString("instanceType", m_instanceType);
}
if(m_environmentHasBeenSet)
{
Array<JsonValue> environmentJsonList(m_environment.size());
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
environmentJsonList[environmentIndex].AsObject(m_environment[environmentIndex].Jsonize());
}
payload.WithArray("environment", std::move(environmentJsonList));
}
if(m_resourceRequirementsHasBeenSet)
{
Array<JsonValue> resourceRequirementsJsonList(m_resourceRequirements.size());
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
resourceRequirementsJsonList[resourceRequirementsIndex].AsObject(m_resourceRequirements[resourceRequirementsIndex].Jsonize());
}
payload.WithArray("resourceRequirements", std::move(resourceRequirementsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,325 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ContainerProperties.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ContainerProperties::ContainerProperties() :
m_imageHasBeenSet(false),
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_jobRoleArnHasBeenSet(false),
m_volumesHasBeenSet(false),
m_environmentHasBeenSet(false),
m_mountPointsHasBeenSet(false),
m_readonlyRootFilesystem(false),
m_readonlyRootFilesystemHasBeenSet(false),
m_privileged(false),
m_privilegedHasBeenSet(false),
m_ulimitsHasBeenSet(false),
m_userHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false),
m_linuxParametersHasBeenSet(false)
{
}
ContainerProperties::ContainerProperties(JsonView jsonValue) :
m_imageHasBeenSet(false),
m_vcpus(0),
m_vcpusHasBeenSet(false),
m_memory(0),
m_memoryHasBeenSet(false),
m_commandHasBeenSet(false),
m_jobRoleArnHasBeenSet(false),
m_volumesHasBeenSet(false),
m_environmentHasBeenSet(false),
m_mountPointsHasBeenSet(false),
m_readonlyRootFilesystem(false),
m_readonlyRootFilesystemHasBeenSet(false),
m_privileged(false),
m_privilegedHasBeenSet(false),
m_ulimitsHasBeenSet(false),
m_userHasBeenSet(false),
m_instanceTypeHasBeenSet(false),
m_resourceRequirementsHasBeenSet(false),
m_linuxParametersHasBeenSet(false)
{
*this = jsonValue;
}
ContainerProperties& ContainerProperties::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("image"))
{
m_image = jsonValue.GetString("image");
m_imageHasBeenSet = true;
}
if(jsonValue.ValueExists("vcpus"))
{
m_vcpus = jsonValue.GetInteger("vcpus");
m_vcpusHasBeenSet = true;
}
if(jsonValue.ValueExists("memory"))
{
m_memory = jsonValue.GetInteger("memory");
m_memoryHasBeenSet = true;
}
if(jsonValue.ValueExists("command"))
{
Array<JsonView> commandJsonList = jsonValue.GetArray("command");
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
m_command.push_back(commandJsonList[commandIndex].AsString());
}
m_commandHasBeenSet = true;
}
if(jsonValue.ValueExists("jobRoleArn"))
{
m_jobRoleArn = jsonValue.GetString("jobRoleArn");
m_jobRoleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("volumes"))
{
Array<JsonView> volumesJsonList = jsonValue.GetArray("volumes");
for(unsigned volumesIndex = 0; volumesIndex < volumesJsonList.GetLength(); ++volumesIndex)
{
m_volumes.push_back(volumesJsonList[volumesIndex].AsObject());
}
m_volumesHasBeenSet = true;
}
if(jsonValue.ValueExists("environment"))
{
Array<JsonView> environmentJsonList = jsonValue.GetArray("environment");
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
m_environment.push_back(environmentJsonList[environmentIndex].AsObject());
}
m_environmentHasBeenSet = true;
}
if(jsonValue.ValueExists("mountPoints"))
{
Array<JsonView> mountPointsJsonList = jsonValue.GetArray("mountPoints");
for(unsigned mountPointsIndex = 0; mountPointsIndex < mountPointsJsonList.GetLength(); ++mountPointsIndex)
{
m_mountPoints.push_back(mountPointsJsonList[mountPointsIndex].AsObject());
}
m_mountPointsHasBeenSet = true;
}
if(jsonValue.ValueExists("readonlyRootFilesystem"))
{
m_readonlyRootFilesystem = jsonValue.GetBool("readonlyRootFilesystem");
m_readonlyRootFilesystemHasBeenSet = true;
}
if(jsonValue.ValueExists("privileged"))
{
m_privileged = jsonValue.GetBool("privileged");
m_privilegedHasBeenSet = true;
}
if(jsonValue.ValueExists("ulimits"))
{
Array<JsonView> ulimitsJsonList = jsonValue.GetArray("ulimits");
for(unsigned ulimitsIndex = 0; ulimitsIndex < ulimitsJsonList.GetLength(); ++ulimitsIndex)
{
m_ulimits.push_back(ulimitsJsonList[ulimitsIndex].AsObject());
}
m_ulimitsHasBeenSet = true;
}
if(jsonValue.ValueExists("user"))
{
m_user = jsonValue.GetString("user");
m_userHasBeenSet = true;
}
if(jsonValue.ValueExists("instanceType"))
{
m_instanceType = jsonValue.GetString("instanceType");
m_instanceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceRequirements"))
{
Array<JsonView> resourceRequirementsJsonList = jsonValue.GetArray("resourceRequirements");
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
m_resourceRequirements.push_back(resourceRequirementsJsonList[resourceRequirementsIndex].AsObject());
}
m_resourceRequirementsHasBeenSet = true;
}
if(jsonValue.ValueExists("linuxParameters"))
{
m_linuxParameters = jsonValue.GetObject("linuxParameters");
m_linuxParametersHasBeenSet = true;
}
return *this;
}
JsonValue ContainerProperties::Jsonize() const
{
JsonValue payload;
if(m_imageHasBeenSet)
{
payload.WithString("image", m_image);
}
if(m_vcpusHasBeenSet)
{
payload.WithInteger("vcpus", m_vcpus);
}
if(m_memoryHasBeenSet)
{
payload.WithInteger("memory", m_memory);
}
if(m_commandHasBeenSet)
{
Array<JsonValue> commandJsonList(m_command.size());
for(unsigned commandIndex = 0; commandIndex < commandJsonList.GetLength(); ++commandIndex)
{
commandJsonList[commandIndex].AsString(m_command[commandIndex]);
}
payload.WithArray("command", std::move(commandJsonList));
}
if(m_jobRoleArnHasBeenSet)
{
payload.WithString("jobRoleArn", m_jobRoleArn);
}
if(m_volumesHasBeenSet)
{
Array<JsonValue> volumesJsonList(m_volumes.size());
for(unsigned volumesIndex = 0; volumesIndex < volumesJsonList.GetLength(); ++volumesIndex)
{
volumesJsonList[volumesIndex].AsObject(m_volumes[volumesIndex].Jsonize());
}
payload.WithArray("volumes", std::move(volumesJsonList));
}
if(m_environmentHasBeenSet)
{
Array<JsonValue> environmentJsonList(m_environment.size());
for(unsigned environmentIndex = 0; environmentIndex < environmentJsonList.GetLength(); ++environmentIndex)
{
environmentJsonList[environmentIndex].AsObject(m_environment[environmentIndex].Jsonize());
}
payload.WithArray("environment", std::move(environmentJsonList));
}
if(m_mountPointsHasBeenSet)
{
Array<JsonValue> mountPointsJsonList(m_mountPoints.size());
for(unsigned mountPointsIndex = 0; mountPointsIndex < mountPointsJsonList.GetLength(); ++mountPointsIndex)
{
mountPointsJsonList[mountPointsIndex].AsObject(m_mountPoints[mountPointsIndex].Jsonize());
}
payload.WithArray("mountPoints", std::move(mountPointsJsonList));
}
if(m_readonlyRootFilesystemHasBeenSet)
{
payload.WithBool("readonlyRootFilesystem", m_readonlyRootFilesystem);
}
if(m_privilegedHasBeenSet)
{
payload.WithBool("privileged", m_privileged);
}
if(m_ulimitsHasBeenSet)
{
Array<JsonValue> ulimitsJsonList(m_ulimits.size());
for(unsigned ulimitsIndex = 0; ulimitsIndex < ulimitsJsonList.GetLength(); ++ulimitsIndex)
{
ulimitsJsonList[ulimitsIndex].AsObject(m_ulimits[ulimitsIndex].Jsonize());
}
payload.WithArray("ulimits", std::move(ulimitsJsonList));
}
if(m_userHasBeenSet)
{
payload.WithString("user", m_user);
}
if(m_instanceTypeHasBeenSet)
{
payload.WithString("instanceType", m_instanceType);
}
if(m_resourceRequirementsHasBeenSet)
{
Array<JsonValue> resourceRequirementsJsonList(m_resourceRequirements.size());
for(unsigned resourceRequirementsIndex = 0; resourceRequirementsIndex < resourceRequirementsJsonList.GetLength(); ++resourceRequirementsIndex)
{
resourceRequirementsJsonList[resourceRequirementsIndex].AsObject(m_resourceRequirements[resourceRequirementsIndex].Jsonize());
}
payload.WithArray("resourceRequirements", std::move(resourceRequirementsJsonList));
}
if(m_linuxParametersHasBeenSet)
{
payload.WithObject("linuxParameters", m_linuxParameters.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ContainerSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ContainerSummary::ContainerSummary() :
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false)
{
}
ContainerSummary::ContainerSummary(JsonView jsonValue) :
m_exitCode(0),
m_exitCodeHasBeenSet(false),
m_reasonHasBeenSet(false)
{
*this = jsonValue;
}
ContainerSummary& ContainerSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("exitCode"))
{
m_exitCode = jsonValue.GetInteger("exitCode");
m_exitCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("reason"))
{
m_reason = jsonValue.GetString("reason");
m_reasonHasBeenSet = true;
}
return *this;
}
JsonValue ContainerSummary::Jsonize() const
{
JsonValue payload;
if(m_exitCodeHasBeenSet)
{
payload.WithInteger("exitCode", m_exitCode);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/CreateComputeEnvironmentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateComputeEnvironmentRequest::CreateComputeEnvironmentRequest() :
m_computeEnvironmentNameHasBeenSet(false),
m_type(CEType::NOT_SET),
m_typeHasBeenSet(false),
m_state(CEState::NOT_SET),
m_stateHasBeenSet(false),
m_computeResourcesHasBeenSet(false),
m_serviceRoleHasBeenSet(false)
{
}
Aws::String CreateComputeEnvironmentRequest::SerializePayload() const
{
JsonValue payload;
if(m_computeEnvironmentNameHasBeenSet)
{
payload.WithString("computeEnvironmentName", m_computeEnvironmentName);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", CETypeMapper::GetNameForCEType(m_type));
}
if(m_stateHasBeenSet)
{
payload.WithString("state", CEStateMapper::GetNameForCEState(m_state));
}
if(m_computeResourcesHasBeenSet)
{
payload.WithObject("computeResources", m_computeResources.Jsonize());
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("serviceRole", m_serviceRole);
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/CreateJobQueueRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateJobQueueRequest::CreateJobQueueRequest() :
m_jobQueueNameHasBeenSet(false),
m_state(JQState::NOT_SET),
m_stateHasBeenSet(false),
m_priority(0),
m_priorityHasBeenSet(false),
m_computeEnvironmentOrderHasBeenSet(false)
{
}
Aws::String CreateJobQueueRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobQueueNameHasBeenSet)
{
payload.WithString("jobQueueName", m_jobQueueName);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", JQStateMapper::GetNameForJQState(m_state));
}
if(m_priorityHasBeenSet)
{
payload.WithInteger("priority", m_priority);
}
if(m_computeEnvironmentOrderHasBeenSet)
{
Array<JsonValue> computeEnvironmentOrderJsonList(m_computeEnvironmentOrder.size());
for(unsigned computeEnvironmentOrderIndex = 0; computeEnvironmentOrderIndex < computeEnvironmentOrderJsonList.GetLength(); ++computeEnvironmentOrderIndex)
{
computeEnvironmentOrderJsonList[computeEnvironmentOrderIndex].AsObject(m_computeEnvironmentOrder[computeEnvironmentOrderIndex].Jsonize());
}
payload.WithArray("computeEnvironmentOrder", std::move(computeEnvironmentOrderJsonList));
}
return payload.View().WriteReadable();
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/DeregisterJobDefinitionResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeregisterJobDefinitionResult::DeregisterJobDefinitionResult()
{
}
DeregisterJobDefinitionResult::DeregisterJobDefinitionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeregisterJobDefinitionResult& DeregisterJobDefinitionResult::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/batch/model/DescribeComputeEnvironmentsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeComputeEnvironmentsRequest::DescribeComputeEnvironmentsRequest() :
m_computeEnvironmentsHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeComputeEnvironmentsRequest::SerializePayload() const
{
JsonValue payload;
if(m_computeEnvironmentsHasBeenSet)
{
Array<JsonValue> computeEnvironmentsJsonList(m_computeEnvironments.size());
for(unsigned computeEnvironmentsIndex = 0; computeEnvironmentsIndex < computeEnvironmentsJsonList.GetLength(); ++computeEnvironmentsIndex)
{
computeEnvironmentsJsonList[computeEnvironmentsIndex].AsString(m_computeEnvironments[computeEnvironmentsIndex]);
}
payload.WithArray("computeEnvironments", std::move(computeEnvironmentsJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/DescribeComputeEnvironmentsResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeComputeEnvironmentsResult::DescribeComputeEnvironmentsResult()
{
}
DescribeComputeEnvironmentsResult::DescribeComputeEnvironmentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeComputeEnvironmentsResult& DescribeComputeEnvironmentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("computeEnvironments"))
{
Array<JsonView> computeEnvironmentsJsonList = jsonValue.GetArray("computeEnvironments");
for(unsigned computeEnvironmentsIndex = 0; computeEnvironmentsIndex < computeEnvironmentsJsonList.GetLength(); ++computeEnvironmentsIndex)
{
m_computeEnvironments.push_back(computeEnvironmentsJsonList[computeEnvironmentsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
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/batch/model/DescribeJobDefinitionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeJobDefinitionsRequest::DescribeJobDefinitionsRequest() :
m_jobDefinitionsHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_jobDefinitionNameHasBeenSet(false),
m_statusHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeJobDefinitionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobDefinitionsHasBeenSet)
{
Array<JsonValue> jobDefinitionsJsonList(m_jobDefinitions.size());
for(unsigned jobDefinitionsIndex = 0; jobDefinitionsIndex < jobDefinitionsJsonList.GetLength(); ++jobDefinitionsIndex)
{
jobDefinitionsJsonList[jobDefinitionsIndex].AsString(m_jobDefinitions[jobDefinitionsIndex]);
}
payload.WithArray("jobDefinitions", std::move(jobDefinitionsJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_jobDefinitionNameHasBeenSet)
{
payload.WithString("jobDefinitionName", m_jobDefinitionName);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", m_status);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/DescribeJobDefinitionsResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeJobDefinitionsResult::DescribeJobDefinitionsResult()
{
}
DescribeJobDefinitionsResult::DescribeJobDefinitionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeJobDefinitionsResult& DescribeJobDefinitionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("jobDefinitions"))
{
Array<JsonView> jobDefinitionsJsonList = jsonValue.GetArray("jobDefinitions");
for(unsigned jobDefinitionsIndex = 0; jobDefinitionsIndex < jobDefinitionsJsonList.GetLength(); ++jobDefinitionsIndex)
{
m_jobDefinitions.push_back(jobDefinitionsJsonList[jobDefinitionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
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/batch/model/DescribeJobQueuesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeJobQueuesRequest::DescribeJobQueuesRequest() :
m_jobQueuesHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeJobQueuesRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobQueuesHasBeenSet)
{
Array<JsonValue> jobQueuesJsonList(m_jobQueues.size());
for(unsigned jobQueuesIndex = 0; jobQueuesIndex < jobQueuesJsonList.GetLength(); ++jobQueuesIndex)
{
jobQueuesJsonList[jobQueuesIndex].AsString(m_jobQueues[jobQueuesIndex]);
}
payload.WithArray("jobQueues", std::move(jobQueuesJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/DescribeJobQueuesResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeJobQueuesResult::DescribeJobQueuesResult()
{
}
DescribeJobQueuesResult::DescribeJobQueuesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeJobQueuesResult& DescribeJobQueuesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("jobQueues"))
{
Array<JsonView> jobQueuesJsonList = jsonValue.GetArray("jobQueues");
for(unsigned jobQueuesIndex = 0; jobQueuesIndex < jobQueuesJsonList.GetLength(); ++jobQueuesIndex)
{
m_jobQueues.push_back(jobQueuesJsonList[jobQueuesIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/DescribeJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeJobsRequest::DescribeJobsRequest() :
m_jobsHasBeenSet(false)
{
}
Aws::String DescribeJobsRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobsHasBeenSet)
{
Array<JsonValue> jobsJsonList(m_jobs.size());
for(unsigned jobsIndex = 0; jobsIndex < jobsJsonList.GetLength(); ++jobsIndex)
{
jobsJsonList[jobsIndex].AsString(m_jobs[jobsIndex]);
}
payload.WithArray("jobs", std::move(jobsJsonList));
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/Device.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
Device::Device() :
m_hostPathHasBeenSet(false),
m_containerPathHasBeenSet(false),
m_permissionsHasBeenSet(false)
{
}
Device::Device(JsonView jsonValue) :
m_hostPathHasBeenSet(false),
m_containerPathHasBeenSet(false),
m_permissionsHasBeenSet(false)
{
*this = jsonValue;
}
Device& Device::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("hostPath"))
{
m_hostPath = jsonValue.GetString("hostPath");
m_hostPathHasBeenSet = true;
}
if(jsonValue.ValueExists("containerPath"))
{
m_containerPath = jsonValue.GetString("containerPath");
m_containerPathHasBeenSet = true;
}
if(jsonValue.ValueExists("permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(DeviceCgroupPermissionMapper::GetDeviceCgroupPermissionForName(permissionsJsonList[permissionsIndex].AsString()));
}
m_permissionsHasBeenSet = true;
}
return *this;
}
JsonValue Device::Jsonize() const
{
JsonValue payload;
if(m_hostPathHasBeenSet)
{
payload.WithString("hostPath", m_hostPath);
}
if(m_containerPathHasBeenSet)
{
payload.WithString("containerPath", m_containerPath);
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(DeviceCgroupPermissionMapper::GetNameForDeviceCgroupPermission(m_permissions[permissionsIndex]));
}
payload.WithArray("permissions", std::move(permissionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/DeviceCgroupPermission.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 Batch
{
namespace Model
{
namespace DeviceCgroupPermissionMapper
{
static const int READ_HASH = HashingUtils::HashString("READ");
static const int WRITE_HASH = HashingUtils::HashString("WRITE");
static const int MKNOD_HASH = HashingUtils::HashString("MKNOD");
DeviceCgroupPermission GetDeviceCgroupPermissionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == READ_HASH)
{
return DeviceCgroupPermission::READ;
}
else if (hashCode == WRITE_HASH)
{
return DeviceCgroupPermission::WRITE;
}
else if (hashCode == MKNOD_HASH)
{
return DeviceCgroupPermission::MKNOD;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DeviceCgroupPermission>(hashCode);
}
return DeviceCgroupPermission::NOT_SET;
}
Aws::String GetNameForDeviceCgroupPermission(DeviceCgroupPermission enumValue)
{
switch(enumValue)
{
case DeviceCgroupPermission::READ:
return "READ";
case DeviceCgroupPermission::WRITE:
return "WRITE";
case DeviceCgroupPermission::MKNOD:
return "MKNOD";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DeviceCgroupPermissionMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/Host.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
Host::Host() :
m_sourcePathHasBeenSet(false)
{
}
Host::Host(JsonView jsonValue) :
m_sourcePathHasBeenSet(false)
{
*this = jsonValue;
}
Host& Host::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("sourcePath"))
{
m_sourcePath = jsonValue.GetString("sourcePath");
m_sourcePathHasBeenSet = true;
}
return *this;
}
JsonValue Host::Jsonize() const
{
JsonValue payload;
if(m_sourcePathHasBeenSet)
{
payload.WithString("sourcePath", m_sourcePath);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/JQState.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 Batch
{
namespace Model
{
namespace JQStateMapper
{
static const int ENABLED_HASH = HashingUtils::HashString("ENABLED");
static const int DISABLED_HASH = HashingUtils::HashString("DISABLED");
JQState GetJQStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ENABLED_HASH)
{
return JQState::ENABLED;
}
else if (hashCode == DISABLED_HASH)
{
return JQState::DISABLED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JQState>(hashCode);
}
return JQState::NOT_SET;
}
Aws::String GetNameForJQState(JQState enumValue)
{
switch(enumValue)
{
case JQState::ENABLED:
return "ENABLED";
case JQState::DISABLED:
return "DISABLED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JQStateMapper
} // namespace Model
} // namespace Batch
} // 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/batch/model/JQStatus.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 Batch
{
namespace Model
{
namespace JQStatusMapper
{
static const int CREATING_HASH = HashingUtils::HashString("CREATING");
static const int UPDATING_HASH = HashingUtils::HashString("UPDATING");
static const int DELETING_HASH = HashingUtils::HashString("DELETING");
static const int DELETED_HASH = HashingUtils::HashString("DELETED");
static const int VALID_HASH = HashingUtils::HashString("VALID");
static const int INVALID_HASH = HashingUtils::HashString("INVALID");
JQStatus GetJQStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATING_HASH)
{
return JQStatus::CREATING;
}
else if (hashCode == UPDATING_HASH)
{
return JQStatus::UPDATING;
}
else if (hashCode == DELETING_HASH)
{
return JQStatus::DELETING;
}
else if (hashCode == DELETED_HASH)
{
return JQStatus::DELETED;
}
else if (hashCode == VALID_HASH)
{
return JQStatus::VALID;
}
else if (hashCode == INVALID_HASH)
{
return JQStatus::INVALID;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JQStatus>(hashCode);
}
return JQStatus::NOT_SET;
}
Aws::String GetNameForJQStatus(JQStatus enumValue)
{
switch(enumValue)
{
case JQStatus::CREATING:
return "CREATING";
case JQStatus::UPDATING:
return "UPDATING";
case JQStatus::DELETING:
return "DELETING";
case JQStatus::DELETED:
return "DELETED";
case JQStatus::VALID:
return "VALID";
case JQStatus::INVALID:
return "INVALID";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JQStatusMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,204 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobDefinition.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobDefinition::JobDefinition() :
m_jobDefinitionNameHasBeenSet(false),
m_jobDefinitionArnHasBeenSet(false),
m_revision(0),
m_revisionHasBeenSet(false),
m_statusHasBeenSet(false),
m_typeHasBeenSet(false),
m_parametersHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_containerPropertiesHasBeenSet(false),
m_timeoutHasBeenSet(false),
m_nodePropertiesHasBeenSet(false)
{
}
JobDefinition::JobDefinition(JsonView jsonValue) :
m_jobDefinitionNameHasBeenSet(false),
m_jobDefinitionArnHasBeenSet(false),
m_revision(0),
m_revisionHasBeenSet(false),
m_statusHasBeenSet(false),
m_typeHasBeenSet(false),
m_parametersHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_containerPropertiesHasBeenSet(false),
m_timeoutHasBeenSet(false),
m_nodePropertiesHasBeenSet(false)
{
*this = jsonValue;
}
JobDefinition& JobDefinition::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("jobDefinitionName"))
{
m_jobDefinitionName = jsonValue.GetString("jobDefinitionName");
m_jobDefinitionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("jobDefinitionArn"))
{
m_jobDefinitionArn = jsonValue.GetString("jobDefinitionArn");
m_jobDefinitionArnHasBeenSet = true;
}
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetInteger("revision");
m_revisionHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetString("status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = jsonValue.GetString("type");
m_typeHasBeenSet = true;
}
if(jsonValue.ValueExists("parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
m_parameters[parametersItem.first] = parametersItem.second.AsString();
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("retryStrategy"))
{
m_retryStrategy = jsonValue.GetObject("retryStrategy");
m_retryStrategyHasBeenSet = true;
}
if(jsonValue.ValueExists("containerProperties"))
{
m_containerProperties = jsonValue.GetObject("containerProperties");
m_containerPropertiesHasBeenSet = true;
}
if(jsonValue.ValueExists("timeout"))
{
m_timeout = jsonValue.GetObject("timeout");
m_timeoutHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeProperties"))
{
m_nodeProperties = jsonValue.GetObject("nodeProperties");
m_nodePropertiesHasBeenSet = true;
}
return *this;
}
JsonValue JobDefinition::Jsonize() const
{
JsonValue payload;
if(m_jobDefinitionNameHasBeenSet)
{
payload.WithString("jobDefinitionName", m_jobDefinitionName);
}
if(m_jobDefinitionArnHasBeenSet)
{
payload.WithString("jobDefinitionArn", m_jobDefinitionArn);
}
if(m_revisionHasBeenSet)
{
payload.WithInteger("revision", m_revision);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", m_status);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", m_type);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
parametersJsonMap.WithString(parametersItem.first, parametersItem.second);
}
payload.WithObject("parameters", std::move(parametersJsonMap));
}
if(m_retryStrategyHasBeenSet)
{
payload.WithObject("retryStrategy", m_retryStrategy.Jsonize());
}
if(m_containerPropertiesHasBeenSet)
{
payload.WithObject("containerProperties", m_containerProperties.Jsonize());
}
if(m_timeoutHasBeenSet)
{
payload.WithObject("timeout", m_timeout.Jsonize());
}
if(m_nodePropertiesHasBeenSet)
{
payload.WithObject("nodeProperties", m_nodeProperties.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/JobDefinitionType.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 Batch
{
namespace Model
{
namespace JobDefinitionTypeMapper
{
static const int container_HASH = HashingUtils::HashString("container");
static const int multinode_HASH = HashingUtils::HashString("multinode");
JobDefinitionType GetJobDefinitionTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == container_HASH)
{
return JobDefinitionType::container;
}
else if (hashCode == multinode_HASH)
{
return JobDefinitionType::multinode;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JobDefinitionType>(hashCode);
}
return JobDefinitionType::NOT_SET;
}
Aws::String GetNameForJobDefinitionType(JobDefinitionType enumValue)
{
switch(enumValue)
{
case JobDefinitionType::container:
return "container";
case JobDefinitionType::multinode:
return "multinode";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JobDefinitionTypeMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobDependency.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobDependency::JobDependency() :
m_jobIdHasBeenSet(false),
m_type(ArrayJobDependency::NOT_SET),
m_typeHasBeenSet(false)
{
}
JobDependency::JobDependency(JsonView jsonValue) :
m_jobIdHasBeenSet(false),
m_type(ArrayJobDependency::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
JobDependency& JobDependency::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("jobId"))
{
m_jobId = jsonValue.GetString("jobId");
m_jobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = ArrayJobDependencyMapper::GetArrayJobDependencyForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue JobDependency::Jsonize() const
{
JsonValue payload;
if(m_jobIdHasBeenSet)
{
payload.WithString("jobId", m_jobId);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", ArrayJobDependencyMapper::GetNameForArrayJobDependency(m_type));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,345 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobDetail::JobDetail() :
m_jobNameHasBeenSet(false),
m_jobIdHasBeenSet(false),
m_jobQueueHasBeenSet(false),
m_status(JobStatus::NOT_SET),
m_statusHasBeenSet(false),
m_attemptsHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_createdAt(0),
m_createdAtHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_dependsOnHasBeenSet(false),
m_jobDefinitionHasBeenSet(false),
m_parametersHasBeenSet(false),
m_containerHasBeenSet(false),
m_nodeDetailsHasBeenSet(false),
m_nodePropertiesHasBeenSet(false),
m_arrayPropertiesHasBeenSet(false),
m_timeoutHasBeenSet(false)
{
}
JobDetail::JobDetail(JsonView jsonValue) :
m_jobNameHasBeenSet(false),
m_jobIdHasBeenSet(false),
m_jobQueueHasBeenSet(false),
m_status(JobStatus::NOT_SET),
m_statusHasBeenSet(false),
m_attemptsHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_createdAt(0),
m_createdAtHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_dependsOnHasBeenSet(false),
m_jobDefinitionHasBeenSet(false),
m_parametersHasBeenSet(false),
m_containerHasBeenSet(false),
m_nodeDetailsHasBeenSet(false),
m_nodePropertiesHasBeenSet(false),
m_arrayPropertiesHasBeenSet(false),
m_timeoutHasBeenSet(false)
{
*this = jsonValue;
}
JobDetail& JobDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("jobName"))
{
m_jobName = jsonValue.GetString("jobName");
m_jobNameHasBeenSet = true;
}
if(jsonValue.ValueExists("jobId"))
{
m_jobId = jsonValue.GetString("jobId");
m_jobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("jobQueue"))
{
m_jobQueue = jsonValue.GetString("jobQueue");
m_jobQueueHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = JobStatusMapper::GetJobStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("attempts"))
{
Array<JsonView> attemptsJsonList = jsonValue.GetArray("attempts");
for(unsigned attemptsIndex = 0; attemptsIndex < attemptsJsonList.GetLength(); ++attemptsIndex)
{
m_attempts.push_back(attemptsJsonList[attemptsIndex].AsObject());
}
m_attemptsHasBeenSet = true;
}
if(jsonValue.ValueExists("statusReason"))
{
m_statusReason = jsonValue.GetString("statusReason");
m_statusReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetInt64("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("retryStrategy"))
{
m_retryStrategy = jsonValue.GetObject("retryStrategy");
m_retryStrategyHasBeenSet = true;
}
if(jsonValue.ValueExists("startedAt"))
{
m_startedAt = jsonValue.GetInt64("startedAt");
m_startedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("stoppedAt"))
{
m_stoppedAt = jsonValue.GetInt64("stoppedAt");
m_stoppedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("dependsOn"))
{
Array<JsonView> dependsOnJsonList = jsonValue.GetArray("dependsOn");
for(unsigned dependsOnIndex = 0; dependsOnIndex < dependsOnJsonList.GetLength(); ++dependsOnIndex)
{
m_dependsOn.push_back(dependsOnJsonList[dependsOnIndex].AsObject());
}
m_dependsOnHasBeenSet = true;
}
if(jsonValue.ValueExists("jobDefinition"))
{
m_jobDefinition = jsonValue.GetString("jobDefinition");
m_jobDefinitionHasBeenSet = true;
}
if(jsonValue.ValueExists("parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
m_parameters[parametersItem.first] = parametersItem.second.AsString();
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("container"))
{
m_container = jsonValue.GetObject("container");
m_containerHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeDetails"))
{
m_nodeDetails = jsonValue.GetObject("nodeDetails");
m_nodeDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeProperties"))
{
m_nodeProperties = jsonValue.GetObject("nodeProperties");
m_nodePropertiesHasBeenSet = true;
}
if(jsonValue.ValueExists("arrayProperties"))
{
m_arrayProperties = jsonValue.GetObject("arrayProperties");
m_arrayPropertiesHasBeenSet = true;
}
if(jsonValue.ValueExists("timeout"))
{
m_timeout = jsonValue.GetObject("timeout");
m_timeoutHasBeenSet = true;
}
return *this;
}
JsonValue JobDetail::Jsonize() const
{
JsonValue payload;
if(m_jobNameHasBeenSet)
{
payload.WithString("jobName", m_jobName);
}
if(m_jobIdHasBeenSet)
{
payload.WithString("jobId", m_jobId);
}
if(m_jobQueueHasBeenSet)
{
payload.WithString("jobQueue", m_jobQueue);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", JobStatusMapper::GetNameForJobStatus(m_status));
}
if(m_attemptsHasBeenSet)
{
Array<JsonValue> attemptsJsonList(m_attempts.size());
for(unsigned attemptsIndex = 0; attemptsIndex < attemptsJsonList.GetLength(); ++attemptsIndex)
{
attemptsJsonList[attemptsIndex].AsObject(m_attempts[attemptsIndex].Jsonize());
}
payload.WithArray("attempts", std::move(attemptsJsonList));
}
if(m_statusReasonHasBeenSet)
{
payload.WithString("statusReason", m_statusReason);
}
if(m_createdAtHasBeenSet)
{
payload.WithInt64("createdAt", m_createdAt);
}
if(m_retryStrategyHasBeenSet)
{
payload.WithObject("retryStrategy", m_retryStrategy.Jsonize());
}
if(m_startedAtHasBeenSet)
{
payload.WithInt64("startedAt", m_startedAt);
}
if(m_stoppedAtHasBeenSet)
{
payload.WithInt64("stoppedAt", m_stoppedAt);
}
if(m_dependsOnHasBeenSet)
{
Array<JsonValue> dependsOnJsonList(m_dependsOn.size());
for(unsigned dependsOnIndex = 0; dependsOnIndex < dependsOnJsonList.GetLength(); ++dependsOnIndex)
{
dependsOnJsonList[dependsOnIndex].AsObject(m_dependsOn[dependsOnIndex].Jsonize());
}
payload.WithArray("dependsOn", std::move(dependsOnJsonList));
}
if(m_jobDefinitionHasBeenSet)
{
payload.WithString("jobDefinition", m_jobDefinition);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
parametersJsonMap.WithString(parametersItem.first, parametersItem.second);
}
payload.WithObject("parameters", std::move(parametersJsonMap));
}
if(m_containerHasBeenSet)
{
payload.WithObject("container", m_container.Jsonize());
}
if(m_nodeDetailsHasBeenSet)
{
payload.WithObject("nodeDetails", m_nodeDetails.Jsonize());
}
if(m_nodePropertiesHasBeenSet)
{
payload.WithObject("nodeProperties", m_nodeProperties.Jsonize());
}
if(m_arrayPropertiesHasBeenSet)
{
payload.WithObject("arrayProperties", m_arrayProperties.Jsonize());
}
if(m_timeoutHasBeenSet)
{
payload.WithObject("timeout", m_timeout.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,161 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobQueueDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobQueueDetail::JobQueueDetail() :
m_jobQueueNameHasBeenSet(false),
m_jobQueueArnHasBeenSet(false),
m_state(JQState::NOT_SET),
m_stateHasBeenSet(false),
m_status(JQStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_priority(0),
m_priorityHasBeenSet(false),
m_computeEnvironmentOrderHasBeenSet(false)
{
}
JobQueueDetail::JobQueueDetail(JsonView jsonValue) :
m_jobQueueNameHasBeenSet(false),
m_jobQueueArnHasBeenSet(false),
m_state(JQState::NOT_SET),
m_stateHasBeenSet(false),
m_status(JQStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_priority(0),
m_priorityHasBeenSet(false),
m_computeEnvironmentOrderHasBeenSet(false)
{
*this = jsonValue;
}
JobQueueDetail& JobQueueDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("jobQueueName"))
{
m_jobQueueName = jsonValue.GetString("jobQueueName");
m_jobQueueNameHasBeenSet = true;
}
if(jsonValue.ValueExists("jobQueueArn"))
{
m_jobQueueArn = jsonValue.GetString("jobQueueArn");
m_jobQueueArnHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = JQStateMapper::GetJQStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = JQStatusMapper::GetJQStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("statusReason"))
{
m_statusReason = jsonValue.GetString("statusReason");
m_statusReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("priority"))
{
m_priority = jsonValue.GetInteger("priority");
m_priorityHasBeenSet = true;
}
if(jsonValue.ValueExists("computeEnvironmentOrder"))
{
Array<JsonView> computeEnvironmentOrderJsonList = jsonValue.GetArray("computeEnvironmentOrder");
for(unsigned computeEnvironmentOrderIndex = 0; computeEnvironmentOrderIndex < computeEnvironmentOrderJsonList.GetLength(); ++computeEnvironmentOrderIndex)
{
m_computeEnvironmentOrder.push_back(computeEnvironmentOrderJsonList[computeEnvironmentOrderIndex].AsObject());
}
m_computeEnvironmentOrderHasBeenSet = true;
}
return *this;
}
JsonValue JobQueueDetail::Jsonize() const
{
JsonValue payload;
if(m_jobQueueNameHasBeenSet)
{
payload.WithString("jobQueueName", m_jobQueueName);
}
if(m_jobQueueArnHasBeenSet)
{
payload.WithString("jobQueueArn", m_jobQueueArn);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", JQStateMapper::GetNameForJQState(m_state));
}
if(m_statusHasBeenSet)
{
payload.WithString("status", JQStatusMapper::GetNameForJQStatus(m_status));
}
if(m_statusReasonHasBeenSet)
{
payload.WithString("statusReason", m_statusReason);
}
if(m_priorityHasBeenSet)
{
payload.WithInteger("priority", m_priority);
}
if(m_computeEnvironmentOrderHasBeenSet)
{
Array<JsonValue> computeEnvironmentOrderJsonList(m_computeEnvironmentOrder.size());
for(unsigned computeEnvironmentOrderIndex = 0; computeEnvironmentOrderIndex < computeEnvironmentOrderJsonList.GetLength(); ++computeEnvironmentOrderIndex)
{
computeEnvironmentOrderJsonList[computeEnvironmentOrderIndex].AsObject(m_computeEnvironmentOrder[computeEnvironmentOrderIndex].Jsonize());
}
payload.WithArray("computeEnvironmentOrder", std::move(computeEnvironmentOrderJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/JobStatus.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 Batch
{
namespace Model
{
namespace JobStatusMapper
{
static const int SUBMITTED_HASH = HashingUtils::HashString("SUBMITTED");
static const int PENDING_HASH = HashingUtils::HashString("PENDING");
static const int RUNNABLE_HASH = HashingUtils::HashString("RUNNABLE");
static const int STARTING_HASH = HashingUtils::HashString("STARTING");
static const int RUNNING_HASH = HashingUtils::HashString("RUNNING");
static const int SUCCEEDED_HASH = HashingUtils::HashString("SUCCEEDED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
JobStatus GetJobStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SUBMITTED_HASH)
{
return JobStatus::SUBMITTED;
}
else if (hashCode == PENDING_HASH)
{
return JobStatus::PENDING;
}
else if (hashCode == RUNNABLE_HASH)
{
return JobStatus::RUNNABLE;
}
else if (hashCode == STARTING_HASH)
{
return JobStatus::STARTING;
}
else if (hashCode == RUNNING_HASH)
{
return JobStatus::RUNNING;
}
else if (hashCode == SUCCEEDED_HASH)
{
return JobStatus::SUCCEEDED;
}
else if (hashCode == FAILED_HASH)
{
return JobStatus::FAILED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<JobStatus>(hashCode);
}
return JobStatus::NOT_SET;
}
Aws::String GetNameForJobStatus(JobStatus enumValue)
{
switch(enumValue)
{
case JobStatus::SUBMITTED:
return "SUBMITTED";
case JobStatus::PENDING:
return "PENDING";
case JobStatus::RUNNABLE:
return "RUNNABLE";
case JobStatus::STARTING:
return "STARTING";
case JobStatus::RUNNING:
return "RUNNING";
case JobStatus::SUCCEEDED:
return "SUCCEEDED";
case JobStatus::FAILED:
return "FAILED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace JobStatusMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,201 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobSummary::JobSummary() :
m_jobIdHasBeenSet(false),
m_jobNameHasBeenSet(false),
m_createdAt(0),
m_createdAtHasBeenSet(false),
m_status(JobStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_containerHasBeenSet(false),
m_arrayPropertiesHasBeenSet(false),
m_nodePropertiesHasBeenSet(false)
{
}
JobSummary::JobSummary(JsonView jsonValue) :
m_jobIdHasBeenSet(false),
m_jobNameHasBeenSet(false),
m_createdAt(0),
m_createdAtHasBeenSet(false),
m_status(JobStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusReasonHasBeenSet(false),
m_startedAt(0),
m_startedAtHasBeenSet(false),
m_stoppedAt(0),
m_stoppedAtHasBeenSet(false),
m_containerHasBeenSet(false),
m_arrayPropertiesHasBeenSet(false),
m_nodePropertiesHasBeenSet(false)
{
*this = jsonValue;
}
JobSummary& JobSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("jobId"))
{
m_jobId = jsonValue.GetString("jobId");
m_jobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("jobName"))
{
m_jobName = jsonValue.GetString("jobName");
m_jobNameHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetInt64("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = JobStatusMapper::GetJobStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("statusReason"))
{
m_statusReason = jsonValue.GetString("statusReason");
m_statusReasonHasBeenSet = true;
}
if(jsonValue.ValueExists("startedAt"))
{
m_startedAt = jsonValue.GetInt64("startedAt");
m_startedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("stoppedAt"))
{
m_stoppedAt = jsonValue.GetInt64("stoppedAt");
m_stoppedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("container"))
{
m_container = jsonValue.GetObject("container");
m_containerHasBeenSet = true;
}
if(jsonValue.ValueExists("arrayProperties"))
{
m_arrayProperties = jsonValue.GetObject("arrayProperties");
m_arrayPropertiesHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeProperties"))
{
m_nodeProperties = jsonValue.GetObject("nodeProperties");
m_nodePropertiesHasBeenSet = true;
}
return *this;
}
JsonValue JobSummary::Jsonize() const
{
JsonValue payload;
if(m_jobIdHasBeenSet)
{
payload.WithString("jobId", m_jobId);
}
if(m_jobNameHasBeenSet)
{
payload.WithString("jobName", m_jobName);
}
if(m_createdAtHasBeenSet)
{
payload.WithInt64("createdAt", m_createdAt);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", JobStatusMapper::GetNameForJobStatus(m_status));
}
if(m_statusReasonHasBeenSet)
{
payload.WithString("statusReason", m_statusReason);
}
if(m_startedAtHasBeenSet)
{
payload.WithInt64("startedAt", m_startedAt);
}
if(m_stoppedAtHasBeenSet)
{
payload.WithInt64("stoppedAt", m_stoppedAt);
}
if(m_containerHasBeenSet)
{
payload.WithObject("container", m_container.Jsonize());
}
if(m_arrayPropertiesHasBeenSet)
{
payload.WithObject("arrayProperties", m_arrayProperties.Jsonize());
}
if(m_nodePropertiesHasBeenSet)
{
payload.WithObject("nodeProperties", m_nodeProperties.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/JobTimeout.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
JobTimeout::JobTimeout() :
m_attemptDurationSeconds(0),
m_attemptDurationSecondsHasBeenSet(false)
{
}
JobTimeout::JobTimeout(JsonView jsonValue) :
m_attemptDurationSeconds(0),
m_attemptDurationSecondsHasBeenSet(false)
{
*this = jsonValue;
}
JobTimeout& JobTimeout::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("attemptDurationSeconds"))
{
m_attemptDurationSeconds = jsonValue.GetInteger("attemptDurationSeconds");
m_attemptDurationSecondsHasBeenSet = true;
}
return *this;
}
JsonValue JobTimeout::Jsonize() const
{
JsonValue payload;
if(m_attemptDurationSecondsHasBeenSet)
{
payload.WithInteger("attemptDurationSeconds", m_attemptDurationSeconds);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/KeyValuePair.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
KeyValuePair::KeyValuePair() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
KeyValuePair::KeyValuePair(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
KeyValuePair& KeyValuePair::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue KeyValuePair::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/LaunchTemplateSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
LaunchTemplateSpecification::LaunchTemplateSpecification() :
m_launchTemplateIdHasBeenSet(false),
m_launchTemplateNameHasBeenSet(false),
m_versionHasBeenSet(false)
{
}
LaunchTemplateSpecification::LaunchTemplateSpecification(JsonView jsonValue) :
m_launchTemplateIdHasBeenSet(false),
m_launchTemplateNameHasBeenSet(false),
m_versionHasBeenSet(false)
{
*this = jsonValue;
}
LaunchTemplateSpecification& LaunchTemplateSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("launchTemplateId"))
{
m_launchTemplateId = jsonValue.GetString("launchTemplateId");
m_launchTemplateIdHasBeenSet = true;
}
if(jsonValue.ValueExists("launchTemplateName"))
{
m_launchTemplateName = jsonValue.GetString("launchTemplateName");
m_launchTemplateNameHasBeenSet = true;
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
m_versionHasBeenSet = true;
}
return *this;
}
JsonValue LaunchTemplateSpecification::Jsonize() const
{
JsonValue payload;
if(m_launchTemplateIdHasBeenSet)
{
payload.WithString("launchTemplateId", m_launchTemplateId);
}
if(m_launchTemplateNameHasBeenSet)
{
payload.WithString("launchTemplateName", m_launchTemplateName);
}
if(m_versionHasBeenSet)
{
payload.WithString("version", m_version);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

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

View File

@@ -0,0 +1,71 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ListJobsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListJobsRequest::ListJobsRequest() :
m_jobQueueHasBeenSet(false),
m_arrayJobIdHasBeenSet(false),
m_multiNodeJobIdHasBeenSet(false),
m_jobStatus(JobStatus::NOT_SET),
m_jobStatusHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListJobsRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobQueueHasBeenSet)
{
payload.WithString("jobQueue", m_jobQueue);
}
if(m_arrayJobIdHasBeenSet)
{
payload.WithString("arrayJobId", m_arrayJobId);
}
if(m_multiNodeJobIdHasBeenSet)
{
payload.WithString("multiNodeJobId", m_multiNodeJobId);
}
if(m_jobStatusHasBeenSet)
{
payload.WithString("jobStatus", JobStatusMapper::GetNameForJobStatus(m_jobStatus));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/ListJobsResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListJobsResult::ListJobsResult()
{
}
ListJobsResult::ListJobsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListJobsResult& ListJobsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("jobSummaryList"))
{
Array<JsonView> jobSummaryListJsonList = jsonValue.GetArray("jobSummaryList");
for(unsigned jobSummaryListIndex = 0; jobSummaryListIndex < jobSummaryListJsonList.GetLength(); ++jobSummaryListIndex)
{
m_jobSummaryList.push_back(jobSummaryListJsonList[jobSummaryListIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/MountPoint.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
MountPoint::MountPoint() :
m_containerPathHasBeenSet(false),
m_readOnly(false),
m_readOnlyHasBeenSet(false),
m_sourceVolumeHasBeenSet(false)
{
}
MountPoint::MountPoint(JsonView jsonValue) :
m_containerPathHasBeenSet(false),
m_readOnly(false),
m_readOnlyHasBeenSet(false),
m_sourceVolumeHasBeenSet(false)
{
*this = jsonValue;
}
MountPoint& MountPoint::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("containerPath"))
{
m_containerPath = jsonValue.GetString("containerPath");
m_containerPathHasBeenSet = true;
}
if(jsonValue.ValueExists("readOnly"))
{
m_readOnly = jsonValue.GetBool("readOnly");
m_readOnlyHasBeenSet = true;
}
if(jsonValue.ValueExists("sourceVolume"))
{
m_sourceVolume = jsonValue.GetString("sourceVolume");
m_sourceVolumeHasBeenSet = true;
}
return *this;
}
JsonValue MountPoint::Jsonize() const
{
JsonValue payload;
if(m_containerPathHasBeenSet)
{
payload.WithString("containerPath", m_containerPath);
}
if(m_readOnlyHasBeenSet)
{
payload.WithBool("readOnly", m_readOnly);
}
if(m_sourceVolumeHasBeenSet)
{
payload.WithString("sourceVolume", m_sourceVolume);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/NetworkInterface.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NetworkInterface::NetworkInterface() :
m_attachmentIdHasBeenSet(false),
m_ipv6AddressHasBeenSet(false),
m_privateIpv4AddressHasBeenSet(false)
{
}
NetworkInterface::NetworkInterface(JsonView jsonValue) :
m_attachmentIdHasBeenSet(false),
m_ipv6AddressHasBeenSet(false),
m_privateIpv4AddressHasBeenSet(false)
{
*this = jsonValue;
}
NetworkInterface& NetworkInterface::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("attachmentId"))
{
m_attachmentId = jsonValue.GetString("attachmentId");
m_attachmentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ipv6Address"))
{
m_ipv6Address = jsonValue.GetString("ipv6Address");
m_ipv6AddressHasBeenSet = true;
}
if(jsonValue.ValueExists("privateIpv4Address"))
{
m_privateIpv4Address = jsonValue.GetString("privateIpv4Address");
m_privateIpv4AddressHasBeenSet = true;
}
return *this;
}
JsonValue NetworkInterface::Jsonize() const
{
JsonValue payload;
if(m_attachmentIdHasBeenSet)
{
payload.WithString("attachmentId", m_attachmentId);
}
if(m_ipv6AddressHasBeenSet)
{
payload.WithString("ipv6Address", m_ipv6Address);
}
if(m_privateIpv4AddressHasBeenSet)
{
payload.WithString("privateIpv4Address", m_privateIpv4Address);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/NodeDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodeDetails::NodeDetails() :
m_nodeIndex(0),
m_nodeIndexHasBeenSet(false),
m_isMainNode(false),
m_isMainNodeHasBeenSet(false)
{
}
NodeDetails::NodeDetails(JsonView jsonValue) :
m_nodeIndex(0),
m_nodeIndexHasBeenSet(false),
m_isMainNode(false),
m_isMainNodeHasBeenSet(false)
{
*this = jsonValue;
}
NodeDetails& NodeDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("nodeIndex"))
{
m_nodeIndex = jsonValue.GetInteger("nodeIndex");
m_nodeIndexHasBeenSet = true;
}
if(jsonValue.ValueExists("isMainNode"))
{
m_isMainNode = jsonValue.GetBool("isMainNode");
m_isMainNodeHasBeenSet = true;
}
return *this;
}
JsonValue NodeDetails::Jsonize() const
{
JsonValue payload;
if(m_nodeIndexHasBeenSet)
{
payload.WithInteger("nodeIndex", m_nodeIndex);
}
if(m_isMainNodeHasBeenSet)
{
payload.WithBool("isMainNode", m_isMainNode);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/NodeOverrides.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodeOverrides::NodeOverrides() :
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_nodePropertyOverridesHasBeenSet(false)
{
}
NodeOverrides::NodeOverrides(JsonView jsonValue) :
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_nodePropertyOverridesHasBeenSet(false)
{
*this = jsonValue;
}
NodeOverrides& NodeOverrides::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("numNodes"))
{
m_numNodes = jsonValue.GetInteger("numNodes");
m_numNodesHasBeenSet = true;
}
if(jsonValue.ValueExists("nodePropertyOverrides"))
{
Array<JsonView> nodePropertyOverridesJsonList = jsonValue.GetArray("nodePropertyOverrides");
for(unsigned nodePropertyOverridesIndex = 0; nodePropertyOverridesIndex < nodePropertyOverridesJsonList.GetLength(); ++nodePropertyOverridesIndex)
{
m_nodePropertyOverrides.push_back(nodePropertyOverridesJsonList[nodePropertyOverridesIndex].AsObject());
}
m_nodePropertyOverridesHasBeenSet = true;
}
return *this;
}
JsonValue NodeOverrides::Jsonize() const
{
JsonValue payload;
if(m_numNodesHasBeenSet)
{
payload.WithInteger("numNodes", m_numNodes);
}
if(m_nodePropertyOverridesHasBeenSet)
{
Array<JsonValue> nodePropertyOverridesJsonList(m_nodePropertyOverrides.size());
for(unsigned nodePropertyOverridesIndex = 0; nodePropertyOverridesIndex < nodePropertyOverridesJsonList.GetLength(); ++nodePropertyOverridesIndex)
{
nodePropertyOverridesJsonList[nodePropertyOverridesIndex].AsObject(m_nodePropertyOverrides[nodePropertyOverridesIndex].Jsonize());
}
payload.WithArray("nodePropertyOverrides", std::move(nodePropertyOverridesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/NodeProperties.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodeProperties::NodeProperties() :
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_mainNode(0),
m_mainNodeHasBeenSet(false),
m_nodeRangePropertiesHasBeenSet(false)
{
}
NodeProperties::NodeProperties(JsonView jsonValue) :
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_mainNode(0),
m_mainNodeHasBeenSet(false),
m_nodeRangePropertiesHasBeenSet(false)
{
*this = jsonValue;
}
NodeProperties& NodeProperties::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("numNodes"))
{
m_numNodes = jsonValue.GetInteger("numNodes");
m_numNodesHasBeenSet = true;
}
if(jsonValue.ValueExists("mainNode"))
{
m_mainNode = jsonValue.GetInteger("mainNode");
m_mainNodeHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeRangeProperties"))
{
Array<JsonView> nodeRangePropertiesJsonList = jsonValue.GetArray("nodeRangeProperties");
for(unsigned nodeRangePropertiesIndex = 0; nodeRangePropertiesIndex < nodeRangePropertiesJsonList.GetLength(); ++nodeRangePropertiesIndex)
{
m_nodeRangeProperties.push_back(nodeRangePropertiesJsonList[nodeRangePropertiesIndex].AsObject());
}
m_nodeRangePropertiesHasBeenSet = true;
}
return *this;
}
JsonValue NodeProperties::Jsonize() const
{
JsonValue payload;
if(m_numNodesHasBeenSet)
{
payload.WithInteger("numNodes", m_numNodes);
}
if(m_mainNodeHasBeenSet)
{
payload.WithInteger("mainNode", m_mainNode);
}
if(m_nodeRangePropertiesHasBeenSet)
{
Array<JsonValue> nodeRangePropertiesJsonList(m_nodeRangeProperties.size());
for(unsigned nodeRangePropertiesIndex = 0; nodeRangePropertiesIndex < nodeRangePropertiesJsonList.GetLength(); ++nodeRangePropertiesIndex)
{
nodeRangePropertiesJsonList[nodeRangePropertiesIndex].AsObject(m_nodeRangeProperties[nodeRangePropertiesIndex].Jsonize());
}
payload.WithArray("nodeRangeProperties", std::move(nodeRangePropertiesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,95 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/NodePropertiesSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodePropertiesSummary::NodePropertiesSummary() :
m_isMainNode(false),
m_isMainNodeHasBeenSet(false),
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_nodeIndex(0),
m_nodeIndexHasBeenSet(false)
{
}
NodePropertiesSummary::NodePropertiesSummary(JsonView jsonValue) :
m_isMainNode(false),
m_isMainNodeHasBeenSet(false),
m_numNodes(0),
m_numNodesHasBeenSet(false),
m_nodeIndex(0),
m_nodeIndexHasBeenSet(false)
{
*this = jsonValue;
}
NodePropertiesSummary& NodePropertiesSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("isMainNode"))
{
m_isMainNode = jsonValue.GetBool("isMainNode");
m_isMainNodeHasBeenSet = true;
}
if(jsonValue.ValueExists("numNodes"))
{
m_numNodes = jsonValue.GetInteger("numNodes");
m_numNodesHasBeenSet = true;
}
if(jsonValue.ValueExists("nodeIndex"))
{
m_nodeIndex = jsonValue.GetInteger("nodeIndex");
m_nodeIndexHasBeenSet = true;
}
return *this;
}
JsonValue NodePropertiesSummary::Jsonize() const
{
JsonValue payload;
if(m_isMainNodeHasBeenSet)
{
payload.WithBool("isMainNode", m_isMainNode);
}
if(m_numNodesHasBeenSet)
{
payload.WithInteger("numNodes", m_numNodes);
}
if(m_nodeIndexHasBeenSet)
{
payload.WithInteger("nodeIndex", m_nodeIndex);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/NodePropertyOverride.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodePropertyOverride::NodePropertyOverride() :
m_targetNodesHasBeenSet(false),
m_containerOverridesHasBeenSet(false)
{
}
NodePropertyOverride::NodePropertyOverride(JsonView jsonValue) :
m_targetNodesHasBeenSet(false),
m_containerOverridesHasBeenSet(false)
{
*this = jsonValue;
}
NodePropertyOverride& NodePropertyOverride::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("targetNodes"))
{
m_targetNodes = jsonValue.GetString("targetNodes");
m_targetNodesHasBeenSet = true;
}
if(jsonValue.ValueExists("containerOverrides"))
{
m_containerOverrides = jsonValue.GetObject("containerOverrides");
m_containerOverridesHasBeenSet = true;
}
return *this;
}
JsonValue NodePropertyOverride::Jsonize() const
{
JsonValue payload;
if(m_targetNodesHasBeenSet)
{
payload.WithString("targetNodes", m_targetNodes);
}
if(m_containerOverridesHasBeenSet)
{
payload.WithObject("containerOverrides", m_containerOverrides.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // 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/batch/model/NodeRangeProperty.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
NodeRangeProperty::NodeRangeProperty() :
m_targetNodesHasBeenSet(false),
m_containerHasBeenSet(false)
{
}
NodeRangeProperty::NodeRangeProperty(JsonView jsonValue) :
m_targetNodesHasBeenSet(false),
m_containerHasBeenSet(false)
{
*this = jsonValue;
}
NodeRangeProperty& NodeRangeProperty::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("targetNodes"))
{
m_targetNodes = jsonValue.GetString("targetNodes");
m_targetNodesHasBeenSet = true;
}
if(jsonValue.ValueExists("container"))
{
m_container = jsonValue.GetObject("container");
m_containerHasBeenSet = true;
}
return *this;
}
JsonValue NodeRangeProperty::Jsonize() const
{
JsonValue payload;
if(m_targetNodesHasBeenSet)
{
payload.WithString("targetNodes", m_targetNodes);
}
if(m_containerHasBeenSet)
{
payload.WithObject("container", m_container.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/RegisterJobDefinitionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
RegisterJobDefinitionRequest::RegisterJobDefinitionRequest() :
m_jobDefinitionNameHasBeenSet(false),
m_type(JobDefinitionType::NOT_SET),
m_typeHasBeenSet(false),
m_parametersHasBeenSet(false),
m_containerPropertiesHasBeenSet(false),
m_nodePropertiesHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_timeoutHasBeenSet(false)
{
}
Aws::String RegisterJobDefinitionRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobDefinitionNameHasBeenSet)
{
payload.WithString("jobDefinitionName", m_jobDefinitionName);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", JobDefinitionTypeMapper::GetNameForJobDefinitionType(m_type));
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
parametersJsonMap.WithString(parametersItem.first, parametersItem.second);
}
payload.WithObject("parameters", std::move(parametersJsonMap));
}
if(m_containerPropertiesHasBeenSet)
{
payload.WithObject("containerProperties", m_containerProperties.Jsonize());
}
if(m_nodePropertiesHasBeenSet)
{
payload.WithObject("nodeProperties", m_nodeProperties.Jsonize());
}
if(m_retryStrategyHasBeenSet)
{
payload.WithObject("retryStrategy", m_retryStrategy.Jsonize());
}
if(m_timeoutHasBeenSet)
{
payload.WithObject("timeout", m_timeout.Jsonize());
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,54 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/RegisterJobDefinitionResult.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::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
RegisterJobDefinitionResult::RegisterJobDefinitionResult() :
m_revision(0)
{
}
RegisterJobDefinitionResult::RegisterJobDefinitionResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_revision(0)
{
*this = result;
}
RegisterJobDefinitionResult& RegisterJobDefinitionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("jobDefinitionName"))
{
m_jobDefinitionName = jsonValue.GetString("jobDefinitionName");
}
if(jsonValue.ValueExists("jobDefinitionArn"))
{
m_jobDefinitionArn = jsonValue.GetString("jobDefinitionArn");
}
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetInteger("revision");
}
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/batch/model/ResourceRequirement.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
ResourceRequirement::ResourceRequirement() :
m_valueHasBeenSet(false),
m_type(ResourceType::NOT_SET),
m_typeHasBeenSet(false)
{
}
ResourceRequirement::ResourceRequirement(JsonView jsonValue) :
m_valueHasBeenSet(false),
m_type(ResourceType::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
ResourceRequirement& ResourceRequirement::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
if(jsonValue.ValueExists("type"))
{
m_type = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue ResourceRequirement::Jsonize() const
{
JsonValue payload;
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
if(m_typeHasBeenSet)
{
payload.WithString("type", ResourceTypeMapper::GetNameForResourceType(m_type));
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/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 Batch
{
namespace Model
{
namespace ResourceTypeMapper
{
static const int GPU_HASH = HashingUtils::HashString("GPU");
ResourceType GetResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == GPU_HASH)
{
return ResourceType::GPU;
}
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::GPU:
return "GPU";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeMapper
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/RetryStrategy.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
RetryStrategy::RetryStrategy() :
m_attempts(0),
m_attemptsHasBeenSet(false)
{
}
RetryStrategy::RetryStrategy(JsonView jsonValue) :
m_attempts(0),
m_attemptsHasBeenSet(false)
{
*this = jsonValue;
}
RetryStrategy& RetryStrategy::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("attempts"))
{
m_attempts = jsonValue.GetInteger("attempts");
m_attemptsHasBeenSet = true;
}
return *this;
}
JsonValue RetryStrategy::Jsonize() const
{
JsonValue payload;
if(m_attemptsHasBeenSet)
{
payload.WithInteger("attempts", m_attempts);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,108 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/SubmitJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SubmitJobRequest::SubmitJobRequest() :
m_jobNameHasBeenSet(false),
m_jobQueueHasBeenSet(false),
m_arrayPropertiesHasBeenSet(false),
m_dependsOnHasBeenSet(false),
m_jobDefinitionHasBeenSet(false),
m_parametersHasBeenSet(false),
m_containerOverridesHasBeenSet(false),
m_nodeOverridesHasBeenSet(false),
m_retryStrategyHasBeenSet(false),
m_timeoutHasBeenSet(false)
{
}
Aws::String SubmitJobRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobNameHasBeenSet)
{
payload.WithString("jobName", m_jobName);
}
if(m_jobQueueHasBeenSet)
{
payload.WithString("jobQueue", m_jobQueue);
}
if(m_arrayPropertiesHasBeenSet)
{
payload.WithObject("arrayProperties", m_arrayProperties.Jsonize());
}
if(m_dependsOnHasBeenSet)
{
Array<JsonValue> dependsOnJsonList(m_dependsOn.size());
for(unsigned dependsOnIndex = 0; dependsOnIndex < dependsOnJsonList.GetLength(); ++dependsOnIndex)
{
dependsOnJsonList[dependsOnIndex].AsObject(m_dependsOn[dependsOnIndex].Jsonize());
}
payload.WithArray("dependsOn", std::move(dependsOnJsonList));
}
if(m_jobDefinitionHasBeenSet)
{
payload.WithString("jobDefinition", m_jobDefinition);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
parametersJsonMap.WithString(parametersItem.first, parametersItem.second);
}
payload.WithObject("parameters", std::move(parametersJsonMap));
}
if(m_containerOverridesHasBeenSet)
{
payload.WithObject("containerOverrides", m_containerOverrides.Jsonize());
}
if(m_nodeOverridesHasBeenSet)
{
payload.WithObject("nodeOverrides", m_nodeOverrides.Jsonize());
}
if(m_retryStrategyHasBeenSet)
{
payload.WithObject("retryStrategy", m_retryStrategy.Jsonize());
}
if(m_timeoutHasBeenSet)
{
payload.WithObject("timeout", m_timeout.Jsonize());
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/TerminateJobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
TerminateJobRequest::TerminateJobRequest() :
m_jobIdHasBeenSet(false),
m_reasonHasBeenSet(false)
{
}
Aws::String TerminateJobRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobIdHasBeenSet)
{
payload.WithString("jobId", m_jobId);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", m_reason);
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/Ulimit.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
Ulimit::Ulimit() :
m_hardLimit(0),
m_hardLimitHasBeenSet(false),
m_nameHasBeenSet(false),
m_softLimit(0),
m_softLimitHasBeenSet(false)
{
}
Ulimit::Ulimit(JsonView jsonValue) :
m_hardLimit(0),
m_hardLimitHasBeenSet(false),
m_nameHasBeenSet(false),
m_softLimit(0),
m_softLimitHasBeenSet(false)
{
*this = jsonValue;
}
Ulimit& Ulimit::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("hardLimit"))
{
m_hardLimit = jsonValue.GetInteger("hardLimit");
m_hardLimitHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("softLimit"))
{
m_softLimit = jsonValue.GetInteger("softLimit");
m_softLimitHasBeenSet = true;
}
return *this;
}
JsonValue Ulimit::Jsonize() const
{
JsonValue payload;
if(m_hardLimitHasBeenSet)
{
payload.WithInteger("hardLimit", m_hardLimit);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_softLimitHasBeenSet)
{
payload.WithInteger("softLimit", m_softLimit);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws

View File

@@ -0,0 +1,56 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/UpdateComputeEnvironmentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateComputeEnvironmentRequest::UpdateComputeEnvironmentRequest() :
m_computeEnvironmentHasBeenSet(false),
m_state(CEState::NOT_SET),
m_stateHasBeenSet(false),
m_computeResourcesHasBeenSet(false),
m_serviceRoleHasBeenSet(false)
{
}
Aws::String UpdateComputeEnvironmentRequest::SerializePayload() const
{
JsonValue payload;
if(m_computeEnvironmentHasBeenSet)
{
payload.WithString("computeEnvironment", m_computeEnvironment);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", CEStateMapper::GetNameForCEState(m_state));
}
if(m_computeResourcesHasBeenSet)
{
payload.WithObject("computeResources", m_computeResources.Jsonize());
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("serviceRole", m_serviceRole);
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/UpdateJobQueueRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Batch::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateJobQueueRequest::UpdateJobQueueRequest() :
m_jobQueueHasBeenSet(false),
m_state(JQState::NOT_SET),
m_stateHasBeenSet(false),
m_priority(0),
m_priorityHasBeenSet(false),
m_computeEnvironmentOrderHasBeenSet(false)
{
}
Aws::String UpdateJobQueueRequest::SerializePayload() const
{
JsonValue payload;
if(m_jobQueueHasBeenSet)
{
payload.WithString("jobQueue", m_jobQueue);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", JQStateMapper::GetNameForJQState(m_state));
}
if(m_priorityHasBeenSet)
{
payload.WithInteger("priority", m_priority);
}
if(m_computeEnvironmentOrderHasBeenSet)
{
Array<JsonValue> computeEnvironmentOrderJsonList(m_computeEnvironmentOrder.size());
for(unsigned computeEnvironmentOrderIndex = 0; computeEnvironmentOrderIndex < computeEnvironmentOrderJsonList.GetLength(); ++computeEnvironmentOrderIndex)
{
computeEnvironmentOrderJsonList[computeEnvironmentOrderIndex].AsObject(m_computeEnvironmentOrder[computeEnvironmentOrderIndex].Jsonize());
}
payload.WithArray("computeEnvironmentOrder", std::move(computeEnvironmentOrderJsonList));
}
return payload.View().WriteReadable();
}

View File

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

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/batch/model/Volume.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Batch
{
namespace Model
{
Volume::Volume() :
m_hostHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
Volume::Volume(JsonView jsonValue) :
m_hostHasBeenSet(false),
m_nameHasBeenSet(false)
{
*this = jsonValue;
}
Volume& Volume::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("host"))
{
m_host = jsonValue.GetObject("host");
m_hostHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
return *this;
}
JsonValue Volume::Jsonize() const
{
JsonValue payload;
if(m_hostHasBeenSet)
{
payload.WithObject("host", m_host.Jsonize());
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
return payload;
}
} // namespace Model
} // namespace Batch
} // namespace Aws