1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/xray/XRay_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSVector.h> 10 #include <aws/xray/model/ServiceId.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace XRay 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Information about a user recorded in segment documents.</p><p><h3>See 30 * Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TraceUser">AWS API 32 * Reference</a></p> 33 */ 34 class AWS_XRAY_API TraceUser 35 { 36 public: 37 TraceUser(); 38 TraceUser(Aws::Utils::Json::JsonView jsonValue); 39 TraceUser& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The user's name.</p> 45 */ GetUserName()46 inline const Aws::String& GetUserName() const{ return m_userName; } 47 48 /** 49 * <p>The user's name.</p> 50 */ UserNameHasBeenSet()51 inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } 52 53 /** 54 * <p>The user's name.</p> 55 */ SetUserName(const Aws::String & value)56 inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } 57 58 /** 59 * <p>The user's name.</p> 60 */ SetUserName(Aws::String && value)61 inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } 62 63 /** 64 * <p>The user's name.</p> 65 */ SetUserName(const char * value)66 inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } 67 68 /** 69 * <p>The user's name.</p> 70 */ WithUserName(const Aws::String & value)71 inline TraceUser& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} 72 73 /** 74 * <p>The user's name.</p> 75 */ WithUserName(Aws::String && value)76 inline TraceUser& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} 77 78 /** 79 * <p>The user's name.</p> 80 */ WithUserName(const char * value)81 inline TraceUser& WithUserName(const char* value) { SetUserName(value); return *this;} 82 83 84 /** 85 * <p>Services that the user's request hit.</p> 86 */ GetServiceIds()87 inline const Aws::Vector<ServiceId>& GetServiceIds() const{ return m_serviceIds; } 88 89 /** 90 * <p>Services that the user's request hit.</p> 91 */ ServiceIdsHasBeenSet()92 inline bool ServiceIdsHasBeenSet() const { return m_serviceIdsHasBeenSet; } 93 94 /** 95 * <p>Services that the user's request hit.</p> 96 */ SetServiceIds(const Aws::Vector<ServiceId> & value)97 inline void SetServiceIds(const Aws::Vector<ServiceId>& value) { m_serviceIdsHasBeenSet = true; m_serviceIds = value; } 98 99 /** 100 * <p>Services that the user's request hit.</p> 101 */ SetServiceIds(Aws::Vector<ServiceId> && value)102 inline void SetServiceIds(Aws::Vector<ServiceId>&& value) { m_serviceIdsHasBeenSet = true; m_serviceIds = std::move(value); } 103 104 /** 105 * <p>Services that the user's request hit.</p> 106 */ WithServiceIds(const Aws::Vector<ServiceId> & value)107 inline TraceUser& WithServiceIds(const Aws::Vector<ServiceId>& value) { SetServiceIds(value); return *this;} 108 109 /** 110 * <p>Services that the user's request hit.</p> 111 */ WithServiceIds(Aws::Vector<ServiceId> && value)112 inline TraceUser& WithServiceIds(Aws::Vector<ServiceId>&& value) { SetServiceIds(std::move(value)); return *this;} 113 114 /** 115 * <p>Services that the user's request hit.</p> 116 */ AddServiceIds(const ServiceId & value)117 inline TraceUser& AddServiceIds(const ServiceId& value) { m_serviceIdsHasBeenSet = true; m_serviceIds.push_back(value); return *this; } 118 119 /** 120 * <p>Services that the user's request hit.</p> 121 */ AddServiceIds(ServiceId && value)122 inline TraceUser& AddServiceIds(ServiceId&& value) { m_serviceIdsHasBeenSet = true; m_serviceIds.push_back(std::move(value)); return *this; } 123 124 private: 125 126 Aws::String m_userName; 127 bool m_userNameHasBeenSet; 128 129 Aws::Vector<ServiceId> m_serviceIds; 130 bool m_serviceIdsHasBeenSet; 131 }; 132 133 } // namespace Model 134 } // namespace XRay 135 } // namespace Aws 136