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

// Copyright 2013 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_H_
#define COMPONENTS_OMNIBOX_COMPOSEBOX_COMPOSEBOX_QUERY_MOJOM_H_

#include <stdint.h>

#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "components/omnibox/composebox/composebox_query.mojom-features.h"  // IWYU pragma: export
#include "components/omnibox/composebox/composebox_query.mojom-shared.h"  // IWYU pragma: export
#include "components/omnibox/composebox/composebox_query.mojom-forward.h"  // IWYU pragma: export
#include <string>
#include <vector>




#include "components/omnibox/composebox/contextual_search_mojom_traits.h"




namespace composebox_query::mojom {





class  AimUrlParam {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<AimUrlParam, T>::value>;
  using DataView = AimUrlParamDataView;
  using Data_ = internal::AimUrlParam_Data;

  template <typename... Args>
  static AimUrlParamPtr New(Args&&... args) {
    return AimUrlParamPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static AimUrlParamPtr From(const U& u) {
    return mojo::TypeConverter<AimUrlParamPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, AimUrlParam>::Convert(*this);
  }


  AimUrlParam();

  AimUrlParam(
      const std::string& param_key,
      const std::string& param_value);


  ~AimUrlParam();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = AimUrlParamPtr>
  AimUrlParamPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        AimUrlParam::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        AimUrlParam::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        AimUrlParam::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::AimUrlParam_UnserializedMessageContext<
            UserType, AimUrlParam::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<AimUrlParam::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return AimUrlParam::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::AimUrlParam_UnserializedMessageContext<
            UserType, AimUrlParam::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<AimUrlParam::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string param_key;
  
  std::string param_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, AimUrlParam::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  InputTypeConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<InputTypeConfig, T>::value>;
  using DataView = InputTypeConfigDataView;
  using Data_ = internal::InputTypeConfig_Data;

  template <typename... Args>
  static InputTypeConfigPtr New(Args&&... args) {
    return InputTypeConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static InputTypeConfigPtr From(const U& u) {
    return mojo::TypeConverter<InputTypeConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, InputTypeConfig>::Convert(*this);
  }


  InputTypeConfig();

  InputTypeConfig(
      ::omnibox::InputType input_type,
      const std::string& menu_label);


  ~InputTypeConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = InputTypeConfigPtr>
  InputTypeConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InputTypeConfig::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InputTypeConfig::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        InputTypeConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::InputTypeConfig_UnserializedMessageContext<
            UserType, InputTypeConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<InputTypeConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return InputTypeConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::InputTypeConfig_UnserializedMessageContext<
            UserType, InputTypeConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<InputTypeConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::omnibox::InputType input_type;
  
  std::string menu_label;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, InputTypeConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}







class  SectionConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SectionConfig, T>::value>;
  using DataView = SectionConfigDataView;
  using Data_ = internal::SectionConfig_Data;

  template <typename... Args>
  static SectionConfigPtr New(Args&&... args) {
    return SectionConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SectionConfigPtr From(const U& u) {
    return mojo::TypeConverter<SectionConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SectionConfig>::Convert(*this);
  }


  SectionConfig();

  explicit SectionConfig(
      const std::string& header);


  ~SectionConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SectionConfigPtr>
  SectionConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SectionConfig::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SectionConfig::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SectionConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SectionConfig_UnserializedMessageContext<
            UserType, SectionConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SectionConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SectionConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SectionConfig_UnserializedMessageContext<
            UserType, SectionConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SectionConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string header;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SectionConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}










class  ToolConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ToolConfig, T>::value>;
  using DataView = ToolConfigDataView;
  using Data_ = internal::ToolConfig_Data;

  template <typename... Args>
  static ToolConfigPtr New(Args&&... args) {
    return ToolConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ToolConfigPtr From(const U& u) {
    return mojo::TypeConverter<ToolConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ToolConfig>::Convert(*this);
  }


  ToolConfig();

  ToolConfig(
      ::omnibox::ToolMode tool,
      bool disable_active_model_selection,
      const std::string& menu_label,
      const std::string& chip_label,
      const std::string& hint_text,
      std::vector<AimUrlParamPtr> aim_url_params,
      const std::string& menu_tooltip);

ToolConfig(const ToolConfig&) = delete;
ToolConfig& operator=(const ToolConfig&) = delete;

  ~ToolConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ToolConfigPtr>
  ToolConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ToolConfig::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ToolConfig::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ToolConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ToolConfig_UnserializedMessageContext<
            UserType, ToolConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ToolConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ToolConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ToolConfig_UnserializedMessageContext<
            UserType, ToolConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ToolConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::omnibox::ToolMode tool;
  
  bool disable_active_model_selection;
  
  std::string menu_label;
  
  std::string chip_label;
  
  std::string hint_text;
  
  std::vector<AimUrlParamPtr> aim_url_params;
  
  std::string menu_tooltip;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ToolConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  ModelConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ModelConfig, T>::value>;
  using DataView = ModelConfigDataView;
  using Data_ = internal::ModelConfig_Data;

  template <typename... Args>
  static ModelConfigPtr New(Args&&... args) {
    return ModelConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ModelConfigPtr From(const U& u) {
    return mojo::TypeConverter<ModelConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ModelConfig>::Convert(*this);
  }


  ModelConfig();

  ModelConfig(
      ::omnibox::ModelMode model,
      const std::string& menu_label,
      const std::string& hint_text,
      std::vector<AimUrlParamPtr> aim_url_params,
      const std::string& menu_tooltip);

ModelConfig(const ModelConfig&) = delete;
ModelConfig& operator=(const ModelConfig&) = delete;

  ~ModelConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ModelConfigPtr>
  ModelConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ModelConfig::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ModelConfig::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ModelConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ModelConfig_UnserializedMessageContext<
            UserType, ModelConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ModelConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ModelConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ModelConfig_UnserializedMessageContext<
            UserType, ModelConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ModelConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::omnibox::ModelMode model;
  
  std::string menu_label;
  
  std::string hint_text;
  
  std::vector<AimUrlParamPtr> aim_url_params;
  
  std::string menu_tooltip;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ModelConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class  InputState {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<InputState, T>::value>;
  using DataView = InputStateDataView;
  using Data_ = internal::InputState_Data;

  template <typename... Args>
  static InputStatePtr New(Args&&... args) {
    return InputStatePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static InputStatePtr From(const U& u) {
    return mojo::TypeConverter<InputStatePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, InputState>::Convert(*this);
  }


  InputState();

  InputState(
      std::vector<::omnibox::ModelMode> allowed_models,
      std::vector<::omnibox::ToolMode> allowed_tools,
      std::vector<::omnibox::InputType> allowed_input_types,
      ::omnibox::ModelMode active_model,
      ::omnibox::ToolMode active_tool,
      std::vector<::omnibox::ModelMode> disabled_models,
      std::vector<::omnibox::ToolMode> disabled_tools,
      std::vector<::omnibox::InputType> disabled_input_types,
      std::vector<::omnibox::ToolConfig> tool_configs,
      std::vector<::omnibox::ModelConfig> model_configs,
      std::vector<InputTypeConfigPtr> input_type_configs,
      const std::optional<::omnibox::SectionConfig>& tools_section_config,
      const std::optional<::omnibox::SectionConfig>& model_section_config,
      const std::string& hint_text,
      const base::flat_map<::omnibox::InputType, int32_t>& max_inputs_by_type,
      int32_t max_total_inputs,
      bool is_canvas_query_submitted);

InputState(const InputState&) = delete;
InputState& operator=(const InputState&) = delete;

  ~InputState();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = InputStatePtr>
  InputStatePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, InputState::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, InputState::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, InputState::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InputState::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InputState::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        InputState::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::InputState_UnserializedMessageContext<
            UserType, InputState::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<InputState::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return InputState::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::InputState_UnserializedMessageContext<
            UserType, InputState::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<InputState::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::omnibox::ModelMode> allowed_models;
  
  std::vector<::omnibox::ToolMode> allowed_tools;
  
  std::vector<::omnibox::InputType> allowed_input_types;
  
  ::omnibox::ModelMode active_model;
  
  ::omnibox::ToolMode active_tool;
  
  std::vector<::omnibox::ModelMode> disabled_models;
  
  std::vector<::omnibox::ToolMode> disabled_tools;
  
  std::vector<::omnibox::InputType> disabled_input_types;
  
  std::vector<::omnibox::ToolConfig> tool_configs;
  
  std::vector<::omnibox::ModelConfig> model_configs;
  
  std::vector<InputTypeConfigPtr> input_type_configs;
  
  std::optional<::omnibox::SectionConfig> tools_section_config;
  
  std::optional<::omnibox::SectionConfig> model_section_config;
  
  std::string hint_text;
  
  base::flat_map<::omnibox::InputType, int32_t> max_inputs_by_type;
  
  int32_t max_total_inputs;
  
  bool is_canvas_query_submitted;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, InputState::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, InputState::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, InputState::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, InputState::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}

template <typename StructPtrType>
AimUrlParamPtr AimUrlParam::Clone() const {
  return New(
      mojo::Clone(param_key),
      mojo::Clone(param_value)
  );
}

template <typename T, AimUrlParam::EnableIfSame<T>*>
bool AimUrlParam::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->param_key, other_struct.param_key))
    return false;
  if (!mojo::Equals(this->param_value, other_struct.param_value))
    return false;
  return true;
}

template <typename T, AimUrlParam::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.param_key < rhs.param_key)
    return true;
  if (rhs.param_key < lhs.param_key)
    return false;
  if (lhs.param_value < rhs.param_value)
    return true;
  if (rhs.param_value < lhs.param_value)
    return false;
  return false;
}
template <typename StructPtrType>
InputTypeConfigPtr InputTypeConfig::Clone() const {
  return New(
      mojo::Clone(input_type),
      mojo::Clone(menu_label)
  );
}

template <typename T, InputTypeConfig::EnableIfSame<T>*>
bool InputTypeConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->input_type, other_struct.input_type))
    return false;
  if (!mojo::Equals(this->menu_label, other_struct.menu_label))
    return false;
  return true;
}

