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,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/AssociateServiceQuotaTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AssociateServiceQuotaTemplateRequest::AssociateServiceQuotaTemplateRequest()
{
}
Aws::String AssociateServiceQuotaTemplateRequest::SerializePayload() const
{
return "{}";
}
Aws::Http::HeaderValueCollection AssociateServiceQuotaTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.AssociateServiceQuotaTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/DeleteServiceQuotaIncreaseRequestFromTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteServiceQuotaIncreaseRequestFromTemplateRequest::DeleteServiceQuotaIncreaseRequestFromTemplateRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_awsRegionHasBeenSet(false)
{
}
Aws::String DeleteServiceQuotaIncreaseRequestFromTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_awsRegionHasBeenSet)
{
payload.WithString("AwsRegion", m_awsRegion);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteServiceQuotaIncreaseRequestFromTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.DeleteServiceQuotaIncreaseRequestFromTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/DisassociateServiceQuotaTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DisassociateServiceQuotaTemplateRequest::DisassociateServiceQuotaTemplateRequest()
{
}
Aws::String DisassociateServiceQuotaTemplateRequest::SerializePayload() const
{
return "{}";
}
Aws::Http::HeaderValueCollection DisassociateServiceQuotaTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.DisassociateServiceQuotaTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ErrorCode.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 ServiceQuotas
{
namespace Model
{
namespace ErrorCodeMapper
{
static const int DEPENDENCY_ACCESS_DENIED_ERROR_HASH = HashingUtils::HashString("DEPENDENCY_ACCESS_DENIED_ERROR");
static const int DEPENDENCY_THROTTLING_ERROR_HASH = HashingUtils::HashString("DEPENDENCY_THROTTLING_ERROR");
static const int DEPENDENCY_SERVICE_ERROR_HASH = HashingUtils::HashString("DEPENDENCY_SERVICE_ERROR");
static const int SERVICE_QUOTA_NOT_AVAILABLE_ERROR_HASH = HashingUtils::HashString("SERVICE_QUOTA_NOT_AVAILABLE_ERROR");
ErrorCode GetErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == DEPENDENCY_ACCESS_DENIED_ERROR_HASH)
{
return ErrorCode::DEPENDENCY_ACCESS_DENIED_ERROR;
}
else if (hashCode == DEPENDENCY_THROTTLING_ERROR_HASH)
{
return ErrorCode::DEPENDENCY_THROTTLING_ERROR;
}
else if (hashCode == DEPENDENCY_SERVICE_ERROR_HASH)
{
return ErrorCode::DEPENDENCY_SERVICE_ERROR;
}
else if (hashCode == SERVICE_QUOTA_NOT_AVAILABLE_ERROR_HASH)
{
return ErrorCode::SERVICE_QUOTA_NOT_AVAILABLE_ERROR;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ErrorCode>(hashCode);
}
return ErrorCode::NOT_SET;
}
Aws::String GetNameForErrorCode(ErrorCode enumValue)
{
switch(enumValue)
{
case ErrorCode::DEPENDENCY_ACCESS_DENIED_ERROR:
return "DEPENDENCY_ACCESS_DENIED_ERROR";
case ErrorCode::DEPENDENCY_THROTTLING_ERROR:
return "DEPENDENCY_THROTTLING_ERROR";
case ErrorCode::DEPENDENCY_SERVICE_ERROR:
return "DEPENDENCY_SERVICE_ERROR";
case ErrorCode::SERVICE_QUOTA_NOT_AVAILABLE_ERROR:
return "SERVICE_QUOTA_NOT_AVAILABLE_ERROR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ErrorCodeMapper
} // namespace Model
} // namespace ServiceQuotas
} // 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/service-quotas/model/ErrorReason.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
ErrorReason::ErrorReason() :
m_errorCode(ErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
}
ErrorReason::ErrorReason(JsonView jsonValue) :
m_errorCode(ErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
*this = jsonValue;
}
ErrorReason& ErrorReason::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ErrorCode"))
{
m_errorCode = ErrorCodeMapper::GetErrorCodeForName(jsonValue.GetString("ErrorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorMessage"))
{
m_errorMessage = jsonValue.GetString("ErrorMessage");
m_errorMessageHasBeenSet = true;
}
return *this;
}
JsonValue ErrorReason::Jsonize() const
{
JsonValue payload;
if(m_errorCodeHasBeenSet)
{
payload.WithString("ErrorCode", ErrorCodeMapper::GetNameForErrorCode(m_errorCode));
}
if(m_errorMessageHasBeenSet)
{
payload.WithString("ErrorMessage", m_errorMessage);
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/GetAWSDefaultServiceQuotaRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetAWSDefaultServiceQuotaRequest::GetAWSDefaultServiceQuotaRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false)
{
}
Aws::String GetAWSDefaultServiceQuotaRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetAWSDefaultServiceQuotaRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.GetAWSDefaultServiceQuota"));
return headers;
}

View File

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

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/GetAssociationForServiceQuotaTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetAssociationForServiceQuotaTemplateRequest::GetAssociationForServiceQuotaTemplateRequest()
{
}
Aws::String GetAssociationForServiceQuotaTemplateRequest::SerializePayload() const
{
return "{}";
}
Aws::Http::HeaderValueCollection GetAssociationForServiceQuotaTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.GetAssociationForServiceQuotaTemplate"));
return headers;
}

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/GetAssociationForServiceQuotaTemplateResult.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::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetAssociationForServiceQuotaTemplateResult::GetAssociationForServiceQuotaTemplateResult() :
m_serviceQuotaTemplateAssociationStatus(ServiceQuotaTemplateAssociationStatus::NOT_SET)
{
}
GetAssociationForServiceQuotaTemplateResult::GetAssociationForServiceQuotaTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_serviceQuotaTemplateAssociationStatus(ServiceQuotaTemplateAssociationStatus::NOT_SET)
{
*this = result;
}
GetAssociationForServiceQuotaTemplateResult& GetAssociationForServiceQuotaTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ServiceQuotaTemplateAssociationStatus"))
{
m_serviceQuotaTemplateAssociationStatus = ServiceQuotaTemplateAssociationStatusMapper::GetServiceQuotaTemplateAssociationStatusForName(jsonValue.GetString("ServiceQuotaTemplateAssociationStatus"));
}
return *this;
}

View File

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

View File

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

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/GetServiceQuotaIncreaseRequestFromTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetServiceQuotaIncreaseRequestFromTemplateRequest::GetServiceQuotaIncreaseRequestFromTemplateRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_awsRegionHasBeenSet(false)
{
}
Aws::String GetServiceQuotaIncreaseRequestFromTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_awsRegionHasBeenSet)
{
payload.WithString("AwsRegion", m_awsRegion);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetServiceQuotaIncreaseRequestFromTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.GetServiceQuotaIncreaseRequestFromTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/GetServiceQuotaRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetServiceQuotaRequest::GetServiceQuotaRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false)
{
}
Aws::String GetServiceQuotaRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetServiceQuotaRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.GetServiceQuota"));
return headers;
}

View File

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

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListAWSDefaultServiceQuotasRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAWSDefaultServiceQuotasRequest::ListAWSDefaultServiceQuotasRequest() :
m_serviceCodeHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAWSDefaultServiceQuotasRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAWSDefaultServiceQuotasRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListAWSDefaultServiceQuotas"));
return headers;
}

View File

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

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListRequestedServiceQuotaChangeHistoryByQuotaRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListRequestedServiceQuotaChangeHistoryByQuotaRequest::ListRequestedServiceQuotaChangeHistoryByQuotaRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_status(RequestStatus::NOT_SET),
m_statusHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListRequestedServiceQuotaChangeHistoryByQuotaRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", RequestStatusMapper::GetNameForRequestStatus(m_status));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListRequestedServiceQuotaChangeHistoryByQuotaRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistoryByQuota"));
return headers;
}

View File

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

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListRequestedServiceQuotaChangeHistoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListRequestedServiceQuotaChangeHistoryRequest::ListRequestedServiceQuotaChangeHistoryRequest() :
m_serviceCodeHasBeenSet(false),
m_status(RequestStatus::NOT_SET),
m_statusHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListRequestedServiceQuotaChangeHistoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", RequestStatusMapper::GetNameForRequestStatus(m_status));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListRequestedServiceQuotaChangeHistoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory"));
return headers;
}

View File

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

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListServiceQuotaIncreaseRequestsInTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListServiceQuotaIncreaseRequestsInTemplateRequest::ListServiceQuotaIncreaseRequestsInTemplateRequest() :
m_serviceCodeHasBeenSet(false),
m_awsRegionHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListServiceQuotaIncreaseRequestsInTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_awsRegionHasBeenSet)
{
payload.WithString("AwsRegion", m_awsRegion);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListServiceQuotaIncreaseRequestsInTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListServiceQuotaIncreaseRequestsInTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListServiceQuotasRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListServiceQuotasRequest::ListServiceQuotasRequest() :
m_serviceCodeHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListServiceQuotasRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListServiceQuotasRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListServiceQuotas"));
return headers;
}

View File

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

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ListServicesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListServicesRequest::ListServicesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListServicesRequest::SerializePayload() const
{
JsonValue payload;
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListServicesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.ListServices"));
return headers;
}

View File

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

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/MetricInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
MetricInfo::MetricInfo() :
m_metricNamespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_metricDimensionsHasBeenSet(false),
m_metricStatisticRecommendationHasBeenSet(false)
{
}
MetricInfo::MetricInfo(JsonView jsonValue) :
m_metricNamespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_metricDimensionsHasBeenSet(false),
m_metricStatisticRecommendationHasBeenSet(false)
{
*this = jsonValue;
}
MetricInfo& MetricInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("MetricNamespace"))
{
m_metricNamespace = jsonValue.GetString("MetricNamespace");
m_metricNamespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("MetricName"))
{
m_metricName = jsonValue.GetString("MetricName");
m_metricNameHasBeenSet = true;
}
if(jsonValue.ValueExists("MetricDimensions"))
{
Aws::Map<Aws::String, JsonView> metricDimensionsJsonMap = jsonValue.GetObject("MetricDimensions").GetAllObjects();
for(auto& metricDimensionsItem : metricDimensionsJsonMap)
{
m_metricDimensions[metricDimensionsItem.first] = metricDimensionsItem.second.AsString();
}
m_metricDimensionsHasBeenSet = true;
}
if(jsonValue.ValueExists("MetricStatisticRecommendation"))
{
m_metricStatisticRecommendation = jsonValue.GetString("MetricStatisticRecommendation");
m_metricStatisticRecommendationHasBeenSet = true;
}
return *this;
}
JsonValue MetricInfo::Jsonize() const
{
JsonValue payload;
if(m_metricNamespaceHasBeenSet)
{
payload.WithString("MetricNamespace", m_metricNamespace);
}
if(m_metricNameHasBeenSet)
{
payload.WithString("MetricName", m_metricName);
}
if(m_metricDimensionsHasBeenSet)
{
JsonValue metricDimensionsJsonMap;
for(auto& metricDimensionsItem : m_metricDimensions)
{
metricDimensionsJsonMap.WithString(metricDimensionsItem.first, metricDimensionsItem.second);
}
payload.WithObject("MetricDimensions", std::move(metricDimensionsJsonMap));
}
if(m_metricStatisticRecommendationHasBeenSet)
{
payload.WithString("MetricStatisticRecommendation", m_metricStatisticRecommendation);
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // 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/service-quotas/model/PeriodUnit.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 ServiceQuotas
{
namespace Model
{
namespace PeriodUnitMapper
{
static const int MICROSECOND_HASH = HashingUtils::HashString("MICROSECOND");
static const int MILLISECOND_HASH = HashingUtils::HashString("MILLISECOND");
static const int SECOND_HASH = HashingUtils::HashString("SECOND");
static const int MINUTE_HASH = HashingUtils::HashString("MINUTE");
static const int HOUR_HASH = HashingUtils::HashString("HOUR");
static const int DAY_HASH = HashingUtils::HashString("DAY");
static const int WEEK_HASH = HashingUtils::HashString("WEEK");
PeriodUnit GetPeriodUnitForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == MICROSECOND_HASH)
{
return PeriodUnit::MICROSECOND;
}
else if (hashCode == MILLISECOND_HASH)
{
return PeriodUnit::MILLISECOND;
}
else if (hashCode == SECOND_HASH)
{
return PeriodUnit::SECOND;
}
else if (hashCode == MINUTE_HASH)
{
return PeriodUnit::MINUTE;
}
else if (hashCode == HOUR_HASH)
{
return PeriodUnit::HOUR;
}
else if (hashCode == DAY_HASH)
{
return PeriodUnit::DAY;
}
else if (hashCode == WEEK_HASH)
{
return PeriodUnit::WEEK;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PeriodUnit>(hashCode);
}
return PeriodUnit::NOT_SET;
}
Aws::String GetNameForPeriodUnit(PeriodUnit enumValue)
{
switch(enumValue)
{
case PeriodUnit::MICROSECOND:
return "MICROSECOND";
case PeriodUnit::MILLISECOND:
return "MILLISECOND";
case PeriodUnit::SECOND:
return "SECOND";
case PeriodUnit::MINUTE:
return "MINUTE";
case PeriodUnit::HOUR:
return "HOUR";
case PeriodUnit::DAY:
return "DAY";
case PeriodUnit::WEEK:
return "WEEK";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PeriodUnitMapper
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/PutServiceQuotaIncreaseRequestIntoTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutServiceQuotaIncreaseRequestIntoTemplateRequest::PutServiceQuotaIncreaseRequestIntoTemplateRequest() :
m_quotaCodeHasBeenSet(false),
m_serviceCodeHasBeenSet(false),
m_awsRegionHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false)
{
}
Aws::String PutServiceQuotaIncreaseRequestIntoTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_awsRegionHasBeenSet)
{
payload.WithString("AwsRegion", m_awsRegion);
}
if(m_desiredValueHasBeenSet)
{
payload.WithDouble("DesiredValue", m_desiredValue);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PutServiceQuotaIncreaseRequestIntoTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.PutServiceQuotaIncreaseRequestIntoTemplate"));
return headers;
}

View File

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

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/QuotaPeriod.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
QuotaPeriod::QuotaPeriod() :
m_periodValue(0),
m_periodValueHasBeenSet(false),
m_periodUnit(PeriodUnit::NOT_SET),
m_periodUnitHasBeenSet(false)
{
}
QuotaPeriod::QuotaPeriod(JsonView jsonValue) :
m_periodValue(0),
m_periodValueHasBeenSet(false),
m_periodUnit(PeriodUnit::NOT_SET),
m_periodUnitHasBeenSet(false)
{
*this = jsonValue;
}
QuotaPeriod& QuotaPeriod::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PeriodValue"))
{
m_periodValue = jsonValue.GetInteger("PeriodValue");
m_periodValueHasBeenSet = true;
}
if(jsonValue.ValueExists("PeriodUnit"))
{
m_periodUnit = PeriodUnitMapper::GetPeriodUnitForName(jsonValue.GetString("PeriodUnit"));
m_periodUnitHasBeenSet = true;
}
return *this;
}
JsonValue QuotaPeriod::Jsonize() const
{
JsonValue payload;
if(m_periodValueHasBeenSet)
{
payload.WithInteger("PeriodValue", m_periodValue);
}
if(m_periodUnitHasBeenSet)
{
payload.WithString("PeriodUnit", PeriodUnitMapper::GetNameForPeriodUnit(m_periodUnit));
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/RequestServiceQuotaIncreaseRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
RequestServiceQuotaIncreaseRequest::RequestServiceQuotaIncreaseRequest() :
m_serviceCodeHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false)
{
}
Aws::String RequestServiceQuotaIncreaseRequest::SerializePayload() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_desiredValueHasBeenSet)
{
payload.WithDouble("DesiredValue", m_desiredValue);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection RequestServiceQuotaIncreaseRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "ServiceQuotasV20190624.RequestServiceQuotaIncrease"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/RequestServiceQuotaIncreaseResult.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::ServiceQuotas::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
RequestServiceQuotaIncreaseResult::RequestServiceQuotaIncreaseResult()
{
}
RequestServiceQuotaIncreaseResult::RequestServiceQuotaIncreaseResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
RequestServiceQuotaIncreaseResult& RequestServiceQuotaIncreaseResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("RequestedQuota"))
{
m_requestedQuota = jsonValue.GetObject("RequestedQuota");
}
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/service-quotas/model/RequestStatus.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 ServiceQuotas
{
namespace Model
{
namespace RequestStatusMapper
{
static const int PENDING_HASH = HashingUtils::HashString("PENDING");
static const int CASE_OPENED_HASH = HashingUtils::HashString("CASE_OPENED");
static const int APPROVED_HASH = HashingUtils::HashString("APPROVED");
static const int DENIED_HASH = HashingUtils::HashString("DENIED");
static const int CASE_CLOSED_HASH = HashingUtils::HashString("CASE_CLOSED");
RequestStatus GetRequestStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PENDING_HASH)
{
return RequestStatus::PENDING;
}
else if (hashCode == CASE_OPENED_HASH)
{
return RequestStatus::CASE_OPENED;
}
else if (hashCode == APPROVED_HASH)
{
return RequestStatus::APPROVED;
}
else if (hashCode == DENIED_HASH)
{
return RequestStatus::DENIED;
}
else if (hashCode == CASE_CLOSED_HASH)
{
return RequestStatus::CASE_CLOSED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<RequestStatus>(hashCode);
}
return RequestStatus::NOT_SET;
}
Aws::String GetNameForRequestStatus(RequestStatus enumValue)
{
switch(enumValue)
{
case RequestStatus::PENDING:
return "PENDING";
case RequestStatus::CASE_OPENED:
return "CASE_OPENED";
case RequestStatus::APPROVED:
return "APPROVED";
case RequestStatus::DENIED:
return "DENIED";
case RequestStatus::CASE_CLOSED:
return "CASE_CLOSED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace RequestStatusMapper
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,257 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/RequestedServiceQuotaChange.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
RequestedServiceQuotaChange::RequestedServiceQuotaChange() :
m_idHasBeenSet(false),
m_caseIdHasBeenSet(false),
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false),
m_status(RequestStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdHasBeenSet(false),
m_lastUpdatedHasBeenSet(false),
m_requesterHasBeenSet(false),
m_quotaArnHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false),
m_unitHasBeenSet(false)
{
}
RequestedServiceQuotaChange::RequestedServiceQuotaChange(JsonView jsonValue) :
m_idHasBeenSet(false),
m_caseIdHasBeenSet(false),
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false),
m_status(RequestStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdHasBeenSet(false),
m_lastUpdatedHasBeenSet(false),
m_requesterHasBeenSet(false),
m_quotaArnHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false),
m_unitHasBeenSet(false)
{
*this = jsonValue;
}
RequestedServiceQuotaChange& RequestedServiceQuotaChange::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("CaseId"))
{
m_caseId = jsonValue.GetString("CaseId");
m_caseIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceCode"))
{
m_serviceCode = jsonValue.GetString("ServiceCode");
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceName"))
{
m_serviceName = jsonValue.GetString("ServiceName");
m_serviceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaCode"))
{
m_quotaCode = jsonValue.GetString("QuotaCode");
m_quotaCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaName"))
{
m_quotaName = jsonValue.GetString("QuotaName");
m_quotaNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DesiredValue"))
{
m_desiredValue = jsonValue.GetDouble("DesiredValue");
m_desiredValueHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = RequestStatusMapper::GetRequestStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("Created"))
{
m_created = jsonValue.GetDouble("Created");
m_createdHasBeenSet = true;
}
if(jsonValue.ValueExists("LastUpdated"))
{
m_lastUpdated = jsonValue.GetDouble("LastUpdated");
m_lastUpdatedHasBeenSet = true;
}
if(jsonValue.ValueExists("Requester"))
{
m_requester = jsonValue.GetString("Requester");
m_requesterHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaArn"))
{
m_quotaArn = jsonValue.GetString("QuotaArn");
m_quotaArnHasBeenSet = true;
}
if(jsonValue.ValueExists("GlobalQuota"))
{
m_globalQuota = jsonValue.GetBool("GlobalQuota");
m_globalQuotaHasBeenSet = true;
}
if(jsonValue.ValueExists("Unit"))
{
m_unit = jsonValue.GetString("Unit");
m_unitHasBeenSet = true;
}
return *this;
}
JsonValue RequestedServiceQuotaChange::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_caseIdHasBeenSet)
{
payload.WithString("CaseId", m_caseId);
}
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_serviceNameHasBeenSet)
{
payload.WithString("ServiceName", m_serviceName);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_quotaNameHasBeenSet)
{
payload.WithString("QuotaName", m_quotaName);
}
if(m_desiredValueHasBeenSet)
{
payload.WithDouble("DesiredValue", m_desiredValue);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", RequestStatusMapper::GetNameForRequestStatus(m_status));
}
if(m_createdHasBeenSet)
{
payload.WithDouble("Created", m_created.SecondsWithMSPrecision());
}
if(m_lastUpdatedHasBeenSet)
{
payload.WithDouble("LastUpdated", m_lastUpdated.SecondsWithMSPrecision());
}
if(m_requesterHasBeenSet)
{
payload.WithString("Requester", m_requester);
}
if(m_quotaArnHasBeenSet)
{
payload.WithString("QuotaArn", m_quotaArn);
}
if(m_globalQuotaHasBeenSet)
{
payload.WithBool("GlobalQuota", m_globalQuota);
}
if(m_unitHasBeenSet)
{
payload.WithString("Unit", m_unit);
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // 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/service-quotas/model/ServiceInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
ServiceInfo::ServiceInfo() :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false)
{
}
ServiceInfo::ServiceInfo(JsonView jsonValue) :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false)
{
*this = jsonValue;
}
ServiceInfo& ServiceInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ServiceCode"))
{
m_serviceCode = jsonValue.GetString("ServiceCode");
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceName"))
{
m_serviceName = jsonValue.GetString("ServiceName");
m_serviceNameHasBeenSet = true;
}
return *this;
}
JsonValue ServiceInfo::Jsonize() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_serviceNameHasBeenSet)
{
payload.WithString("ServiceName", m_serviceName);
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,230 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ServiceQuota.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
ServiceQuota::ServiceQuota() :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaArnHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false),
m_unitHasBeenSet(false),
m_adjustable(false),
m_adjustableHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false),
m_usageMetricHasBeenSet(false),
m_periodHasBeenSet(false),
m_errorReasonHasBeenSet(false)
{
}
ServiceQuota::ServiceQuota(JsonView jsonValue) :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaArnHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false),
m_unitHasBeenSet(false),
m_adjustable(false),
m_adjustableHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false),
m_usageMetricHasBeenSet(false),
m_periodHasBeenSet(false),
m_errorReasonHasBeenSet(false)
{
*this = jsonValue;
}
ServiceQuota& ServiceQuota::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ServiceCode"))
{
m_serviceCode = jsonValue.GetString("ServiceCode");
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceName"))
{
m_serviceName = jsonValue.GetString("ServiceName");
m_serviceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaArn"))
{
m_quotaArn = jsonValue.GetString("QuotaArn");
m_quotaArnHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaCode"))
{
m_quotaCode = jsonValue.GetString("QuotaCode");
m_quotaCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaName"))
{
m_quotaName = jsonValue.GetString("QuotaName");
m_quotaNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetDouble("Value");
m_valueHasBeenSet = true;
}
if(jsonValue.ValueExists("Unit"))
{
m_unit = jsonValue.GetString("Unit");
m_unitHasBeenSet = true;
}
if(jsonValue.ValueExists("Adjustable"))
{
m_adjustable = jsonValue.GetBool("Adjustable");
m_adjustableHasBeenSet = true;
}
if(jsonValue.ValueExists("GlobalQuota"))
{
m_globalQuota = jsonValue.GetBool("GlobalQuota");
m_globalQuotaHasBeenSet = true;
}
if(jsonValue.ValueExists("UsageMetric"))
{
m_usageMetric = jsonValue.GetObject("UsageMetric");
m_usageMetricHasBeenSet = true;
}
if(jsonValue.ValueExists("Period"))
{
m_period = jsonValue.GetObject("Period");
m_periodHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorReason"))
{
m_errorReason = jsonValue.GetObject("ErrorReason");
m_errorReasonHasBeenSet = true;
}
return *this;
}
JsonValue ServiceQuota::Jsonize() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_serviceNameHasBeenSet)
{
payload.WithString("ServiceName", m_serviceName);
}
if(m_quotaArnHasBeenSet)
{
payload.WithString("QuotaArn", m_quotaArn);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_quotaNameHasBeenSet)
{
payload.WithString("QuotaName", m_quotaName);
}
if(m_valueHasBeenSet)
{
payload.WithDouble("Value", m_value);
}
if(m_unitHasBeenSet)
{
payload.WithString("Unit", m_unit);
}
if(m_adjustableHasBeenSet)
{
payload.WithBool("Adjustable", m_adjustable);
}
if(m_globalQuotaHasBeenSet)
{
payload.WithBool("GlobalQuota", m_globalQuota);
}
if(m_usageMetricHasBeenSet)
{
payload.WithObject("UsageMetric", m_usageMetric.Jsonize());
}
if(m_periodHasBeenSet)
{
payload.WithObject("Period", m_period.Jsonize());
}
if(m_errorReasonHasBeenSet)
{
payload.WithObject("ErrorReason", m_errorReason.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws

View File

@@ -0,0 +1,168 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/service-quotas/model/ServiceQuotaIncreaseRequestInTemplate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ServiceQuotas
{
namespace Model
{
ServiceQuotaIncreaseRequestInTemplate::ServiceQuotaIncreaseRequestInTemplate() :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false),
m_awsRegionHasBeenSet(false),
m_unitHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false)
{
}
ServiceQuotaIncreaseRequestInTemplate::ServiceQuotaIncreaseRequestInTemplate(JsonView jsonValue) :
m_serviceCodeHasBeenSet(false),
m_serviceNameHasBeenSet(false),
m_quotaCodeHasBeenSet(false),
m_quotaNameHasBeenSet(false),
m_desiredValue(0.0),
m_desiredValueHasBeenSet(false),
m_awsRegionHasBeenSet(false),
m_unitHasBeenSet(false),
m_globalQuota(false),
m_globalQuotaHasBeenSet(false)
{
*this = jsonValue;
}
ServiceQuotaIncreaseRequestInTemplate& ServiceQuotaIncreaseRequestInTemplate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ServiceCode"))
{
m_serviceCode = jsonValue.GetString("ServiceCode");
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceName"))
{
m_serviceName = jsonValue.GetString("ServiceName");
m_serviceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaCode"))
{
m_quotaCode = jsonValue.GetString("QuotaCode");
m_quotaCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("QuotaName"))
{
m_quotaName = jsonValue.GetString("QuotaName");
m_quotaNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DesiredValue"))
{
m_desiredValue = jsonValue.GetDouble("DesiredValue");
m_desiredValueHasBeenSet = true;
}
if(jsonValue.ValueExists("AwsRegion"))
{
m_awsRegion = jsonValue.GetString("AwsRegion");
m_awsRegionHasBeenSet = true;
}
if(jsonValue.ValueExists("Unit"))
{
m_unit = jsonValue.GetString("Unit");
m_unitHasBeenSet = true;
}
if(jsonValue.ValueExists("GlobalQuota"))
{
m_globalQuota = jsonValue.GetBool("GlobalQuota");
m_globalQuotaHasBeenSet = true;
}
return *this;
}
JsonValue ServiceQuotaIncreaseRequestInTemplate::Jsonize() const
{
JsonValue payload;
if(m_serviceCodeHasBeenSet)
{
payload.WithString("ServiceCode", m_serviceCode);
}
if(m_serviceNameHasBeenSet)
{
payload.WithString("ServiceName", m_serviceName);
}
if(m_quotaCodeHasBeenSet)
{
payload.WithString("QuotaCode", m_quotaCode);
}
if(m_quotaNameHasBeenSet)
{
payload.WithString("QuotaName", m_quotaName);
}
if(m_desiredValueHasBeenSet)
{
payload.WithDouble("DesiredValue", m_desiredValue);
}
if(m_awsRegionHasBeenSet)
{
payload.WithString("AwsRegion", m_awsRegion);
}
if(m_unitHasBeenSet)
{
payload.WithString("Unit", m_unit);
}
if(m_globalQuotaHasBeenSet)
{
payload.WithBool("GlobalQuota", m_globalQuota);
}
return payload;
}
} // namespace Model
} // namespace ServiceQuotas
} // 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/service-quotas/model/ServiceQuotaTemplateAssociationStatus.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 ServiceQuotas
{
namespace Model
{
namespace ServiceQuotaTemplateAssociationStatusMapper
{
static const int ASSOCIATED_HASH = HashingUtils::HashString("ASSOCIATED");
static const int DISASSOCIATED_HASH = HashingUtils::HashString("DISASSOCIATED");
ServiceQuotaTemplateAssociationStatus GetServiceQuotaTemplateAssociationStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASSOCIATED_HASH)
{
return ServiceQuotaTemplateAssociationStatus::ASSOCIATED;
}
else if (hashCode == DISASSOCIATED_HASH)
{
return ServiceQuotaTemplateAssociationStatus::DISASSOCIATED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ServiceQuotaTemplateAssociationStatus>(hashCode);
}
return ServiceQuotaTemplateAssociationStatus::NOT_SET;
}
Aws::String GetNameForServiceQuotaTemplateAssociationStatus(ServiceQuotaTemplateAssociationStatus enumValue)
{
switch(enumValue)
{
case ServiceQuotaTemplateAssociationStatus::ASSOCIATED:
return "ASSOCIATED";
case ServiceQuotaTemplateAssociationStatus::DISASSOCIATED:
return "DISASSOCIATED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ServiceQuotaTemplateAssociationStatusMapper
} // namespace Model
} // namespace ServiceQuotas
} // namespace Aws