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/RootCauseException.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>A collection of segments and corresponding subsegments associated to a trace
30    * summary fault error.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/FaultRootCauseEntity">AWS
32    * API Reference</a></p>
33    */
34   class AWS_XRAY_API FaultRootCauseEntity
35   {
36   public:
37     FaultRootCauseEntity();
38     FaultRootCauseEntity(Aws::Utils::Json::JsonView jsonValue);
39     FaultRootCauseEntity& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The name of the entity.</p>
45      */
GetName()46     inline const Aws::String& GetName() const{ return m_name; }
47 
48     /**
49      * <p>The name of the entity.</p>
50      */
NameHasBeenSet()51     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
52 
53     /**
54      * <p>The name of the entity.</p>
55      */
SetName(const Aws::String & value)56     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
57 
58     /**
59      * <p>The name of the entity.</p>
60      */
SetName(Aws::String && value)61     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
62 
63     /**
64      * <p>The name of the entity.</p>
65      */
SetName(const char * value)66     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
67 
68     /**
69      * <p>The name of the entity.</p>
70      */
WithName(const Aws::String & value)71     inline FaultRootCauseEntity& WithName(const Aws::String& value) { SetName(value); return *this;}
72 
73     /**
74      * <p>The name of the entity.</p>
75      */
WithName(Aws::String && value)76     inline FaultRootCauseEntity& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
77 
78     /**
79      * <p>The name of the entity.</p>
80      */
WithName(const char * value)81     inline FaultRootCauseEntity& WithName(const char* value) { SetName(value); return *this;}
82 
83 
84     /**
85      * <p>The types and messages of the exceptions.</p>
86      */
GetExceptions()87     inline const Aws::Vector<RootCauseException>& GetExceptions() const{ return m_exceptions; }
88 
89     /**
90      * <p>The types and messages of the exceptions.</p>
91      */
ExceptionsHasBeenSet()92     inline bool ExceptionsHasBeenSet() const { return m_exceptionsHasBeenSet; }
93 
94     /**
95      * <p>The types and messages of the exceptions.</p>
96      */
SetExceptions(const Aws::Vector<RootCauseException> & value)97     inline void SetExceptions(const Aws::Vector<RootCauseException>& value) { m_exceptionsHasBeenSet = true; m_exceptions = value; }
98 
99     /**
100      * <p>The types and messages of the exceptions.</p>
101      */
SetExceptions(Aws::Vector<RootCauseException> && value)102     inline void SetExceptions(Aws::Vector<RootCauseException>&& value) { m_exceptionsHasBeenSet = true; m_exceptions = std::move(value); }
103 
104     /**
105      * <p>The types and messages of the exceptions.</p>
106      */
WithExceptions(const Aws::Vector<RootCauseException> & value)107     inline FaultRootCauseEntity& WithExceptions(const Aws::Vector<RootCauseException>& value) { SetExceptions(value); return *this;}
108 
109     /**
110      * <p>The types and messages of the exceptions.</p>
111      */
WithExceptions(Aws::Vector<RootCauseException> && value)112     inline FaultRootCauseEntity& WithExceptions(Aws::Vector<RootCauseException>&& value) { SetExceptions(std::move(value)); return *this;}
113 
114     /**
115      * <p>The types and messages of the exceptions.</p>
116      */
AddExceptions(const RootCauseException & value)117     inline FaultRootCauseEntity& AddExceptions(const RootCauseException& value) { m_exceptionsHasBeenSet = true; m_exceptions.push_back(value); return *this; }
118 
119     /**
120      * <p>The types and messages of the exceptions.</p>
121      */
AddExceptions(RootCauseException && value)122     inline FaultRootCauseEntity& AddExceptions(RootCauseException&& value) { m_exceptionsHasBeenSet = true; m_exceptions.push_back(std::move(value)); return *this; }
123 
124 
125     /**
126      * <p>A flag that denotes a remote subsegment.</p>
127      */
GetRemote()128     inline bool GetRemote() const{ return m_remote; }
129 
130     /**
131      * <p>A flag that denotes a remote subsegment.</p>
132      */
RemoteHasBeenSet()133     inline bool RemoteHasBeenSet() const { return m_remoteHasBeenSet; }
134 
135     /**
136      * <p>A flag that denotes a remote subsegment.</p>
137      */
SetRemote(bool value)138     inline void SetRemote(bool value) { m_remoteHasBeenSet = true; m_remote = value; }
139 
140     /**
141      * <p>A flag that denotes a remote subsegment.</p>
142      */
WithRemote(bool value)143     inline FaultRootCauseEntity& WithRemote(bool value) { SetRemote(value); return *this;}
144 
145   private:
146 
147     Aws::String m_name;
148     bool m_nameHasBeenSet;
149 
150     Aws::Vector<RootCauseException> m_exceptions;
151     bool m_exceptionsHasBeenSet;
152 
153     bool m_remote;
154     bool m_remoteHasBeenSet;
155   };
156 
157 } // namespace Model
158 } // namespace XRay
159 } // namespace Aws
160