/** * 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::ChimeSDKMessaging::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; SendChannelMessageResult::SendChannelMessageResult() { } SendChannelMessageResult::SendChannelMessageResult(const Aws::AmazonWebServiceResult& result) { *this = result; } SendChannelMessageResult& SendChannelMessageResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ChannelArn")) { m_channelArn = jsonValue.GetString("ChannelArn"); } if(jsonValue.ValueExists("MessageId")) { m_messageId = jsonValue.GetString("MessageId"); } if(jsonValue.ValueExists("Status")) { m_status = jsonValue.GetObject("Status"); } if(jsonValue.ValueExists("SubChannelId")) { m_subChannelId = jsonValue.GetString("SubChannelId"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }