# firebase_functions.params module

Module for params that can make Cloud Functions codebases generic.

## Classes

| ### BoolParam *class* firebase_functions.params.BoolParam(*name: str* , *default: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None = None* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* , *input: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None = None* ) |
|---|
| Bases: [`Param`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Param "firebase_functions.params.Param")\[`bool`\] A parameter as a bool value. | *property* value*: bool* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### CompareExpression *class* firebase_functions.params.CompareExpression(*comparator: str* , *left: [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\]* , *right: _T* ) |
|---|
| Bases: [`Expression`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[`bool`\], `Generic`\[`_T`\] A CEL expression that evaluates to boolean true or false based on a comparison between the value of another expression and a literal of that same type. then(*if_true: _T* , *if_false: _T* ) → [TernaryExpression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TernaryExpression "firebase_functions.params.TernaryExpression")\[_T\] : comparator*: str* : left*: [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\]* : right*: _T* : | *property* value*: bool* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### Expression *class* firebase_functions.params.Expression |
|---|
| Bases: `ABC`, `Generic`\[`_T`\] A CEL expression which can be evaluated during function deployment, and resolved to a value of the generic type parameter: i.e, you can pass an Expression\<number\> as the value of an option that normally accepts numbers. | *property* value*: _T* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### IntParam *class* firebase_functions.params.IntParam(*name: str* , *default: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None = None* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* , *input: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None = None* ) |
|---|
| Bases: [`Param`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Param "firebase_functions.params.Param")\[`int`\] A parameter as a int value. | *property* value*: int* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### ListParam *class* firebase_functions.params.ListParam(*name: str* , *default: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None = None* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* , *input: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None = None* ) |
|---|
| Bases: [`Param`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Param "firebase_functions.params.Param")\[`list`\] A parameter as a list of strings. | *property* value*: list\[str\]* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### MultiSelectInput *class* firebase_functions.params.MultiSelectInput(*options: list\[[SelectOption](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectOption "firebase_functions.params.SelectOption")\[str\]\]* ) |
|---|
| Bases: `object` Specifies that a Param's value should be determined by having the user select a subset from a list of pre-canned options interactively at deploy-time. Will result in errors if used on Params of type other than string\[\]. options*: list\[[SelectOption](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectOption "firebase_functions.params.SelectOption")\[str\]\]* :   A list of user selectable options. |

| ### Param *class* firebase_functions.params.Param(*name: str* , *default: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None = None* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* , *input: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None = None* ) |
|---|
| Bases: [`Expression`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[`_T`\] A param is a declared dependency on an external value. compare(*compare: str* , *right: _T* ) → [CompareExpression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.CompareExpression "firebase_functions.params.CompareExpression") : equals(*right: _T* ) → [CompareExpression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.CompareExpression "firebase_functions.params.CompareExpression") : default*: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None* *= None* :   The default value to assign to this param if none provided. description*: str \| None* *= None* :   Description of this param that is displayed to the user. immutable*: bool \| None* *= None* :   Whether the value of this parameter can change between function deployments. input*: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None* *= None* :   The type of input that is required for this param, e.g. TextInput. label*: str \| None* *= None* :   A label that is displayed to the user for this param. name*: str* :   The environment variable of this parameter. Must be upper case. | *property* value*: _T* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### ResourceInput *class* firebase_functions.params.ResourceInput(*type: [ResourceType](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceType "firebase_functions.params.ResourceType") \| str* ) |
|---|
| Bases: `object` Specifies that a Param's value should be determined by having the user select from a list containing all the project's resources of a certain type. Currently, only type:"storage.googleapis.com/Bucket" is supported. type*: [ResourceType](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceType "firebase_functions.params.ResourceType") \| str* :   "storage.googleapis.com/Bucket" is supported. Type: :   The resource type. Currently, only type |

| ### ResourceType *class* firebase_functions.params.ResourceType(*value* ) |
|---|
| Bases: `str`, `Enum` The type of resource that a picker should pick. STORAGE_BUCKET*= 'storage.googleapis.com/Bucket'* : |

| ### SecretParam *class* firebase_functions.params.SecretParam(*name: str* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* ) |
|---|
| Bases: [`Expression`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[`str`\] A secret param is a declared dependency on an external secret. compare(*compare: str* , *right: _T* ) → [CompareExpression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.CompareExpression "firebase_functions.params.CompareExpression") : equals(*right: _T* ) → [CompareExpression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.CompareExpression "firebase_functions.params.CompareExpression") : description*: str \| None* *= None* :   Description of this param that is displayed to the user. immutable*: bool \| None* *= None* :   Whether the value of this parameter can change between function deployments. label*: str \| None* *= None* :   A label that is displayed to the user for this param. name*: str* :   The environment variable of this parameter. Must be upper case. | *property* value*: str* | |---| | Current value of this parameter. | |

| ### SelectInput *class* firebase_functions.params.SelectInput(*options: list\[[SelectOption](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectOption "firebase_functions.params.SelectOption")\[_T\]\]* ) |
|---|
| Bases: `Generic`\[`_T`\] Specifies that a Param's value should be determined by having the user select from a list of pre-canned options interactively at deploy-time. options*: list\[[SelectOption](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectOption "firebase_functions.params.SelectOption")\[_T\]\]* :   A list of user selectable options. |

| ### SelectOption *class* firebase_functions.params.SelectOption(*value: _T* , *label: str \| None = None* ) |
|---|
| Bases: `Generic`\[`_T`\] A representation of an option that can be selected via a SelectInput. label*: str \| None* *= None* :   The displayed label for the option. value*: _T* :   The value of the option. |

| ### StringParam *class* firebase_functions.params.StringParam(*name: str* , *default: _T \| [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[_T\] \| None = None* , *label: str \| None = None* , *description: str \| None = None* , *immutable: bool \| None = None* , *input: [TextInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.TextInput "firebase_functions.params.TextInput") \| [ResourceInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.ResourceInput "firebase_functions.params.ResourceInput") \| [SelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.SelectInput "firebase_functions.params.SelectInput")\[_T\] \| [MultiSelectInput](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.MultiSelectInput "firebase_functions.params.MultiSelectInput") \| None = None* ) |
|---|
| Bases: [`Param`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Param "firebase_functions.params.Param")\[`str`\] A parameter as a string value. | *property* value*: str* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### TernaryExpression *class* firebase_functions.params.TernaryExpression(*test: [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[bool\]* , *if_true: _T* , *if_false: _T* ) |
|---|
| Bases: [`Expression`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[`_T`\], `Generic`\[`_T`\] A CEL expression that evaluates to one of two values based on the value of another expression. if_false*: _T* : if_true*: _T* : test*: [Expression](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.params#firebase_functions.params.Expression "firebase_functions.params.Expression")\[bool\]* : | *property* value*: _T* | |---| | Returns the Expression's runtime value, based on the CLI's resolution of params. | |

| ### TextInput *class* firebase_functions.params.TextInput(*example: str \| None = None* , *validation_regex: str \| None = None* , *validation_error_message: str \| None = None* ) |
|---|
| Bases: `object` Specifies that a Param's value should be determined by prompting the user to type it in interactively at deploy-time. Input that does not match the provided validation_regex, if present, is retried. example*: str \| None* *= None* :   An example of the input required that is displayed alongside the input prompt. validation_error_message*: str \| None* *= None* :   An error message that is displayed to the user if validation_regex fails. validation_regex*: str \| None* *= None* :   Validation regex for the input. Input that does not match this regex, if present, is retried. |