template <typename T, InputTypeConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.input_type < rhs.input_type)
    return true;
  if (rhs.input_type < lhs.input_type)
    return false;
  if (lhs.menu_label < rhs.menu_label)
    return true;
  if (rhs.menu_label < lhs.menu_label)
    return false;
  return false;
}
template <typename StructPtrType>
ToolConfigPtr ToolConfig::Clone() const {
  return New(
      mojo::Clone(tool),
      mojo::Clone(disable_active_model_selection),
      mojo::Clone(menu_label),
      mojo::Clone(chip_label),
      mojo::Clone(hint_text),
      mojo::Clone(aim_url_params),
      mojo::Clone(menu_tooltip)
  );
}

template <typename T, ToolConfig::EnableIfSame<T>*>
bool ToolConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->tool, other_struct.tool))
    return false;
  if (!mojo::Equals(this->disable_active_model_selection, other_struct.disable_active_model_selection))
    return false;
  if (!mojo::Equals(this->menu_label, other_struct.menu_label))
    return false;
  if (!mojo::Equals(this->chip_label, other_struct.chip_label))
    return false;
  if (!mojo::Equals(this->hint_text, other_struct.hint_text))
    return false;
  if (!mojo::Equals(this->aim_url_params, other_struct.aim_url_params))
    return false;
  if (!mojo::Equals(this->menu_tooltip, other_struct.menu_tooltip))
    return false;
  return true;
}

template <typename T, ToolConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.tool < rhs.tool)
    return true;
  if (rhs.tool < lhs.tool)
    return false;
  if (lhs.disable_active_model_selection < rhs.disable_active_model_selection)
    return true;
  if (rhs.disable_active_model_selection < lhs.disable_active_model_selection)
    return false;
  if (lhs.menu_label < rhs.menu_label)
    return true;
  if (rhs.menu_label < lhs.menu_label)
    return false;
  if (lhs.chip_label < rhs.chip_label)
    return true;
  if (rhs.chip_label < lhs.chip_label)
    return false;
  if (lhs.hint_text < rhs.hint_text)
    return true;
  if (rhs.hint_text < lhs.hint_text)
    return false;
  if (lhs.aim_url_params < rhs.aim_url_params)
    return true;
  if (rhs.aim_url_params < lhs.aim_url_params)
    return false;
  if (lhs.menu_tooltip < rhs.menu_tooltip)
    return true;
  if (rhs.menu_tooltip < lhs.menu_tooltip)
    return false;
  return false;
}
template <typename StructPtrType>
ModelConfigPtr ModelConfig::Clone() const {
  return New(
      mojo::Clone(model),
      mojo::Clone(menu_label),
      mojo::Clone(hint_text),
      mojo::Clone(aim_url_params),
      mojo::Clone(menu_tooltip)
  );
}

template <typename T, ModelConfig::EnableIfSame<T>*>
bool ModelConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->model, other_struct.model))
    return false;
  if (!mojo::Equals(this->menu_label, other_struct.menu_label))
    return false;
  if (!mojo::Equals(this->hint_text, other_struct.hint_text))
    return false;
  if (!mojo::Equals(this->aim_url_params, other_struct.aim_url_params))
    return false;
  if (!mojo::Equals(this->menu_tooltip, other_struct.menu_tooltip))
    return false;
  return true;
}

template <typename T, ModelConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.model < rhs.model)
    return true;
  if (rhs.model < lhs.model)
    return false;
  if (lhs.menu_label < rhs.menu_label)
    return true;
  if (rhs.menu_label < lhs.menu_label)
    return false;
  if (lhs.hint_text < rhs.hint_text)
    return true;
  if (rhs.hint_text < lhs.hint_text)
    return false;
  if (lhs.aim_url_params < rhs.aim_url_params)
    return true;
  if (rhs.aim_url_params < lhs.aim_url_params)
    return false;
  if (lhs.menu_tooltip < rhs.menu_tooltip)
    return true;
  if (rhs.menu_tooltip < lhs.menu_tooltip)
    return false;
  return false;
}
template <typename StructPtrType>
SectionConfigPtr SectionConfig::Clone() const {
  return New(
      mojo::Clone(header)
  );
}

template <typename T, SectionConfig::EnableIfSame<T>*>
bool SectionConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->header, other_struct.header))
    return false;
  return true;
}

template <typename T, SectionConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.header < rhs.header)
    return true;
  if (rhs.header < lhs.header)
    return false;
  return false;
}
template <typename StructPtrType>
InputStatePtr InputState::Clone() const {
  return New(
      mojo::Clone(allowed_models),
      mojo::Clone(allowed_tools),
      mojo::Clone(allowed_input_types),
      mojo::Clone(active_model),
      mojo::Clone(active_tool),
      mojo::Clone(disabled_models),
      mojo::Clone(disabled_tools),
      mojo::Clone(disabled_input_types),
      mojo::Clone(tool_configs),
      mojo::Clone(model_configs),
      mojo::Clone(input_type_configs),
      mojo::Clone(tools_section_config),
      mojo::Clone(model_section_config),
      mojo::Clone(hint_text),
      mojo::Clone(max_inputs_by_type),
      mojo::Clone(max_total_inputs),
      mojo::Clone(is_canvas_query_submitted)
  );
}

