/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::SSMContacts::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetRotationResult::GetRotationResult() { } GetRotationResult::GetRotationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GetRotationResult& GetRotationResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("RotationArn")) { m_rotationArn = jsonValue.GetString("RotationArn"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("ContactIds")) { Aws::Utils::Array contactIdsJsonList = jsonValue.GetArray("ContactIds"); for(unsigned contactIdsIndex = 0; contactIdsIndex < contactIdsJsonList.GetLength(); ++contactIdsIndex) { m_contactIds.push_back(contactIdsJsonList[contactIdsIndex].AsString()); } } if(jsonValue.ValueExists("StartTime")) { m_startTime = jsonValue.GetDouble("StartTime"); } if(jsonValue.ValueExists("TimeZoneId")) { m_timeZoneId = jsonValue.GetString("TimeZoneId"); } if(jsonValue.ValueExists("Recurrence")) { m_recurrence = jsonValue.GetObject("Recurrence"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }