AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
TokenUsage.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8
9namespace Aws
10{
11namespace Utils
12{
13namespace Json
14{
15 class JsonValue;
16 class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace BedrockRuntime
20{
21namespace Model
22{
23
31 {
32 public:
33 AWS_BEDROCKRUNTIME_API TokenUsage();
34 AWS_BEDROCKRUNTIME_API TokenUsage(Aws::Utils::Json::JsonView jsonValue);
35 AWS_BEDROCKRUNTIME_API TokenUsage& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
37
38
40
43 inline int GetInputTokens() const{ return m_inputTokens; }
44 inline bool InputTokensHasBeenSet() const { return m_inputTokensHasBeenSet; }
45 inline void SetInputTokens(int value) { m_inputTokensHasBeenSet = true; m_inputTokens = value; }
46 inline TokenUsage& WithInputTokens(int value) { SetInputTokens(value); return *this;}
48
50
53 inline int GetOutputTokens() const{ return m_outputTokens; }
54 inline bool OutputTokensHasBeenSet() const { return m_outputTokensHasBeenSet; }
55 inline void SetOutputTokens(int value) { m_outputTokensHasBeenSet = true; m_outputTokens = value; }
56 inline TokenUsage& WithOutputTokens(int value) { SetOutputTokens(value); return *this;}
58
60
63 inline int GetTotalTokens() const{ return m_totalTokens; }
64 inline bool TotalTokensHasBeenSet() const { return m_totalTokensHasBeenSet; }
65 inline void SetTotalTokens(int value) { m_totalTokensHasBeenSet = true; m_totalTokens = value; }
66 inline TokenUsage& WithTotalTokens(int value) { SetTotalTokens(value); return *this;}
68 private:
69
70 int m_inputTokens;
71 bool m_inputTokensHasBeenSet = false;
72
73 int m_outputTokens;
74 bool m_outputTokensHasBeenSet = false;
75
76 int m_totalTokens;
77 bool m_totalTokensHasBeenSet = false;
78 };
79
80} // namespace Model
81} // namespace BedrockRuntime
82} // namespace Aws
TokenUsage & WithInputTokens(int value)
Definition TokenUsage.h:46
AWS_BEDROCKRUNTIME_API TokenUsage(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKRUNTIME_API TokenUsage()
AWS_BEDROCKRUNTIME_API TokenUsage & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
TokenUsage & WithTotalTokens(int value)
Definition TokenUsage.h:66
TokenUsage & WithOutputTokens(int value)
Definition TokenUsage.h:56
Aws::Utils::Json::JsonValue JsonValue