/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include using namespace Aws::Utils::Xml; using namespace Aws::Utils; namespace Aws { namespace CloudFront { namespace Model { FieldLevelEncryptionProfileSummary::FieldLevelEncryptionProfileSummary() : m_idHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_nameHasBeenSet(false), m_encryptionEntitiesHasBeenSet(false), m_commentHasBeenSet(false) { } FieldLevelEncryptionProfileSummary::FieldLevelEncryptionProfileSummary(const XmlNode& xmlNode) : m_idHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_nameHasBeenSet(false), m_encryptionEntitiesHasBeenSet(false), m_commentHasBeenSet(false) { *this = xmlNode; } FieldLevelEncryptionProfileSummary& FieldLevelEncryptionProfileSummary::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode idNode = resultNode.FirstChild("Id"); if(!idNode.IsNull()) { m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText()); m_idHasBeenSet = true; } XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime"); if(!lastModifiedTimeNode.IsNull()) { m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), Aws::Utils::DateFormat::ISO_8601); m_lastModifiedTimeHasBeenSet = true; } XmlNode nameNode = resultNode.FirstChild("Name"); if(!nameNode.IsNull()) { m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText()); m_nameHasBeenSet = true; } XmlNode encryptionEntitiesNode = resultNode.FirstChild("EncryptionEntities"); if(!encryptionEntitiesNode.IsNull()) { m_encryptionEntities = encryptionEntitiesNode; m_encryptionEntitiesHasBeenSet = true; } XmlNode commentNode = resultNode.FirstChild("Comment"); if(!commentNode.IsNull()) { m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText()); m_commentHasBeenSet = true; } } return *this; } void FieldLevelEncryptionProfileSummary::AddToNode(XmlNode& parentNode) const { Aws::StringStream ss; if(m_idHasBeenSet) { XmlNode idNode = parentNode.CreateChildElement("Id"); idNode.SetText(m_id); } if(m_lastModifiedTimeHasBeenSet) { XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime"); lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(Aws::Utils::DateFormat::ISO_8601)); } if(m_nameHasBeenSet) { XmlNode nameNode = parentNode.CreateChildElement("Name"); nameNode.SetText(m_name); } if(m_encryptionEntitiesHasBeenSet) { XmlNode encryptionEntitiesNode = parentNode.CreateChildElement("EncryptionEntities"); m_encryptionEntities.AddToNode(encryptionEntitiesNode); } if(m_commentHasBeenSet) { XmlNode commentNode = parentNode.CreateChildElement("Comment"); commentNode.SetText(m_comment); } } } // namespace Model } // namespace CloudFront } // namespace Aws