AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
SampledSequence.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.h>
9#include <aws/sagemakertrainingsessionruntime/model/SampleTokenUsage.h>
10#include <aws/sagemakertrainingsessionruntime/model/StopReason.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace SageMakerTrainingSessionRuntime {
22namespace Model {
23
30 public:
31 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence() = default;
32 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence(Aws::Utils::Json::JsonView jsonValue);
33 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
42 inline StopReason GetStopReason() const { return m_stopReason; }
43 inline bool StopReasonHasBeenSet() const { return m_stopReasonHasBeenSet; }
44 inline void SetStopReason(StopReason value) {
45 m_stopReasonHasBeenSet = true;
46 m_stopReason = value;
47 }
49 SetStopReason(value);
50 return *this;
51 }
53
55
58 inline const Aws::Vector<int>& GetTokens() const { return m_tokens; }
59 inline bool TokensHasBeenSet() const { return m_tokensHasBeenSet; }
60 template <typename TokensT = Aws::Vector<int>>
61 void SetTokens(TokensT&& value) {
62 m_tokensHasBeenSet = true;
63 m_tokens = std::forward<TokensT>(value);
64 }
65 template <typename TokensT = Aws::Vector<int>>
66 SampledSequence& WithTokens(TokensT&& value) {
67 SetTokens(std::forward<TokensT>(value));
68 return *this;
69 }
70 inline SampledSequence& AddTokens(int value) {
71 m_tokensHasBeenSet = true;
72 m_tokens.push_back(value);
73 return *this;
74 }
76
78
81 inline const Aws::Vector<double>& GetLogprobs() const { return m_logprobs; }
82 inline bool LogprobsHasBeenSet() const { return m_logprobsHasBeenSet; }
83 template <typename LogprobsT = Aws::Vector<double>>
84 void SetLogprobs(LogprobsT&& value) {
85 m_logprobsHasBeenSet = true;
86 m_logprobs = std::forward<LogprobsT>(value);
87 }
88 template <typename LogprobsT = Aws::Vector<double>>
89 SampledSequence& WithLogprobs(LogprobsT&& value) {
90 SetLogprobs(std::forward<LogprobsT>(value));
91 return *this;
92 }
93 inline SampledSequence& AddLogprobs(double value) {
94 m_logprobsHasBeenSet = true;
95 m_logprobs.push_back(value);
96 return *this;
97 }
99
101
104 inline const SampleTokenUsage& GetTokenUsage() const { return m_tokenUsage; }
105 inline bool TokenUsageHasBeenSet() const { return m_tokenUsageHasBeenSet; }
106 template <typename TokenUsageT = SampleTokenUsage>
107 void SetTokenUsage(TokenUsageT&& value) {
108 m_tokenUsageHasBeenSet = true;
109 m_tokenUsage = std::forward<TokenUsageT>(value);
110 }
111 template <typename TokenUsageT = SampleTokenUsage>
112 SampledSequence& WithTokenUsage(TokenUsageT&& value) {
113 SetTokenUsage(std::forward<TokenUsageT>(value));
114 return *this;
115 }
117 private:
118 StopReason m_stopReason{StopReason::NOT_SET};
119
120 Aws::Vector<int> m_tokens;
121
122 Aws::Vector<double> m_logprobs;
123
124 SampleTokenUsage m_tokenUsage;
125 bool m_stopReasonHasBeenSet = false;
126 bool m_tokensHasBeenSet = false;
127 bool m_logprobsHasBeenSet = false;
128 bool m_tokenUsageHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace SageMakerTrainingSessionRuntime
133} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence()=default
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampledSequence & operator=(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue