AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
TensorData.h
1
6#pragma once
7#include <aws/core/utils/Document.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.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
31 public:
32 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData() = default;
33 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
43 inline Aws::Utils::DocumentView GetData() const { return m_data; }
44 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
45 template <typename DataT = Aws::Utils::Document>
46 void SetData(DataT&& value) {
47 m_dataHasBeenSet = true;
48 m_data = std::forward<DataT>(value);
49 }
50 template <typename DataT = Aws::Utils::Document>
51 TensorData& WithData(DataT&& value) {
52 SetData(std::forward<DataT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::String& GetDtype() const { return m_dtype; }
63 inline bool DtypeHasBeenSet() const { return m_dtypeHasBeenSet; }
64 template <typename DtypeT = Aws::String>
65 void SetDtype(DtypeT&& value) {
66 m_dtypeHasBeenSet = true;
67 m_dtype = std::forward<DtypeT>(value);
68 }
69 template <typename DtypeT = Aws::String>
70 TensorData& WithDtype(DtypeT&& value) {
71 SetDtype(std::forward<DtypeT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::Vector<int>& GetShape() const { return m_shape; }
81 inline bool ShapeHasBeenSet() const { return m_shapeHasBeenSet; }
82 template <typename ShapeT = Aws::Vector<int>>
83 void SetShape(ShapeT&& value) {
84 m_shapeHasBeenSet = true;
85 m_shape = std::forward<ShapeT>(value);
86 }
87 template <typename ShapeT = Aws::Vector<int>>
88 TensorData& WithShape(ShapeT&& value) {
89 SetShape(std::forward<ShapeT>(value));
90 return *this;
91 }
92 inline TensorData& AddShape(int value) {
93 m_shapeHasBeenSet = true;
94 m_shape.push_back(value);
95 return *this;
96 }
98 private:
100
101 Aws::String m_dtype;
102
103 Aws::Vector<int> m_shape;
104 bool m_dataHasBeenSet = false;
105 bool m_dtypeHasBeenSet = false;
106 bool m_shapeHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace SageMakerTrainingSessionRuntime
111} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< int > & GetShape() const
Definition TensorData.h:80
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API TensorData()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue