AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
EncodedTextChunk.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/EncodedTextChunkType.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace SageMakerTrainingSessionRuntime {
21namespace Model {
22
30 public:
31 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk() = default;
32 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk(Aws::Utils::Json::JsonView jsonValue);
33 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::Vector<int>& GetTokens() const { return m_tokens; }
41 inline bool TokensHasBeenSet() const { return m_tokensHasBeenSet; }
42 template <typename TokensT = Aws::Vector<int>>
43 void SetTokens(TokensT&& value) {
44 m_tokensHasBeenSet = true;
45 m_tokens = std::forward<TokensT>(value);
46 }
47 template <typename TokensT = Aws::Vector<int>>
48 EncodedTextChunk& WithTokens(TokensT&& value) {
49 SetTokens(std::forward<TokensT>(value));
50 return *this;
51 }
52 inline EncodedTextChunk& AddTokens(int value) {
53 m_tokensHasBeenSet = true;
54 m_tokens.push_back(value);
55 return *this;
56 }
58
60
63 inline EncodedTextChunkType GetType() const { return m_type; }
64 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
65 inline void SetType(EncodedTextChunkType value) {
66 m_typeHasBeenSet = true;
67 m_type = value;
68 }
70 SetType(value);
71 return *this;
72 }
74 private:
75 Aws::Vector<int> m_tokens;
76
78 bool m_tokensHasBeenSet = false;
79 bool m_typeHasBeenSet = false;
80};
81
82} // namespace Model
83} // namespace SageMakerTrainingSessionRuntime
84} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk()=default
EncodedTextChunk & WithType(EncodedTextChunkType value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API EncodedTextChunk & operator=(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue