AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
FailureTrace.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/Metadata.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace BedrockAgentRuntime {
21namespace Model {
22
30 public:
31 AWS_BEDROCKAGENTRUNTIME_API FailureTrace() = default;
34 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline int GetFailureCode() const { return m_failureCode; }
41 inline bool FailureCodeHasBeenSet() const { return m_failureCodeHasBeenSet; }
42 inline void SetFailureCode(int value) {
43 m_failureCodeHasBeenSet = true;
44 m_failureCode = value;
45 }
46 inline FailureTrace& WithFailureCode(int value) {
47 SetFailureCode(value);
48 return *this;
49 }
51
53
56 inline const Aws::String& GetFailureReason() const { return m_failureReason; }
57 inline bool FailureReasonHasBeenSet() const { return m_failureReasonHasBeenSet; }
58 template <typename FailureReasonT = Aws::String>
60 m_failureReasonHasBeenSet = true;
61 m_failureReason = std::forward<FailureReasonT>(value);
62 }
63 template <typename FailureReasonT = Aws::String>
65 SetFailureReason(std::forward<FailureReasonT>(value));
66 return *this;
67 }
69
71
74 inline const Metadata& GetMetadata() const { return m_metadata; }
75 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
76 template <typename MetadataT = Metadata>
77 void SetMetadata(MetadataT&& value) {
78 m_metadataHasBeenSet = true;
79 m_metadata = std::forward<MetadataT>(value);
80 }
81 template <typename MetadataT = Metadata>
83 SetMetadata(std::forward<MetadataT>(value));
84 return *this;
85 }
87
89
92 inline const Aws::String& GetTraceId() const { return m_traceId; }
93 inline bool TraceIdHasBeenSet() const { return m_traceIdHasBeenSet; }
94 template <typename TraceIdT = Aws::String>
95 void SetTraceId(TraceIdT&& value) {
96 m_traceIdHasBeenSet = true;
97 m_traceId = std::forward<TraceIdT>(value);
98 }
99 template <typename TraceIdT = Aws::String>
101 SetTraceId(std::forward<TraceIdT>(value));
102 return *this;
103 }
105 private:
106 int m_failureCode{0};
107
108 Aws::String m_failureReason;
109
110 Metadata m_metadata;
111
112 Aws::String m_traceId;
113 bool m_failureCodeHasBeenSet = false;
114 bool m_failureReasonHasBeenSet = false;
115 bool m_metadataHasBeenSet = false;
116 bool m_traceIdHasBeenSet = false;
117};
118
119} // namespace Model
120} // namespace BedrockAgentRuntime
121} // namespace Aws
AWS_BEDROCKAGENTRUNTIME_API FailureTrace & operator=(Aws::Utils::Json::JsonView jsonValue)
FailureTrace & WithMetadata(MetadataT &&value)
AWS_BEDROCKAGENTRUNTIME_API FailureTrace()=default
AWS_BEDROCKAGENTRUNTIME_API FailureTrace(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetFailureReason() const
void SetFailureReason(FailureReasonT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
FailureTrace & WithFailureReason(FailureReasonT &&value)
FailureTrace & WithTraceId(TraceIdT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue