Module: handler_param_decl

Expand source code
# Copyright (C) 2023-present The Project Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from dataclasses import dataclass
from cl.runtime.records.dataclasses_extensions import field
from cl.runtime.records.dataclasses_extensions import missing
from cl.runtime.schema.handler_variable_decl import HandlerVariableDecl


@dataclass(slots=True, kw_only=True)
class HandlerParamDecl(HandlerVariableDecl):
    """Handler parameter declaration."""

    name: str = missing()
    """Parameter name."""

Classes

class HandlerParamDecl (*, value: ValueDecl | None = None, enum: EnumDeclKey | None = None, data: TypeDeclKey | None = None, key_: TypeDeclKey | None = None, query: TypeDeclKey | None = None, condition: TypeDeclKey | None = None, vector: bool | None = None, optional: bool | None = None, label: str | None = None, comment: str | None = None, name: str = None)

Handler parameter declaration.

Expand source code
@dataclass(slots=True, kw_only=True)
class HandlerParamDecl(HandlerVariableDecl):
    """Handler parameter declaration."""

    name: str = missing()
    """Parameter name."""

Ancestors

Static methods

def create(cls, value_type: Type, record_type: Type) -> Self

Inherited from: HandlerVariableDecl.create

Create from field name and type …

Fields

var comment -> str | None

Inherited from: HandlerVariableDecl.comment

Parameter comment. Contains addition information about handler parameter.

var condition -> TypeDeclKey | None

Inherited from: HandlerVariableDecl.condition

Condition element declaration.

var data -> TypeDeclKey | None

Inherited from: HandlerVariableDecl.data

Data element declaration.

var enum -> EnumDeclKey | None

Inherited from: HandlerVariableDecl.enum

Enumeration element declaration.

var key_ -> TypeDeclKey | None

Inherited from: HandlerVariableDecl.key_

Key element declaration.

var label -> str | None

Inherited from: HandlerVariableDecl.label

Parameter label.

var name -> str

Parameter name.

var optional -> bool | None

Inherited from: HandlerVariableDecl.optional

Flag indicating optional element.

var query -> TypeDeclKey | None

Inherited from: HandlerVariableDecl.query

Query element declaration.

var value -> ValueDecl | None

Inherited from: HandlerVariableDecl.value

Value or primitive element declaration.

var vector -> bool | None

Inherited from: HandlerVariableDecl.vector

Flag indicating variable size array (vector) container.