9#ifndef QTSMITHY_SHAPE_H
10#define QTSMITHY_SHAPE_H
14#include <QCoreApplication>
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;
152 Q_DECLARE_PRIVATE(
Shape)
156#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
The ShapeId class provides a Qt representation of a Smithy Shape ID.
The ShapePrivate class provides private implementation for Shape.
The Shape class provides a Qt representation of a Smithy semantic shape.
@ IntEnum
An integer with a fixed set of values.
@ Document
Open content that functions as a kind of "any" type.
@ Float
Single precision IEEE-754 floating point number.
@ String
UTF-8 encoded string.
@ Boolean
Boolean value type.
@ Operation
Represents the input, output, and errors of an API operation.
@ Short
16-bit signed integer ranging from -32,768 to 32,767 (inclusive).
@ Map
Map data structure that maps string keys to homogeneous values.
@ List
Ordered collection of homogeneous values.
@ Set
Deprecated; use a list with the uniqueItems trait instead.
@ Long
64-bit signed integer ranging from -2^63 to (2^63)-1 (inclusive).
@ Apply
Traits to be applied to shapes outside of their definition.
@ Integer
32-bit signed integer ranging from -2^31 to (2^31)-1 (inclusive).
@ Byte
8-bit signed integer ranging from -128 to 127 (inclusive).
@ Timestamp
An instant in time with no UTC offset or timezone.
@ Resource
Entity with an identity that has a set of operations.
@ Service
Entry point of an API that aggregates resources and operations together.
@ Enum
A string with a fixed set of values.
@ BigInteger
Arbitrarily large signed integer.
@ Double
Double precision IEEE-754 floating point number.
@ Structure
Fixed set of named heterogeneous members.
@ Blob
Uninterpreted binary data.
@ BigDecimal
Arbitrary precision signed decimal number.
@ Undefined
The shape is undefined, usually the result of an error condition.
Shape()
Constructs a new, empty Smithy shape.
#define QTSMITHY_EXPORT
QtSmithy library export/import macro.
#define QTSMITHY_BEGIN_NAMESPACE
Macro for starting the QtSmithy library's top-most namespace (if one is defined).
#define QTSMITHY_DECLARE_TEST(Class)
Macro for forward-delcaring a related unit test class, but only when QT_TESTLIB_LIB is defined.
#define QTSMITHY_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
#define QTSMITHY_END_NAMESPACE
Macro for ending the QtSmithy library's top-most namespace (if one is defined).
Declares the ShapeId class.