/** * 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::Scheduler::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetScheduleGroupResult::GetScheduleGroupResult() : m_state(ScheduleGroupState::NOT_SET) { } GetScheduleGroupResult::GetScheduleGroupResult(const Aws::AmazonWebServiceResult& result) : m_state(ScheduleGroupState::NOT_SET) { *this = result; } GetScheduleGroupResult& GetScheduleGroupResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); } if(jsonValue.ValueExists("CreationDate")) { m_creationDate = jsonValue.GetDouble("CreationDate"); } if(jsonValue.ValueExists("LastModificationDate")) { m_lastModificationDate = jsonValue.GetDouble("LastModificationDate"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("State")) { m_state = ScheduleGroupStateMapper::GetScheduleGroupStateForName(jsonValue.GetString("State")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }