This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-sagemaker/source/model/ListTrialsRequest.cpp

92 lines
2.0 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/ListTrialsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SageMaker::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTrialsRequest::ListTrialsRequest() :
m_experimentNameHasBeenSet(false),
m_trialComponentNameHasBeenSet(false),
m_createdAfterHasBeenSet(false),
m_createdBeforeHasBeenSet(false),
m_sortBy(SortTrialsBy::NOT_SET),
m_sortByHasBeenSet(false),
m_sortOrder(SortOrder::NOT_SET),
m_sortOrderHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListTrialsRequest::SerializePayload() const
{
JsonValue payload;
if(m_experimentNameHasBeenSet)
{
payload.WithString("ExperimentName", m_experimentName);
}
if(m_trialComponentNameHasBeenSet)
{
payload.WithString("TrialComponentName", m_trialComponentName);
}
if(m_createdAfterHasBeenSet)
{
payload.WithDouble("CreatedAfter", m_createdAfter.SecondsWithMSPrecision());
}
if(m_createdBeforeHasBeenSet)
{
payload.WithDouble("CreatedBefore", m_createdBefore.SecondsWithMSPrecision());
}
if(m_sortByHasBeenSet)
{
payload.WithString("SortBy", SortTrialsByMapper::GetNameForSortTrialsBy(m_sortBy));
}
if(m_sortOrderHasBeenSet)
{
payload.WithString("SortOrder", SortOrderMapper::GetNameForSortOrder(m_sortOrder));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListTrialsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "SageMaker.ListTrials"));
return headers;
}