template <typename T, InputState::EnableIfSame<T>*>
bool InputState::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->allowed_models, other_struct.allowed_models))
    return false;
  if (!mojo::Equals(this->allowed_tools, other_struct.allowed_tools))
    return false;
  if (!mojo::Equals(this->allowed_input_types, other_struct.allowed_input_types))
    return false;
  if (!mojo::Equals(this->active_model, other_struct.active_model))
    return false;
  if (!mojo::Equals(this->active_tool, other_struct.active_tool))
    return false;
  if (!mojo::Equals(this->disabled_models, other_struct.disabled_models))
    return false;
  if (!mojo::Equals(this->disabled_tools, other_struct.disabled_tools))
    return false;
  if (!mojo::Equals(this->disabled_input_types, other_struct.disabled_input_types))
    return false;
  if (!mojo::Equals(this->tool_configs, other_struct.tool_configs))
    return false;
  if (!mojo::Equals(this->model_configs, other_struct.model_configs))
    return false;
  if (!mojo::Equals(this->input_type_configs, other_struct.input_type_configs))
    return false;
  if (!mojo::Equals(this->tools_section_config, other_struct.tools_section_config))
    return false;
  if (!mojo::Equals(this->model_section_config, other_struct.model_section_config))
    return false;
  if (!mojo::Equals(this->hint_text, other_struct.hint_text))
    return false;
  if (!mojo::Equals(this->max_inputs_by_type, other_struct.max_inputs_by_type))
    return false;
  if (!mojo::Equals(this->max_total_inputs, other_struct.max_total_inputs))
    return false;
  if (!mojo::Equals(this->is_canvas_query_submitted, other_struct.is_canvas_query_submitted))
    return false;
  return true;
}

template <typename T, InputState::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.allowed_models < rhs.allowed_models)
    return true;
  if (rhs.allowed_models < lhs.allowed_models)
    return false;
  if (lhs.allowed_tools < rhs.allowed_tools)
    return true;
  if (rhs.allowed_tools < lhs.allowed_tools)
    return false;
  if (lhs.allowed_input_types < rhs.allowed_input_types)
    return true;
  if (rhs.allowed_input_types < lhs.allowed_input_types)
    return false;
  if (lhs.active_model < rhs.active_model)
    return true;
  if (rhs.active_model < lhs.active_model)
    return false;
  if (lhs.active_tool < rhs.active_tool)
    return true;
  if (rhs.active_tool < lhs.active_tool)
    return false;
  if (lhs.disabled_models < rhs.disabled_models)
    return true;
  if (rhs.disabled_models < lhs.disabled_models)
    return false;
  if (lhs.disabled_tools < rhs.disabled_tools)
    return true;
  if (rhs.disabled_tools < lhs.disabled_tools)
    return false;
  if (lhs.disabled_input_types < rhs.disabled_input_types)
    return true;
  if (rhs.disabled_input_types < lhs.disabled_input_types)
    return false;
  if (lhs.tool_configs < rhs.tool_configs)
    return true;
  if (rhs.tool_configs < lhs.tool_configs)
    return false;
  if (lhs.model_configs < rhs.model_configs)
    return true;
  if (rhs.model_configs < lhs.model_configs)
    return false;
  if (lhs.input_type_configs < rhs.input_type_configs)
    return true;
  if (rhs.input_type_configs < lhs.input_type_configs)
    return false;
  if (lhs.tools_section_config < rhs.tools_section_config)
    return true;
  if (rhs.tools_section_config < lhs.tools_section_config)
    return false;
  if (lhs.model_section_config < rhs.model_section_config)
    return true;
  if (rhs.model_section_config < lhs.model_section_config)
    return false;
  if (lhs.hint_text < rhs.hint_text)
    return true;
  if (rhs.hint_text < lhs.hint_text)
    return false;
  if (lhs.max_inputs_by_type < rhs.max_inputs_by_type)
    return true;
  if (rhs.max_inputs_by_type < lhs.max_inputs_by_type)
    return false;
  if (lhs.max_total_inputs < rhs.max_total_inputs)
    return true;
  if (rhs.max_total_inputs < lhs.max_total_inputs)
    return false;
  if (lhs.is_canvas_query_submitted < rhs.is_canvas_query_submitted)
    return true;
  if (rhs.is_canvas_query_submitted < lhs.is_canvas_query_submitted)
    return false;
  return false;
}


}  // composebox_query::mojom

namespace mojo {


template <>
struct  StructTraits<::composebox_query::mojom::AimUrlParam::DataView,
                                         ::composebox_query::mojom::AimUrlParamPtr> {
  static bool IsNull(const ::composebox_query::mojom::AimUrlParamPtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::AimUrlParamPtr* output) { output->reset(); }

  static const decltype(::composebox_query::mojom::AimUrlParam::param_key)& param_key(
      const ::composebox_query::mojom::AimUrlParamPtr& input) {
    return input->param_key;
  }

  static const decltype(::composebox_query::mojom::AimUrlParam::param_value)& param_value(
      const ::composebox_query::mojom::AimUrlParamPtr& input) {
    return input->param_value;
  }

  static bool Read(::composebox_query::mojom::AimUrlParam::DataView input, ::composebox_query::mojom::AimUrlParamPtr* output);
};


template <>
struct  StructTraits<::composebox_query::mojom::InputTypeConfig::DataView,
                                         ::composebox_query::mojom::InputTypeConfigPtr> {
  static bool IsNull(const ::composebox_query::mojom::InputTypeConfigPtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::InputTypeConfigPtr* output) { output->reset(); }

  static decltype(::composebox_query::mojom::InputTypeConfig::input_type) input_type(
      const ::composebox_query::mojom::InputTypeConfigPtr& input) {
    return input->input_type;
  }

  static const decltype(::composebox_query::mojom::InputTypeConfig::menu_label)& menu_label(
      const ::composebox_query::mojom::InputTypeConfigPtr& input) {
    return input->menu_label;
  }

  static bool Read(::composebox_query::mojom::InputTypeConfig::DataView input, ::composebox_query::mojom::InputTypeConfigPtr* output);
};


template <>
struct  StructTraits<::composebox_query::mojom::ToolConfig::DataView,
                                         ::composebox_query::mojom::ToolConfigPtr> {
  static bool IsNull(const ::composebox_query::mojom::ToolConfigPtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::ToolConfigPtr* output) { output->reset(); }

  static decltype(::composebox_query::mojom::ToolConfig::tool) tool(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->tool;
  }

  static decltype(::composebox_query::mojom::ToolConfig::disable_active_model_selection) disable_active_model_selection(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->disable_active_model_selection;
  }

  static const decltype(::composebox_query::mojom::ToolConfig::menu_label)& menu_label(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->menu_label;
  }

  static const decltype(::composebox_query::mojom::ToolConfig::chip_label)& chip_label(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->chip_label;
  }

  static const decltype(::composebox_query::mojom::ToolConfig::hint_text)& hint_text(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->hint_text;
  }

  static const decltype(::composebox_query::mojom::ToolConfig::aim_url_params)& aim_url_params(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->aim_url_params;
  }

  static const decltype(::composebox_query::mojom::ToolConfig::menu_tooltip)& menu_tooltip(
      const ::composebox_query::mojom::ToolConfigPtr& input) {
    return input->menu_tooltip;
  }

  static bool Read(::composebox_query::mojom::ToolConfig::DataView input, ::composebox_query::mojom::ToolConfigPtr* output);
};


template <>
struct  StructTraits<::composebox_query::mojom::ModelConfig::DataView,
                                         ::composebox_query::mojom::ModelConfigPtr> {
  static bool IsNull(const ::composebox_query::mojom::ModelConfigPtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::ModelConfigPtr* output) { output->reset(); }

  static decltype(::composebox_query::mojom::ModelConfig::model) model(
      const ::composebox_query::mojom::ModelConfigPtr& input) {
    return input->model;
  }

  static const decltype(::composebox_query::mojom::ModelConfig::menu_label)& menu_label(
      const ::composebox_query::mojom::ModelConfigPtr& input) {
    return input->menu_label;
  }

  static const decltype(::composebox_query::mojom::ModelConfig::hint_text)& hint_text(
      const ::composebox_query::mojom::ModelConfigPtr& input) {
    return input->hint_text;
  }

  static const decltype(::composebox_query::mojom::ModelConfig::aim_url_params)& aim_url_params(
      const ::composebox_query::mojom::ModelConfigPtr& input) {
    return input->aim_url_params;
  }

  static const decltype(::composebox_query::mojom::ModelConfig::menu_tooltip)& menu_tooltip(
      const ::composebox_query::mojom::ModelConfigPtr& input) {
    return input->menu_tooltip;
  }

  static bool Read(::composebox_query::mojom::ModelConfig::DataView input, ::composebox_query::mojom::ModelConfigPtr* output);
};


template <>
struct  StructTraits<::composebox_query::mojom::SectionConfig::DataView,
                                         ::composebox_query::mojom::SectionConfigPtr> {
  static bool IsNull(const ::composebox_query::mojom::SectionConfigPtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::SectionConfigPtr* output) { output->reset(); }

  static const decltype(::composebox_query::mojom::SectionConfig::header)& header(
      const ::composebox_query::mojom::SectionConfigPtr& input) {
    return input->header;
  }

  static bool Read(::composebox_query::mojom::SectionConfig::DataView input, ::composebox_query::mojom::SectionConfigPtr* output);
};


template <>
struct  StructTraits<::composebox_query::mojom::InputState::DataView,
                                         ::composebox_query::mojom::InputStatePtr> {
  static bool IsNull(const ::composebox_query::mojom::InputStatePtr& input) { return !input; }
  static void SetToNull(::composebox_query::mojom::InputStatePtr* output) { output->reset(); }

  static const decltype(::composebox_query::mojom::InputState::allowed_models)& allowed_models(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->allowed_models;
  }

  static const decltype(::composebox_query::mojom::InputState::allowed_tools)& allowed_tools(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->allowed_tools;
  }

  static const decltype(::composebox_query::mojom::InputState::allowed_input_types)& allowed_input_types(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->allowed_input_types;
  }

  static decltype(::composebox_query::mojom::InputState::active_model) active_model(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->active_model;
  }

  static decltype(::composebox_query::mojom::InputState::active_tool) active_tool(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->active_tool;
  }

  static const decltype(::composebox_query::mojom::InputState::disabled_models)& disabled_models(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->disabled_models;
  }

  static const decltype(::composebox_query::mojom::InputState::disabled_tools)& disabled_tools(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->disabled_tools;
  }

  static const decltype(::composebox_query::mojom::InputState::disabled_input_types)& disabled_input_types(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->disabled_input_types;
  }

  static const decltype(::composebox_query::mojom::InputState::tool_configs)& tool_configs(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->tool_configs;
  }

  static const decltype(::composebox_query::mojom::InputState::model_configs)& model_configs(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->model_configs;
  }

  static const decltype(::composebox_query::mojom::InputState::input_type_configs)& input_type_configs(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->input_type_configs;
  }

  static const decltype(::composebox_query::mojom::InputState::tools_section_config)& tools_section_config(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->tools_section_config;
  }

  static const decltype(::composebox_query::mojom::InputState::model_section_config)& model_section_config(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->model_section_config;
  }

  static const decltype(::composebox_query::mojom::InputState::hint_text)& hint_text(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->hint_text;
  }

  static const decltype(::composebox_query::mojom::InputState::max_inputs_by_type)& max_inputs_by_type(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->max_inputs_by_type;
  }

  static decltype(::composebox_query::mojom::InputState::max_total_inputs) max_total_inputs(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->max_total_inputs;
  }

  static decltype(::composebox_query::mojom::InputState::is_canvas_query_submitted) is_canvas_query_submitted(
      const ::composebox_query::mojom::InputStatePtr& input) {
    return input->is_canvas_query_submitted;
  }

  static bool Read(::composebox_query::mojom::InputState::DataView input, ::composebox_query::mojom::InputStatePtr* output);
};

}  // namespace mojo

#endif  // COMPONENTS_OMNIBOX_COMPOSEBOX_COMPOSEBOX_QUERY_MOJOM_H_