AWS SDK for C++

AWS SDK for C++ Version 1.11.836

Loading...
Searching...
No Matches
Schema.h
1#pragma once
2
3#include <aws/core/utils/memory/stl/AWSString.h>
4
5#include <cstdint>
6
7namespace smithy {
8namespace schema {
9
10enum class ShapeType : uint8_t {
11 Boolean,
12 Byte,
13 Short,
14 Integer,
15 Long,
16 Float,
17 Double,
20 String,
21 Enum,
22 IntEnum,
23 Blob,
26 List,
27 Map,
29 Union,
33};
34
35class Schema {
36 public:
37 Schema() = default;
38 Schema(const Aws::String& memberName, ShapeType type) : m_type(type), m_memberName(memberName) {}
39
40 ShapeType GetType() const { return m_type; }
41 const char* GetId() const { return m_id; }
42 Aws::String GetMemberName() const { return m_memberName; }
43 int GetMemberIndex() const { return m_memberIndex; }
44 bool IsMember() const { return !m_memberName.empty(); }
45
46 const Schema* GetMember(const char* name) const;
47 const Schema* GetMember(int index) const;
48
49 uint16_t GetMemberCount() const { return m_memberCount; }
50
51 private:
52 const char* m_id = nullptr;
54 Aws::String m_memberName;
55 int m_memberIndex = 0;
56 const Schema* m_members = nullptr;
57 uint16_t m_memberCount = 0;
58};
59
60} // namespace schema
61} // namespace smithy
Aws::String GetMemberName() const
Definition Schema.h:42
const Schema * GetMember(const char *name) const
uint16_t GetMemberCount() const
Definition Schema.h:49
const char * GetId() const
Definition Schema.h:41
Schema(const Aws::String &memberName, ShapeType type)
Definition Schema.h:38
bool IsMember() const
Definition Schema.h:44
const Schema * GetMember(int index) const
ShapeType GetType() const
Definition Schema.h:40
int GetMemberIndex() const
Definition Schema.h:43
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97