/** * 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 Connect { namespace Model { ParticipantDetailsToAdd::ParticipantDetailsToAdd() : m_participantRole(ParticipantRole::NOT_SET), m_participantRoleHasBeenSet(false), m_displayNameHasBeenSet(false) { } ParticipantDetailsToAdd::ParticipantDetailsToAdd(JsonView jsonValue) : m_participantRole(ParticipantRole::NOT_SET), m_participantRoleHasBeenSet(false), m_displayNameHasBeenSet(false) { *this = jsonValue; } ParticipantDetailsToAdd& ParticipantDetailsToAdd::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ParticipantRole")) { m_participantRole = ParticipantRoleMapper::GetParticipantRoleForName(jsonValue.GetString("ParticipantRole")); m_participantRoleHasBeenSet = true; } if(jsonValue.ValueExists("DisplayName")) { m_displayName = jsonValue.GetString("DisplayName"); m_displayNameHasBeenSet = true; } return *this; } JsonValue ParticipantDetailsToAdd::Jsonize() const { JsonValue payload; if(m_participantRoleHasBeenSet) { payload.WithString("ParticipantRole", ParticipantRoleMapper::GetNameForParticipantRole(m_participantRole)); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } return payload; } } // namespace Model } // namespace Connect } // namespace Aws