AWS SDK for C++

AWS SDK for C++ Version 1.11.822

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
39 ShapeType GetType() const { return m_type; }
40 const char* GetId() const { return m_id; }
41 const char* GetMemberName() const { return m_memberName; }
42 int GetMemberIndex() const { return m_memberIndex; }
43 bool IsMember() const { return m_memberName != nullptr; }
44
45 const Schema* GetMember(const char* name) const;
46 const Schema* GetMember(int index) const;
47
48 uint16_t GetMemberCount() const { return m_memberCount; }
49
50 private:
51 const char* m_id = nullptr;
53 const char* m_memberName = nullptr;
54 int m_memberIndex = 0;
55 const Schema* m_members = nullptr;
56 uint16_t m_memberCount = 0;
57};
58
59} // namespace schema
60} // namespace smithy
const Schema * GetMember(const char *name) const
uint16_t GetMemberCount() const
Definition Schema.h:48
const char * GetId() const
Definition Schema.h:40
bool IsMember() const
Definition Schema.h:43
const char * GetMemberName() const
Definition Schema.h:41
const Schema * GetMember(int index) const
ShapeType GetType() const
Definition Schema.h:39
int GetMemberIndex() const
Definition Schema.h:42