/** * 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 IoTWireless { namespace Model { Destinations::Destinations() : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_expressionType(ExpressionType::NOT_SET), m_expressionTypeHasBeenSet(false), m_expressionHasBeenSet(false), m_descriptionHasBeenSet(false), m_roleArnHasBeenSet(false) { } Destinations::Destinations(JsonView jsonValue) : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_expressionType(ExpressionType::NOT_SET), m_expressionTypeHasBeenSet(false), m_expressionHasBeenSet(false), m_descriptionHasBeenSet(false), m_roleArnHasBeenSet(false) { *this = jsonValue; } Destinations& Destinations::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("ExpressionType")) { m_expressionType = ExpressionTypeMapper::GetExpressionTypeForName(jsonValue.GetString("ExpressionType")); m_expressionTypeHasBeenSet = true; } if(jsonValue.ValueExists("Expression")) { m_expression = jsonValue.GetString("Expression"); m_expressionHasBeenSet = true; } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("RoleArn")) { m_roleArn = jsonValue.GetString("RoleArn"); m_roleArnHasBeenSet = true; } return *this; } JsonValue Destinations::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("Arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_expressionTypeHasBeenSet) { payload.WithString("ExpressionType", ExpressionTypeMapper::GetNameForExpressionType(m_expressionType)); } if(m_expressionHasBeenSet) { payload.WithString("Expression", m_expression); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_roleArnHasBeenSet) { payload.WithString("RoleArn", m_roleArn); } return payload; } } // namespace Model } // namespace IoTWireless } // namespace Aws