1/************************************************************************
2 * This file has been generated automatically from                      *
3 *                                                                      *
4 * src/server/qgsserverquerystringparameter.h                           *
5 *                                                                      *
6 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
7 ************************************************************************/
8
9
10
11
12
13
14
15
16class QgsServerQueryStringParameter
17{
18%Docstring(signature="appended")
19The :py:class:`QgsServerQueryStringParameter` class holds the information regarding
20a query string input parameter and its validation.
21
22The class is extendable through custom validators (C++ only) and/or by
23subclassing and overriding the :py:func:`~value` method.
24
25.. versionadded:: 3.10
26%End
27
28%TypeHeaderCode
29#include "qgsserverquerystringparameter.h"
30%End
31  public:
32    static const QMetaObject staticMetaObject;
33
34  public:
35
36    enum class Type
37    {
38      String,
39      Integer,
40      Double,
41      Boolean,
42      List,
43    };
44
45
46    QgsServerQueryStringParameter( const QString name,
47                                   bool required = false,
48                                   Type type = QgsServerQueryStringParameter::Type::String,
49                                   const QString &description = QString(),
50                                   const QVariant &defaultValue = QVariant() );
51%Docstring
52Constructs a QgsServerQueryStringParameter object.
53
54:param name: parameter name
55:param required:
56:param type: the parameter type
57:param description: parameter description
58:param defaultValue: default value, it is ignored if the parameter is required
59%End
60
61    virtual ~QgsServerQueryStringParameter();
62
63    virtual QVariant value( const QgsServerApiContext &context ) const;
64%Docstring
65Extracts the value from the request ``context`` by validating the parameter
66value and converting it to its proper Type.
67If the value is not set and a default was not provided an invalid QVariant is returned.
68
69Validation steps:
70
71- required
72- can convert to proper Type
73- custom validator (if set - not available in Python bindings)
74
75.. seealso:: :py:func:`setCustomValidator`
76
77:return: the parameter value or an invalid QVariant if not found (and not required)
78
79:raises QgsServerApiBadRequestError: if validation fails
80%End
81
82
83    QString description() const;
84%Docstring
85Returns parameter description
86%End
87
88    static QString typeName( const Type type );
89%Docstring
90Returns the name of the ``type``
91%End
92
93    QString name() const;
94%Docstring
95Returns the name of the parameter
96%End
97
98    void setDescription( const QString &description );
99%Docstring
100Sets validator ``description``
101%End
102
103};
104
105/************************************************************************
106 * This file has been generated automatically from                      *
107 *                                                                      *
108 * src/server/qgsserverquerystringparameter.h                           *
109 *                                                                      *
110 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
111 ************************************************************************/
112