# pydantic 2.14.2 (MIT), harvested by tools/harvest_corpus.py
=== input
!!! abstract "Usage Documentation"
                [`model_dump`](../concepts/serialization.md#python-mode)

            Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

            Args:
                mode: The mode in which `to_python` should run.
                    If mode is 'json', the output will only contain JSON serializable types.
                    If mode is 'python', the output may contain non-JSON-serializable Python objects.
                include: A set of fields to include in the output.
                exclude: A set of fields to exclude from the output.
                context: Additional context to pass to the serializer.
                by_alias: Whether to use the field's alias in the dictionary key if defined.
                exclude_unset: Whether to exclude fields that have not been explicitly set.
                exclude_defaults: Whether to exclude fields that are set to their default value.
                exclude_none: Whether to exclude fields that have a value of `None`.
                exclude_computed_fields: Whether to exclude computed fields.
                    While this can be useful for round-tripping, it is usually recommended to use the dedicated
                    `round_trip` parameter instead.
                round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
                warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
                    "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
                fallback: A function to call when an unknown value is encountered. If not provided,
                    a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
                serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
                polymorphic_serialization: Whether to use model and dataclass polymorphic serialization for this call.

            Returns:
                A dictionary representation of the model.
            
=== parse google
short_description: '!!! abstract "Usage Documentation"'
long_description: |
      [`model_dump`](../concepts/serialization.md#python-mode)
  
  Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
blank_after_short_description: False
blank_after_long_description: True
style: google
- DocstringParam
  description: |
    The mode in which `to_python` should run.
    If mode is 'json', the output will only contain JSON serializable types.
    If mode is 'python', the output may contain non-JSON-serializable Python objects.
  kind: param
  key: 'param'
  arg_name: 'mode'
  is_optional: False
- DocstringParam
  description: 'A set of fields to include in the output.'
  kind: param
  key: 'param'
  arg_name: 'include'
  is_optional: False
- DocstringParam
  description: 'A set of fields to exclude from the output.'
  kind: param
  key: 'param'
  arg_name: 'exclude'
  is_optional: False
- DocstringParam
  description: 'Additional context to pass to the serializer.'
  kind: param
  key: 'param'
  arg_name: 'context'
  is_optional: False
- DocstringParam
  description: "Whether to use the field's alias in the dictionary key if defined."
  kind: param
  key: 'param'
  arg_name: 'by_alias'
  is_optional: False
- DocstringParam
  description: 'Whether to exclude fields that have not been explicitly set.'
  kind: param
  key: 'param'
  arg_name: 'exclude_unset'
  is_optional: False
- DocstringParam
  description: 'Whether to exclude fields that are set to their default value.'
  kind: param
  key: 'param'
  arg_name: 'exclude_defaults'
  is_optional: False
- DocstringParam
  description: 'Whether to exclude fields that have a value of `None`.'
  kind: param
  key: 'param'
  arg_name: 'exclude_none'
  is_optional: False
- DocstringParam
  description: |
    Whether to exclude computed fields.
    While this can be useful for round-tripping, it is usually recommended to use the dedicated
    `round_trip` parameter instead.
  kind: param
  key: 'param'
  arg_name: 'exclude_computed_fields'
  is_optional: False
- DocstringParam
  description: 'If True, dumped values should be valid as input for non-idempotent types such as Json[T].'
  kind: param
  key: 'param'
  arg_name: 'round_trip'
  is_optional: False
- DocstringParam
  description: |
    How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
    "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
  kind: param
  key: 'param'
  arg_name: 'warnings'
  is_optional: False
- DocstringParam
  description: |
    A function to call when an unknown value is encountered. If not provided,
    a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
  kind: param
  key: 'param'
  arg_name: 'fallback'
  is_optional: False
- DocstringParam
  description: 'Whether to serialize fields with duck-typing serialization behavior.'
  kind: param
  key: 'param'
  arg_name: 'serialize_as_any'
  is_optional: False
- DocstringParam
  description: 'Whether to use model and dataclass polymorphic serialization for this call.'
  kind: param
  key: 'param'
  arg_name: 'polymorphic_serialization'
  is_optional: False
- DocstringReturns
  description: 'A dictionary representation of the model.'
  kind: returns
  key: 'returns'
  is_generator: False
=== detect
google
=== compose google
!!! abstract "Usage Documentation"
    [`model_dump`](../concepts/serialization.md#python-mode)

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    exclude_computed_fields: Whether to exclude computed fields.
        While this can be useful for round-tripping, it is usually recommended to use the dedicated
        `round_trip` parameter instead.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    fallback: A function to call when an unknown value is encountered. If not provided,
        a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
    polymorphic_serialization: Whether to use model and dataclass polymorphic serialization for this call.

Returns:
    A dictionary representation of the model.
