/** * 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 DataSync { namespace Model { IOPS::IOPS() : m_read(0.0), m_readHasBeenSet(false), m_write(0.0), m_writeHasBeenSet(false), m_other(0.0), m_otherHasBeenSet(false), m_total(0.0), m_totalHasBeenSet(false) { } IOPS::IOPS(JsonView jsonValue) : m_read(0.0), m_readHasBeenSet(false), m_write(0.0), m_writeHasBeenSet(false), m_other(0.0), m_otherHasBeenSet(false), m_total(0.0), m_totalHasBeenSet(false) { *this = jsonValue; } IOPS& IOPS::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Read")) { m_read = jsonValue.GetDouble("Read"); m_readHasBeenSet = true; } if(jsonValue.ValueExists("Write")) { m_write = jsonValue.GetDouble("Write"); m_writeHasBeenSet = true; } if(jsonValue.ValueExists("Other")) { m_other = jsonValue.GetDouble("Other"); m_otherHasBeenSet = true; } if(jsonValue.ValueExists("Total")) { m_total = jsonValue.GetDouble("Total"); m_totalHasBeenSet = true; } return *this; } JsonValue IOPS::Jsonize() const { JsonValue payload; if(m_readHasBeenSet) { payload.WithDouble("Read", m_read); } if(m_writeHasBeenSet) { payload.WithDouble("Write", m_write); } if(m_otherHasBeenSet) { payload.WithDouble("Other", m_other); } if(m_totalHasBeenSet) { payload.WithDouble("Total", m_total); } return payload; } } // namespace Model } // namespace DataSync } // namespace Aws