// components/omnibox/composebox/composebox_query.mojom-send-validation.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_OMNIBOX_COMPOSEBOX_COMPOSEBOX_QUERY_MOJOM_SEND_VALIDATION_H_
#define COMPONENTS_OMNIBOX_COMPOSEBOX_COMPOSEBOX_QUERY_MOJOM_SEND_VALIDATION_H_

#include "components/omnibox/composebox/composebox_query.mojom-shared-internal.h"

#include "components/omnibox/composebox/composebox_query.mojom-data-view.h"

#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"
#include "mojo/public/cpp/bindings/lib/has_send_validation_helper.h"

namespace mojo::internal {
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::composebox_query::mojom::ContextUploadStatus, MaybeConstUserType>
    : std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::composebox_query::mojom::ContextUploadErrorType, MaybeConstUserType>
    : std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::composebox_query::mojom::ModelMode, MaybeConstUserType>
    : std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::composebox_query::mojom::ToolMode, MaybeConstUserType>
    : std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::composebox_query::mojom::InputType, MaybeConstUserType>
    : std::false_type {};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::AimUrlParamDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::AimUrlParamDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::AimUrlParam_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      decltype(Traits::param_key(input)) in_param_key = Traits::param_key(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->param_key)::BaseType> param_key_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_param_key,
        param_key_fragment);

      fragment->param_key.Set(
          param_key_fragment.is_null() ? nullptr : param_key_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->param_key.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null param_key in AimUrlParam struct");

      decltype(Traits::param_value(input)) in_param_value = Traits::param_value(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->param_value)::BaseType> param_value_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_param_value,
        param_value_fragment);

      fragment->param_value.Set(
          param_value_fragment.is_null() ? nullptr : param_value_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->param_value.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null param_value in AimUrlParam struct");
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::InputTypeConfigDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::InputTypeConfigDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::InputTypeConfig_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      
      mojo::internal::Serialize<::composebox_query::mojom::InputType>(
        Traits::input_type(input),
        &fragment->input_type);

      decltype(Traits::menu_label(input)) in_menu_label = Traits::menu_label(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->menu_label)::BaseType> menu_label_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_menu_label,
        menu_label_fragment);

      fragment->menu_label.Set(
          menu_label_fragment.is_null() ? nullptr : menu_label_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->menu_label.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null menu_label in InputTypeConfig struct");
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::ToolConfigDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::ToolConfigDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::ToolConfig_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      
      mojo::internal::Serialize<::composebox_query::mojom::ToolMode>(
        Traits::tool(input),
        &fragment->tool);

      fragment->disable_active_model_selection = Traits::disable_active_model_selection(input);

      decltype(Traits::menu_label(input)) in_menu_label = Traits::menu_label(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->menu_label)::BaseType> menu_label_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_menu_label,
        menu_label_fragment);

      fragment->menu_label.Set(
          menu_label_fragment.is_null() ? nullptr : menu_label_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->menu_label.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null menu_label in ToolConfig struct");

      decltype(Traits::chip_label(input)) in_chip_label = Traits::chip_label(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->chip_label)::BaseType> chip_label_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_chip_label,
        chip_label_fragment);

      fragment->chip_label.Set(
          chip_label_fragment.is_null() ? nullptr : chip_label_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->chip_label.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null chip_label in ToolConfig struct");

      decltype(Traits::hint_text(input)) in_hint_text = Traits::hint_text(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->hint_text)::BaseType> hint_text_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_hint_text,
        hint_text_fragment);

      fragment->hint_text.Set(
          hint_text_fragment.is_null() ? nullptr : hint_text_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->hint_text.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null hint_text in ToolConfig struct");

      decltype(Traits::aim_url_params(input)) in_aim_url_params = Traits::aim_url_params(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->aim_url_params)::BaseType>
          aim_url_params_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& aim_url_params_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::AimUrlParamDataView>, send_validation>(
        in_aim_url_params,
        aim_url_params_fragment,
        &aim_url_params_validate_params);

      fragment->aim_url_params.Set(
          aim_url_params_fragment.is_null() ? nullptr : aim_url_params_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->aim_url_params.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null aim_url_params in ToolConfig struct");

      decltype(Traits::menu_tooltip(input)) in_menu_tooltip = Traits::menu_tooltip(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->menu_tooltip)::BaseType> menu_tooltip_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_menu_tooltip,
        menu_tooltip_fragment);

      fragment->menu_tooltip.Set(
          menu_tooltip_fragment.is_null() ? nullptr : menu_tooltip_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->menu_tooltip.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null menu_tooltip in ToolConfig struct");
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::ModelConfigDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::ModelConfigDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::ModelConfig_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      
      mojo::internal::Serialize<::composebox_query::mojom::ModelMode>(
        Traits::model(input),
        &fragment->model);

      decltype(Traits::menu_label(input)) in_menu_label = Traits::menu_label(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->menu_label)::BaseType> menu_label_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_menu_label,
        menu_label_fragment);

      fragment->menu_label.Set(
          menu_label_fragment.is_null() ? nullptr : menu_label_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->menu_label.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null menu_label in ModelConfig struct");

      decltype(Traits::hint_text(input)) in_hint_text = Traits::hint_text(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->hint_text)::BaseType> hint_text_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_hint_text,
        hint_text_fragment);

      fragment->hint_text.Set(
          hint_text_fragment.is_null() ? nullptr : hint_text_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->hint_text.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null hint_text in ModelConfig struct");

      decltype(Traits::aim_url_params(input)) in_aim_url_params = Traits::aim_url_params(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->aim_url_params)::BaseType>
          aim_url_params_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& aim_url_params_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::AimUrlParamDataView>, send_validation>(
        in_aim_url_params,
        aim_url_params_fragment,
        &aim_url_params_validate_params);

      fragment->aim_url_params.Set(
          aim_url_params_fragment.is_null() ? nullptr : aim_url_params_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->aim_url_params.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null aim_url_params in ModelConfig struct");

      decltype(Traits::menu_tooltip(input)) in_menu_tooltip = Traits::menu_tooltip(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->menu_tooltip)::BaseType> menu_tooltip_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_menu_tooltip,
        menu_tooltip_fragment);

      fragment->menu_tooltip.Set(
          menu_tooltip_fragment.is_null() ? nullptr : menu_tooltip_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->menu_tooltip.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null menu_tooltip in ModelConfig struct");
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::SectionConfigDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::SectionConfigDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::SectionConfig_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      decltype(Traits::header(input)) in_header = Traits::header(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->header)::BaseType> header_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_header,
        header_fragment);

      fragment->header.Set(
          header_fragment.is_null() ? nullptr : header_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->header.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null header in SectionConfig struct");
  }
};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::composebox_query::mojom::InputStateDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::composebox_query::mojom::InputStateDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::composebox_query::mojom::internal::InputState_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      decltype(Traits::allowed_models(input)) in_allowed_models = Traits::allowed_models(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->allowed_models)::BaseType>
          allowed_models_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& allowed_models_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::ModelMode_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ModelMode>, send_validation>(
        in_allowed_models,
        allowed_models_fragment,
        &allowed_models_validate_params);

      fragment->allowed_models.Set(
          allowed_models_fragment.is_null() ? nullptr : allowed_models_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->allowed_models.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null allowed_models in InputState struct");

      decltype(Traits::allowed_tools(input)) in_allowed_tools = Traits::allowed_tools(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->allowed_tools)::BaseType>
          allowed_tools_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& allowed_tools_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::ToolMode_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ToolMode>, send_validation>(
        in_allowed_tools,
        allowed_tools_fragment,
        &allowed_tools_validate_params);

      fragment->allowed_tools.Set(
          allowed_tools_fragment.is_null() ? nullptr : allowed_tools_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->allowed_tools.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null allowed_tools in InputState struct");

      decltype(Traits::allowed_input_types(input)) in_allowed_input_types = Traits::allowed_input_types(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->allowed_input_types)::BaseType>
          allowed_input_types_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& allowed_input_types_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::InputType_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::InputType>, send_validation>(
        in_allowed_input_types,
        allowed_input_types_fragment,
        &allowed_input_types_validate_params);

      fragment->allowed_input_types.Set(
          allowed_input_types_fragment.is_null() ? nullptr : allowed_input_types_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->allowed_input_types.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null allowed_input_types in InputState struct");

      
      mojo::internal::Serialize<::composebox_query::mojom::ModelMode>(
        Traits::active_model(input),
        &fragment->active_model);

      
      mojo::internal::Serialize<::composebox_query::mojom::ToolMode>(
        Traits::active_tool(input),
        &fragment->active_tool);

      decltype(Traits::disabled_models(input)) in_disabled_models = Traits::disabled_models(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->disabled_models)::BaseType>
          disabled_models_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& disabled_models_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::ModelMode_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ModelMode>, send_validation>(
        in_disabled_models,
        disabled_models_fragment,
        &disabled_models_validate_params);

      fragment->disabled_models.Set(
          disabled_models_fragment.is_null() ? nullptr : disabled_models_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->disabled_models.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null disabled_models in InputState struct");

      decltype(Traits::disabled_tools(input)) in_disabled_tools = Traits::disabled_tools(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->disabled_tools)::BaseType>
          disabled_tools_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& disabled_tools_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::ToolMode_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ToolMode>, send_validation>(
        in_disabled_tools,
        disabled_tools_fragment,
        &disabled_tools_validate_params);

      fragment->disabled_tools.Set(
          disabled_tools_fragment.is_null() ? nullptr : disabled_tools_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->disabled_tools.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null disabled_tools in InputState struct");

      decltype(Traits::disabled_input_types(input)) in_disabled_input_types = Traits::disabled_input_types(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->disabled_input_types)::BaseType>
          disabled_input_types_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& disabled_input_types_validate_params =
          mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::InputType_Data::Validate>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::InputType>, send_validation>(
        in_disabled_input_types,
        disabled_input_types_fragment,
        &disabled_input_types_validate_params);

      fragment->disabled_input_types.Set(
          disabled_input_types_fragment.is_null() ? nullptr : disabled_input_types_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->disabled_input_types.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null disabled_input_types in InputState struct");

      decltype(Traits::tool_configs(input)) in_tool_configs = Traits::tool_configs(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->tool_configs)::BaseType>
          tool_configs_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& tool_configs_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ToolConfigDataView>, send_validation>(
        in_tool_configs,
        tool_configs_fragment,
        &tool_configs_validate_params);

      fragment->tool_configs.Set(
          tool_configs_fragment.is_null() ? nullptr : tool_configs_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->tool_configs.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null tool_configs in InputState struct");

      decltype(Traits::model_configs(input)) in_model_configs = Traits::model_configs(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->model_configs)::BaseType>
          model_configs_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& model_configs_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::ModelConfigDataView>, send_validation>(
        in_model_configs,
        model_configs_fragment,
        &model_configs_validate_params);

      fragment->model_configs.Set(
          model_configs_fragment.is_null() ? nullptr : model_configs_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->model_configs.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null model_configs in InputState struct");

      decltype(Traits::input_type_configs(input)) in_input_type_configs = Traits::input_type_configs(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->input_type_configs)::BaseType>
          input_type_configs_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& input_type_configs_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      
      mojo::internal::Serialize<mojo::ArrayDataView<::composebox_query::mojom::InputTypeConfigDataView>, send_validation>(
        in_input_type_configs,
        input_type_configs_fragment,
        &input_type_configs_validate_params);

      fragment->input_type_configs.Set(
          input_type_configs_fragment.is_null() ? nullptr : input_type_configs_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->input_type_configs.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null input_type_configs in InputState struct");

      decltype(Traits::tools_section_config(input)) in_tools_section_config = Traits::tools_section_config(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->tools_section_config)::BaseType> tools_section_config_fragment(
              fragment.message());
      
      mojo::internal::Serialize<::composebox_query::mojom::SectionConfigDataView, send_validation>(
        in_tools_section_config,
        tools_section_config_fragment);

      fragment->tools_section_config.Set(
          tools_section_config_fragment.is_null() ? nullptr : tools_section_config_fragment.data());

      decltype(Traits::model_section_config(input)) in_model_section_config = Traits::model_section_config(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->model_section_config)::BaseType> model_section_config_fragment(
              fragment.message());
      
      mojo::internal::Serialize<::composebox_query::mojom::SectionConfigDataView, send_validation>(
        in_model_section_config,
        model_section_config_fragment);

      fragment->model_section_config.Set(
          model_section_config_fragment.is_null() ? nullptr : model_section_config_fragment.data());

      decltype(Traits::hint_text(input)) in_hint_text = Traits::hint_text(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->hint_text)::BaseType> hint_text_fragment(
              fragment.message());
      
      mojo::internal::Serialize<mojo::StringDataView, send_validation>(
        in_hint_text,
        hint_text_fragment);

      fragment->hint_text.Set(
          hint_text_fragment.is_null() ? nullptr : hint_text_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->hint_text.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null hint_text in InputState struct");

      decltype(Traits::max_inputs_by_type(input)) in_max_inputs_by_type = Traits::max_inputs_by_type(input);
      mojo::internal::MessageFragment<
          typename decltype(fragment->max_inputs_by_type)::BaseType>
          max_inputs_by_type_fragment(fragment.message());
      constexpr const mojo::internal::ContainerValidateParams& max_inputs_by_type_validate_params =
          mojo::internal::GetMapValidator<*&mojo::internal::GetArrayOfEnumsValidator<0, false, ::composebox_query::mojom::internal::InputType_Data::Validate>(), *&mojo::internal::GetArrayValidator<0, false, nullptr>()>();
      
      mojo::internal::Serialize<mojo::MapDataView<::composebox_query::mojom::InputType, int32_t>, send_validation>(
        in_max_inputs_by_type,
        max_inputs_by_type_fragment,
        &max_inputs_by_type_validate_params);

      fragment->max_inputs_by_type.Set(
          max_inputs_by_type_fragment.is_null() ? nullptr : max_inputs_by_type_fragment.data());

      
      MOJO_INTERNAL_CHECK_SERIALIZATION(
        send_validation,
        !(fragment->max_inputs_by_type.is_null()),
        mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
        "null max_inputs_by_type in InputState struct");

      fragment->max_total_inputs = Traits::max_total_inputs(input);

      fragment->is_canvas_query_submitted = Traits::is_canvas_query_submitted(input);
  }
};

}  // namespace mojo::internal

#endif  // COMPONENTS_OMNIBOX_COMPOSEBOX_COMPOSEBOX_QUERY_MOJOM_SEND_VALIDATION_H_