# Condition

## Module: [core](https://utca.knowledgator.com/framework-structure#core)

## Methods and properties

Main methods and properties

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**validator**</mark>**&#x20;(**[**ConditionProtocol**](#conditionprotocol)**):** Callable that returns bool value that define that condition is fulfilled or not.
* <mark style="color:orange;">**schema**</mark>**&#x20;(**[**Component**](https://utca.knowledgator.com/core/component)**):** Intermidiate evaluation.
* <mark style="color:orange;">**state**</mark>**&#x20;(Optional\[List\[Union\[str, Tuple\[str, str]]]], optional):** Memory keys that will be used. If equals to None, memory will not be used. Defaults to None.
* <mark style="color:orange;">**name**</mark>**&#x20;(Optional\[str], optional):** Name for identification. If equals to None, class name will be used. Defaults to None.

***

### <mark style="color:blue;">\_\_call\_\_</mark>

Component Call

#### Arguments:

* <mark style="color:orange;">**input\_data**</mark>**&#x20;(**[**Transformable**](https://utca.knowledgator.com/core/schemas#transformable)**):** Data for processing
* <mark style="color:orange;">**evaluator**</mark>**&#x20;(Optional\[**[**Evaluator**](https://utca.knowledgator.com/core/evaluator)**], optional):** Evaluator in context of which Condition executed.

#### Returns:

* **bool:** Result of evaluation. Define that condition is fulfilled or not.

***

***

***

## <mark style="color:green;">ConditionProtocol</mark>

Type that describes objects that can be used as conditions and validators in Condition.\
Equals to **Callable\[\[**[**Transformable**](https://utca.knowledgator.com/core/schemas#transformable)**,** [**Evaluator**](https://utca.knowledgator.com/core/evaluator)**], bool].**

***

***
