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/DomainDetails.cpp

149 lines
2.9 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/DomainDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SageMaker
{
namespace Model
{
DomainDetails::DomainDetails() :
m_domainArnHasBeenSet(false),
m_domainIdHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
DomainDetails::DomainDetails(JsonView jsonValue) :
m_domainArnHasBeenSet(false),
m_domainIdHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
DomainDetails& DomainDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("DomainArn"))
{
m_domainArn = jsonValue.GetString("DomainArn");
m_domainArnHasBeenSet = true;
}
if(jsonValue.ValueExists("DomainId"))
{
m_domainId = jsonValue.GetString("DomainId");
m_domainIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DomainName"))
{
m_domainName = jsonValue.GetString("DomainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = DomainStatusMapper::GetDomainStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationTime"))
{
m_creationTime = jsonValue.GetDouble("CreationTime");
m_creationTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("LastModifiedTime"))
{
m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime");
m_lastModifiedTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("Url"))
{
m_url = jsonValue.GetString("Url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue DomainDetails::Jsonize() const
{
JsonValue payload;
if(m_domainArnHasBeenSet)
{
payload.WithString("DomainArn", m_domainArn);
}
if(m_domainIdHasBeenSet)
{
payload.WithString("DomainId", m_domainId);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("DomainName", m_domainName);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", DomainStatusMapper::GetNameForDomainStatus(m_status));
}
if(m_creationTimeHasBeenSet)
{
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
}
if(m_lastModifiedTimeHasBeenSet)
{
payload.WithDouble("LastModifiedTime", m_lastModifiedTime.SecondsWithMSPrecision());
}
if(m_urlHasBeenSet)
{
payload.WithString("Url", m_url);
}
return payload;
}
} // namespace Model
} // namespace SageMaker
} // namespace Aws