# pydantic 2.14.2 (MIT), harvested by tools/harvest_corpus.py
=== input
This class holds information about a field.

    `FieldInfo` is used for any field definition regardless of whether the [`Field()`][pydantic.fields.Field]
    function is explicitly used.

    !!! warning
        The `FieldInfo` class is meant to expose information about a field in a Pydantic model or dataclass.
        `FieldInfo` instances shouldn't be instantiated directly, nor mutated.

        If you need to derive a new model from another one and are willing to alter `FieldInfo` instances,
        refer to this [dynamic model example](../examples/dynamic_models.md).

    Attributes:
        annotation: The type annotation of the field.
        default: The default value of the field.
        default_factory: A callable to generate the default value. The callable can either take 0 arguments
            (in which case it is called as is) or a single argument containing the already validated data.
        alias: The alias name of the field.
        alias_priority: The priority of the field's alias.
        validation_alias: The validation alias of the field.
        serialization_alias: The serialization alias of the field.
        title: The title of the field.
        field_title_generator: A callable that takes a field's name and info and returns title for it.
        description: The description of the field.
        examples: List of examples of the field.
        exclude: Whether to exclude the field from the model serialization.
        exclude_if: A callable that determines whether to exclude a field during serialization based on its value.
        discriminator: Field name or Discriminator for discriminating the type in a tagged union.
        deprecated: A deprecation message, an instance of `warnings.deprecated` or the `typing_extensions.deprecated` backport,
            or a boolean. If `True`, a default deprecation message will be emitted when accessing the field.
        json_schema_extra: A dict or callable to provide extra JSON schema properties.
        frozen: Whether the field is frozen.
        validate_default: Whether to validate the default value of the field.
        repr: Whether to include the field in representation of the model.
        init: Whether the field should be included in the constructor of the dataclass.
        init_var: Whether the field should _only_ be included in the constructor of the dataclass, and not stored.
        kw_only: Whether the field should be a keyword-only argument in the constructor of the dataclass.
        metadata: The metadata list. Contains all the data that isn't expressed as direct `FieldInfo` attributes, including:

            * Type-specific constraints, such as `gt` or `min_length` (these are converted to metadata classes such as `annotated_types.Gt`).
            * Any other arbitrary object used within [`Annotated`][typing.Annotated] metadata
              (e.g. [custom types handlers](../concepts/types.md#as-an-annotation) or any object not recognized by Pydantic).
    
=== parse google
short_description: 'This class holds information about a field.'
long_description: |
  `FieldInfo` is used for any field definition regardless of whether the [`Field()`][pydantic.fields.Field]
  function is explicitly used.
  
  !!! warning
      The `FieldInfo` class is meant to expose information about a field in a Pydantic model or dataclass.
      `FieldInfo` instances shouldn't be instantiated directly, nor mutated.
  
      If you need to derive a new model from another one and are willing to alter `FieldInfo` instances,
      refer to this [dynamic model example](../examples/dynamic_models.md).
blank_after_short_description: True
blank_after_long_description: True
style: google
- DocstringParam
  description: 'The type annotation of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'annotation'
  is_optional: False
- DocstringParam
  description: 'The default value of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'default'
  is_optional: False
- DocstringParam
  description: |
    A callable to generate the default value. The callable can either take 0 arguments
    (in which case it is called as is) or a single argument containing the already validated data.
  kind: attribute
  key: 'attribute'
  arg_name: 'default_factory'
  is_optional: False
- DocstringParam
  description: 'The alias name of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'alias'
  is_optional: False
- DocstringParam
  description: "The priority of the field's alias."
  kind: attribute
  key: 'attribute'
  arg_name: 'alias_priority'
  is_optional: False
- DocstringParam
  description: 'The validation alias of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'validation_alias'
  is_optional: False
- DocstringParam
  description: 'The serialization alias of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'serialization_alias'
  is_optional: False
- DocstringParam
  description: 'The title of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'title'
  is_optional: False
- DocstringParam
  description: "A callable that takes a field's name and info and returns title for it."
  kind: attribute
  key: 'attribute'
  arg_name: 'field_title_generator'
  is_optional: False
- DocstringParam
  description: 'The description of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'description'
  is_optional: False
- DocstringParam
  description: 'List of examples of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'examples'
  is_optional: False
- DocstringParam
  description: 'Whether to exclude the field from the model serialization.'
  kind: attribute
  key: 'attribute'
  arg_name: 'exclude'
  is_optional: False
- DocstringParam
  description: 'A callable that determines whether to exclude a field during serialization based on its value.'
  kind: attribute
  key: 'attribute'
  arg_name: 'exclude_if'
  is_optional: False
- DocstringParam
  description: 'Field name or Discriminator for discriminating the type in a tagged union.'
  kind: attribute
  key: 'attribute'
  arg_name: 'discriminator'
  is_optional: False
- DocstringParam
  description: |
    A deprecation message, an instance of `warnings.deprecated` or the `typing_extensions.deprecated` backport,
    or a boolean. If `True`, a default deprecation message will be emitted when accessing the field.
  kind: attribute
  key: 'attribute'
  arg_name: 'deprecated'
  is_optional: False
- DocstringParam
  description: 'A dict or callable to provide extra JSON schema properties.'
  kind: attribute
  key: 'attribute'
  arg_name: 'json_schema_extra'
  is_optional: False
- DocstringParam
  description: 'Whether the field is frozen.'
  kind: attribute
  key: 'attribute'
  arg_name: 'frozen'
  is_optional: False
- DocstringParam
  description: 'Whether to validate the default value of the field.'
  kind: attribute
  key: 'attribute'
  arg_name: 'validate_default'
  is_optional: False
- DocstringParam
  description: 'Whether to include the field in representation of the model.'
  kind: attribute
  key: 'attribute'
  arg_name: 'repr'
  is_optional: False
- DocstringParam
  description: 'Whether the field should be included in the constructor of the dataclass.'
  kind: attribute
  key: 'attribute'
  arg_name: 'init'
  is_optional: False
- DocstringParam
  description: 'Whether the field should _only_ be included in the constructor of the dataclass, and not stored.'
  kind: attribute
  key: 'attribute'
  arg_name: 'init_var'
  is_optional: False
- DocstringParam
  description: 'Whether the field should be a keyword-only argument in the constructor of the dataclass.'
  kind: attribute
  key: 'attribute'
  arg_name: 'kw_only'
  is_optional: False
- DocstringParam
  description: |
    The metadata list. Contains all the data that isn't expressed as direct `FieldInfo` attributes, including:
    
    * Type-specific constraints, such as `gt` or `min_length` (these are converted to metadata classes such as `annotated_types.Gt`).
    * Any other arbitrary object used within [`Annotated`][typing.Annotated] metadata
      (e.g. [custom types handlers](../concepts/types.md#as-an-annotation) or any object not recognized by Pydantic).
  kind: attribute
  key: 'attribute'
  arg_name: 'metadata'
  is_optional: False
=== detect
google
=== compose google
This class holds information about a field.

`FieldInfo` is used for any field definition regardless of whether the [`Field()`][pydantic.fields.Field]
function is explicitly used.

!!! warning
    The `FieldInfo` class is meant to expose information about a field in a Pydantic model or dataclass.
    `FieldInfo` instances shouldn't be instantiated directly, nor mutated.

    If you need to derive a new model from another one and are willing to alter `FieldInfo` instances,
    refer to this [dynamic model example](../examples/dynamic_models.md).

Attributes:
    annotation: The type annotation of the field.
    default: The default value of the field.
    default_factory: A callable to generate the default value. The callable can either take 0 arguments
        (in which case it is called as is) or a single argument containing the already validated data.
    alias: The alias name of the field.
    alias_priority: The priority of the field's alias.
    validation_alias: The validation alias of the field.
    serialization_alias: The serialization alias of the field.
    title: The title of the field.
    field_title_generator: A callable that takes a field's name and info and returns title for it.
    description: The description of the field.
    examples: List of examples of the field.
    exclude: Whether to exclude the field from the model serialization.
    exclude_if: A callable that determines whether to exclude a field during serialization based on its value.
    discriminator: Field name or Discriminator for discriminating the type in a tagged union.
    deprecated: A deprecation message, an instance of `warnings.deprecated` or the `typing_extensions.deprecated` backport,
        or a boolean. If `True`, a default deprecation message will be emitted when accessing the field.
    json_schema_extra: A dict or callable to provide extra JSON schema properties.
    frozen: Whether the field is frozen.
    validate_default: Whether to validate the default value of the field.
    repr: Whether to include the field in representation of the model.
    init: Whether the field should be included in the constructor of the dataclass.
    init_var: Whether the field should _only_ be included in the constructor of the dataclass, and not stored.
    kw_only: Whether the field should be a keyword-only argument in the constructor of the dataclass.
    metadata: The metadata list. Contains all the data that isn't expressed as direct `FieldInfo` attributes, including:

        * Type-specific constraints, such as `gt` or `min_length` (these are converted to metadata classes such as `annotated_types.Gt`).
        * Any other arbitrary object used within [`Annotated`][typing.Annotated] metadata
          (e.g. [custom types handlers](../concepts/types.md#as-an-annotation) or any object not recognized by Pydantic).
