/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace SSM { namespace Model { OpsMetadata::OpsMetadata() : m_resourceIdHasBeenSet(false), m_opsMetadataArnHasBeenSet(false), m_lastModifiedDateHasBeenSet(false), m_lastModifiedUserHasBeenSet(false), m_creationDateHasBeenSet(false) { } OpsMetadata::OpsMetadata(JsonView jsonValue) : m_resourceIdHasBeenSet(false), m_opsMetadataArnHasBeenSet(false), m_lastModifiedDateHasBeenSet(false), m_lastModifiedUserHasBeenSet(false), m_creationDateHasBeenSet(false) { *this = jsonValue; } OpsMetadata& OpsMetadata::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ResourceId")) { m_resourceId = jsonValue.GetString("ResourceId"); m_resourceIdHasBeenSet = true; } if(jsonValue.ValueExists("OpsMetadataArn")) { m_opsMetadataArn = jsonValue.GetString("OpsMetadataArn"); m_opsMetadataArnHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedDate")) { m_lastModifiedDate = jsonValue.GetDouble("LastModifiedDate"); m_lastModifiedDateHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedUser")) { m_lastModifiedUser = jsonValue.GetString("LastModifiedUser"); m_lastModifiedUserHasBeenSet = true; } if(jsonValue.ValueExists("CreationDate")) { m_creationDate = jsonValue.GetDouble("CreationDate"); m_creationDateHasBeenSet = true; } return *this; } JsonValue OpsMetadata::Jsonize() const { JsonValue payload; if(m_resourceIdHasBeenSet) { payload.WithString("ResourceId", m_resourceId); } if(m_opsMetadataArnHasBeenSet) { payload.WithString("OpsMetadataArn", m_opsMetadataArn); } if(m_lastModifiedDateHasBeenSet) { payload.WithDouble("LastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision()); } if(m_lastModifiedUserHasBeenSet) { payload.WithString("LastModifiedUser", m_lastModifiedUser); } if(m_creationDateHasBeenSet) { payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace SSM } // namespace Aws