/** * 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 RAM { namespace Model { ResourceSharePermissionDetail::ResourceSharePermissionDetail() : m_arnHasBeenSet(false), m_versionHasBeenSet(false), m_defaultVersion(false), m_defaultVersionHasBeenSet(false), m_nameHasBeenSet(false), m_resourceTypeHasBeenSet(false), m_permissionHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false) { } ResourceSharePermissionDetail::ResourceSharePermissionDetail(JsonView jsonValue) : m_arnHasBeenSet(false), m_versionHasBeenSet(false), m_defaultVersion(false), m_defaultVersionHasBeenSet(false), m_nameHasBeenSet(false), m_resourceTypeHasBeenSet(false), m_permissionHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false) { *this = jsonValue; } ResourceSharePermissionDetail& ResourceSharePermissionDetail::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("version")) { m_version = jsonValue.GetString("version"); m_versionHasBeenSet = true; } if(jsonValue.ValueExists("defaultVersion")) { m_defaultVersion = jsonValue.GetBool("defaultVersion"); m_defaultVersionHasBeenSet = true; } if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("resourceType")) { m_resourceType = jsonValue.GetString("resourceType"); m_resourceTypeHasBeenSet = true; } if(jsonValue.ValueExists("permission")) { m_permission = jsonValue.GetString("permission"); m_permissionHasBeenSet = true; } if(jsonValue.ValueExists("creationTime")) { m_creationTime = jsonValue.GetDouble("creationTime"); m_creationTimeHasBeenSet = true; } if(jsonValue.ValueExists("lastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetDouble("lastUpdatedTime"); m_lastUpdatedTimeHasBeenSet = true; } return *this; } JsonValue ResourceSharePermissionDetail::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_versionHasBeenSet) { payload.WithString("version", m_version); } if(m_defaultVersionHasBeenSet) { payload.WithBool("defaultVersion", m_defaultVersion); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_resourceTypeHasBeenSet) { payload.WithString("resourceType", m_resourceType); } if(m_permissionHasBeenSet) { payload.WithString("permission", m_permission); } if(m_creationTimeHasBeenSet) { payload.WithDouble("creationTime", m_creationTime.SecondsWithMSPrecision()); } if(m_lastUpdatedTimeHasBeenSet) { payload.WithDouble("lastUpdatedTime", m_lastUpdatedTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace RAM } // namespace Aws