9#ifndef QTSMITHY_SHAPE_H
10#define QTSMITHY_SHAPE_H
14#include <QCoreApplication>
18QTSMITHY_DECLARE_TEST(
Shape)
20QTSMITHY_BEGIN_NAMESPACE
26Q_DECLARE_TR_FUNCTIONS(
Shape);
31 UndefinedShapeType = 1,
32 MissingRequiredProperty = 2,
33 InvalidPropertyValue = 3,
75 typedef QHash<ShapeId, QJsonValue> TraitsMap;
81 typedef QHash<QString, ShapeReference> StringShapeRefMap;
82 typedef QSet<ShapeReference> ShapeReferences;
88 typedef QHash<QString, Member> StringMemberMap;
103 TraitsMap traits()
const;
106 Member member()
const;
110 Member value()
const;
114 StringMemberMap members()
const;
117 QString version()
const;
118 ShapeReferences operations()
const;
119 ShapeReferences resources()
const;
120 ShapeReferences errors()
const;
121 ShapeIdStringMap rename()
const;
124 StringShapeRefMap identifiers()
const;
125 StringShapeRefMap properties()
const;
126 ShapeReference create()
const;
127 ShapeReference put()
const;
128 ShapeReference read()
const;
129 ShapeReference update()
const;
130 ShapeReference Delete()
const;
131 ShapeReference list()
const;
133 ShapeReferences collectionOperations()
const;
137 ShapeReference input()
const;
138 ShapeReference output()
const;
142 ShapeReferences mixins()
const;
144 QJsonObject rawAst()
const;
148 ShapePrivate * d_ptr;
152 Q_DECLARE_PRIVATE(
Shape)
153 QTSMITHY_BEFRIEND_TEST(
Shape)
156#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
164QTSMITHY_END_NAMESPACE
The ShapeId class provides a Qt representation of a Smithy Shape ID.
Definition shapeid.h:29
The Shape class provides a Qt representation of a Smithy semantic shape.
Definition shape.h:25
Type
Definition shape.h:37
@ IntEnum
An integer with a fixed set of values.
Definition shape.h:48
@ Document
Open content that functions as a kind of "any" type.
Definition shape.h:55
@ Float
Single precision IEEE-754 floating point number.
Definition shape.h:50
@ String
UTF-8 encoded string.
Definition shape.h:43
@ Boolean
Boolean value type.
Definition shape.h:42
@ Operation
Represents the input, output, and errors of an API operation.
Definition shape.h:67
@ Short
16-bit signed integer ranging from -32,768 to 32,767 (inclusive).
Definition shape.h:46
@ Map
Map data structure that maps string keys to homogeneous values.
Definition shape.h:60
@ List
Ordered collection of homogeneous values.
Definition shape.h:58
@ Set
Deprecated; use a list with the uniqueItems trait instead.
Definition shape.h:59
@ Long
64-bit signed integer ranging from -2^63 to (2^63)-1 (inclusive).
Definition shape.h:49
@ Apply
Traits to be applied to shapes outside of their definition.
Definition shape.h:71
@ Integer
32-bit signed integer ranging from -2^31 to (2^31)-1 (inclusive).
Definition shape.h:47
@ Byte
8-bit signed integer ranging from -128 to 127 (inclusive).
Definition shape.h:45
@ Timestamp
An instant in time with no UTC offset or timezone.
Definition shape.h:54
@ Union
Definition shape.h:62
@ Resource
Entity with an identity that has a set of operations.
Definition shape.h:68
@ Service
Entry point of an API that aggregates resources and operations together.
Definition shape.h:66
@ Enum
A string with a fixed set of values.
Definition shape.h:44
@ BigInteger
Arbitrarily large signed integer.
Definition shape.h:52
@ Double
Double precision IEEE-754 floating point number.
Definition shape.h:51
@ Structure
Fixed set of named heterogeneous members.
Definition shape.h:61
@ Blob
Uninterpreted binary data.
Definition shape.h:41
@ BigDecimal
Arbitrary precision signed decimal number.
Definition shape.h:53
@ Undefined
The shape is undefined, usually the result of an error condition.
Definition shape.h:38
Shape()
Constructs a new, empty Smithy shape.
Definition shape.cpp:28
Declares the ShapeId class.