// chrome/browser/ui/webui/context_hub/context_hub.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 CHROME_BROWSER_UI_WEBUI_CONTEXT_HUB_CONTEXT_HUB_MOJOM_H_
#define CHROME_BROWSER_UI_WEBUI_CONTEXT_HUB_CONTEXT_HUB_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 "chrome/browser/ui/webui/context_hub/context_hub.mojom-features.h"  // IWYU pragma: export
#include "chrome/browser/ui/webui/context_hub/context_hub.mojom-shared.h"  // IWYU pragma: export
#include "chrome/browser/ui/webui/context_hub/context_hub.mojom-forward.h"  // IWYU pragma: export
#include "mojo/public/mojom/base/time.mojom.h"
#include "mojo/public/mojom/base/uuid.mojom.h"
#include "url/mojom/url.mojom.h"
#include <string>
#include <vector>

#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"


#include "chrome/browser/ui/webui/context_hub/context_hub_mojom_traits.h"




namespace browser::context_hub::mojom {

class PageProxy;

template <typename ImplRefTraits>
class PageStub;

class PageRequestValidator;


class Page
    : public PageInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "browser.context_hub.mojom.Page";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageInterfaceBase;
  using Proxy_ = PageProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageStub<ImplRefTraits>;

  using RequestValidator_ = PageRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kOnAutoTodosChangedMinVersion = 0,
    kOnFirstPartyAutoTodosGenerationStateChangedMinVersion = 0,
    kOnThirdPartyAutoTodosGenerationStateChangedMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct OnAutoTodosChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnFirstPartyAutoTodosGenerationStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnThirdPartyAutoTodosGenerationStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~Page() = default;

  virtual void OnAutoTodosChanged(const std::vector<::context_hub::AutoTodoEntry>& todos) = 0;

  virtual void OnFirstPartyAutoTodosGenerationStateChanged(bool is_generating) = 0;

  virtual void OnThirdPartyAutoTodosGenerationStateChanged(bool is_generating) = 0;
};

class PageHandlerFactoryProxy;

template <typename ImplRefTraits>
class PageHandlerFactoryStub;

class PageHandlerFactoryRequestValidator;


class PageHandlerFactory
    : public PageHandlerFactoryInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "browser.context_hub.mojom.PageHandlerFactory";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageHandlerFactoryInterfaceBase;
  using Proxy_ = PageHandlerFactoryProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageHandlerFactoryStub<ImplRefTraits>;

  using RequestValidator_ = PageHandlerFactoryRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kCreatePageHandlerMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct CreatePageHandler_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~PageHandlerFactory() = default;

  virtual void CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> handler) = 0;
};

class PageHandlerProxy;

template <typename ImplRefTraits>
class PageHandlerStub;

class PageHandlerRequestValidator;
class PageHandlerResponseValidator;


class PageHandler
    : public PageHandlerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "browser.context_hub.mojom.PageHandler";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageHandlerInterfaceBase;
  using Proxy_ = PageHandlerProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageHandlerStub<ImplRefTraits>;

  using RequestValidator_ = PageHandlerRequestValidator;
  using ResponseValidator_ = PageHandlerResponseValidator;
  enum MethodMinVersions : uint32_t {
    kGenerateFirstPartyAutoTodosMinVersion = 0,
    kGetAutoTodosMinVersion = 0,
    kUpdateAutoTodoMinVersion = 0,
    kGenerateTabBasedTodosMinVersion = 0,
    kSetTodoFeedbackMinVersion = 0,
    kDeleteTodoFeedbackMinVersion = 0,
    kClearTodoFeedbacksMinVersion = 0,
    kGetTodoFeedbacksMinVersion = 0,
    kGetSaveToMemoryBankContextMinVersion = 0,
    kGetAllMemoryBankEntriesMinVersion = 0,
    kDeleteMemoryBankEntriesMinVersion = 0,
    kSaveMemoryBankEntryMinVersion = 0,
    kGetAllMemoryBankTagsMinVersion = 0,
    kGetAllMemoryBankCollectionsMinVersion = 0,
    kGetTabsMinVersion = 0,
    kRetrieveAndGroupTabsMinVersion = 0,
    kGetExistingTabGroupsAndChatsMinVersion = 0,
    kSwitchToTabMinVersion = 0,
    kCloseTabMinVersion = 0,
    kClearTabGroupsMinVersion = 0,
    kClearTabGroupChatHistoryMinVersion = 0,
    kAskGeminiWithContextMinVersion = 0,
    kConfirmAllTabGroupsMinVersion = 0,
    kGetConfirmedTabGroupsMinVersion = 0,
    kRemoveConfirmedTabGroupMinVersion = 0,
    kCloseConfirmedTabGroupMinVersion = 0,
    kRemoveAllConfirmedTabGroupsMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct GenerateFirstPartyAutoTodos_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetAutoTodos_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UpdateAutoTodo_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GenerateTabBasedTodos_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetTodoFeedback_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct DeleteTodoFeedback_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ClearTodoFeedbacks_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetTodoFeedbacks_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetSaveToMemoryBankContext_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetAllMemoryBankEntries_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct DeleteMemoryBankEntries_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SaveMemoryBankEntry_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetAllMemoryBankTags_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetAllMemoryBankCollections_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetTabs_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RetrieveAndGroupTabs_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetExistingTabGroupsAndChats_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SwitchToTab_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CloseTab_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ClearTabGroups_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ClearTabGroupChatHistory_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct AskGeminiWithContext_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ConfirmAllTabGroups_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetConfirmedTabGroups_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RemoveConfirmedTabGroup_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CloseConfirmedTabGroup_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RemoveAllConfirmedTabGroups_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~PageHandler() = default;

  using GenerateFirstPartyAutoTodosCallback = base::OnceCallback<void(bool)>;
  using GenerateFirstPartyAutoTodosMojoCallback = base::OnceCallback<void(bool)>;

  virtual void GenerateFirstPartyAutoTodos(GenerateFirstPartyAutoTodosCallback callback) = 0;

  using GetAutoTodosCallback = base::OnceCallback<void(const std::vector<::context_hub::AutoTodoEntry>&, const std::vector<::context_hub::AutoTodoEntry>&, ::base::Time, ::base::Time)>;
  using GetAutoTodosMojoCallback = base::OnceCallback<void(const std::vector<::context_hub::AutoTodoEntry>&, const std::vector<::context_hub::AutoTodoEntry>&, ::base::Time, ::base::Time)>;

  virtual void GetAutoTodos(GetAutoTodosCallback callback) = 0;

  using UpdateAutoTodoCallback = base::OnceCallback<void(bool)>;
  using UpdateAutoTodoMojoCallback = base::OnceCallback<void(bool)>;

  virtual void UpdateAutoTodo(const ::context_hub::AutoTodoEntry& todo, UpdateAutoTodoCallback callback) = 0;

  using GenerateTabBasedTodosCallback = base::OnceCallback<void(bool)>;
  using GenerateTabBasedTodosMojoCallback = base::OnceCallback<void(bool)>;

  virtual void GenerateTabBasedTodos(GenerateTabBasedTodosCallback callback) = 0;

  using SetTodoFeedbackCallback = base::OnceCallback<void()>;
  using SetTodoFeedbackMojoCallback = base::OnceCallback<void()>;

  virtual void SetTodoFeedback(AutoTodoItemFeedbackPtr feedback, SetTodoFeedbackCallback callback) = 0;

  using DeleteTodoFeedbackCallback = base::OnceCallback<void()>;
  using DeleteTodoFeedbackMojoCallback = base::OnceCallback<void()>;

  virtual void DeleteTodoFeedback(const std::string& id, DeleteTodoFeedbackCallback callback) = 0;

  using ClearTodoFeedbacksCallback = base::OnceCallback<void()>;
  using ClearTodoFeedbacksMojoCallback = base::OnceCallback<void()>;

  virtual void ClearTodoFeedbacks(ClearTodoFeedbacksCallback callback) = 0;

  using GetTodoFeedbacksCallback = base::OnceCallback<void(std::vector<AutoTodoItemFeedbackPtr>)>;
  using GetTodoFeedbacksMojoCallback = base::OnceCallback<void(std::vector<AutoTodoItemFeedbackPtr>)>;

  virtual void GetTodoFeedbacks(GetTodoFeedbacksCallback callback) = 0;

  using GetSaveToMemoryBankContextCallback = base::OnceCallback<void(SaveToMemoryBankContextPtr)>;
  using GetSaveToMemoryBankContextMojoCallback = base::OnceCallback<void(SaveToMemoryBankContextPtr)>;

  virtual void GetSaveToMemoryBankContext(GetSaveToMemoryBankContextCallback callback) = 0;

  using GetAllMemoryBankEntriesCallback = base::OnceCallback<void(std::vector<MemoryBankEntryPtr>)>;
  using GetAllMemoryBankEntriesMojoCallback = base::OnceCallback<void(std::vector<MemoryBankEntryPtr>)>;

  virtual void GetAllMemoryBankEntries(GetAllMemoryBankEntriesCallback callback) = 0;

  using DeleteMemoryBankEntriesCallback = base::OnceCallback<void()>;
  using DeleteMemoryBankEntriesMojoCallback = base::OnceCallback<void()>;

  virtual void DeleteMemoryBankEntries(const std::vector<int64_t>& ids, DeleteMemoryBankEntriesCallback callback) = 0;

  using SaveMemoryBankEntryCallback = base::OnceCallback<void(bool)>;
  using SaveMemoryBankEntryMojoCallback = base::OnceCallback<void(bool)>;

  virtual void SaveMemoryBankEntry(MemoryBankEntryAnnotationsPtr annotations, SaveMemoryBankEntryCallback callback) = 0;

  using GetAllMemoryBankTagsCallback = base::OnceCallback<void(const std::vector<std::string>&)>;
  using GetAllMemoryBankTagsMojoCallback = base::OnceCallback<void(const std::vector<std::string>&)>;

  virtual void GetAllMemoryBankTags(GetAllMemoryBankTagsCallback callback) = 0;

  using GetAllMemoryBankCollectionsCallback = base::OnceCallback<void(const std::vector<std::string>&)>;
  using GetAllMemoryBankCollectionsMojoCallback = base::OnceCallback<void(const std::vector<std::string>&)>;

  virtual void GetAllMemoryBankCollections(GetAllMemoryBankCollectionsCallback callback) = 0;

  using GetTabsCallback = base::OnceCallback<void(std::vector<TabInfoPtr>)>;
  using GetTabsMojoCallback = base::OnceCallback<void(std::vector<TabInfoPtr>)>;

  virtual void GetTabs(GetTabsCallback callback) = 0;

  using RetrieveAndGroupTabsCallback = base::OnceCallback<void(std::vector<TabGroupPtr>, std::vector<TabInfoPtr>, ChatMessagePtr)>;
  using RetrieveAndGroupTabsMojoCallback = base::OnceCallback<void(std::vector<TabGroupPtr>, std::vector<TabInfoPtr>, ChatMessagePtr)>;

  virtual void RetrieveAndGroupTabs(const std::string& user_command, RetrieveAndGroupTabsCallback callback) = 0;

  using GetExistingTabGroupsAndChatsCallback = base::OnceCallback<void(std::vector<TabGroupPtr>, std::vector<TabInfoPtr>, std::vector<ChatMessagePtr>)>;
  using GetExistingTabGroupsAndChatsMojoCallback = base::OnceCallback<void(std::vector<TabGroupPtr>, std::vector<TabInfoPtr>, std::vector<ChatMessagePtr>)>;

  virtual void GetExistingTabGroupsAndChats(GetExistingTabGroupsAndChatsCallback callback) = 0;

  virtual void SwitchToTab(int64_t tab_id) = 0;

  virtual void CloseTab(int64_t tab_id) = 0;

  using ClearTabGroupsCallback = base::OnceCallback<void()>;
  using ClearTabGroupsMojoCallback = base::OnceCallback<void()>;

  virtual void ClearTabGroups(ClearTabGroupsCallback callback) = 0;

  using ClearTabGroupChatHistoryCallback = base::OnceCallback<void()>;
  using ClearTabGroupChatHistoryMojoCallback = base::OnceCallback<void()>;

  virtual void ClearTabGroupChatHistory(ClearTabGroupChatHistoryCallback callback) = 0;

  using AskGeminiWithContextCallback = base::OnceCallback<void(ChatMessagePtr)>;
  using AskGeminiWithContextMojoCallback = base::OnceCallback<void(ChatMessagePtr)>;

  virtual void AskGeminiWithContext(const std::string& user_command, const std::vector<int64_t>& memory_bank_entry_ids, AskGeminiWithContextCallback callback) = 0;

  using ConfirmAllTabGroupsCallback = base::OnceCallback<void(bool)>;
  using ConfirmAllTabGroupsMojoCallback = base::OnceCallback<void(bool)>;

  virtual void ConfirmAllTabGroups(ConfirmAllTabGroupsCallback callback) = 0;

  using GetConfirmedTabGroupsCallback = base::OnceCallback<void(std::vector<TabGroupPtr>)>;
  using GetConfirmedTabGroupsMojoCallback = base::OnceCallback<void(std::vector<TabGroupPtr>)>;

  virtual void GetConfirmedTabGroups(GetConfirmedTabGroupsCallback callback) = 0;

  using RemoveConfirmedTabGroupCallback = base::OnceCallback<void()>;
  using RemoveConfirmedTabGroupMojoCallback = base::OnceCallback<void()>;

  virtual void RemoveConfirmedTabGroup(const ::base::Uuid& saved_guid, RemoveConfirmedTabGroupCallback callback) = 0;

  using CloseConfirmedTabGroupCallback = base::OnceCallback<void()>;
  using CloseConfirmedTabGroupMojoCallback = base::OnceCallback<void()>;

  virtual void CloseConfirmedTabGroup(const ::base::Uuid& saved_guid, CloseConfirmedTabGroupCallback callback) = 0;

  using RemoveAllConfirmedTabGroupsCallback = base::OnceCallback<void()>;
  using RemoveAllConfirmedTabGroupsMojoCallback = base::OnceCallback<void()>;

  virtual void RemoveAllConfirmedTabGroups(RemoveAllConfirmedTabGroupsCallback callback) = 0;
};



class  PageProxy
    : public Page {
 public:
  using InterfaceType = Page;

  explicit PageProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void OnAutoTodosChanged(const std::vector<::context_hub::AutoTodoEntry>& todos) final;
  
  void OnFirstPartyAutoTodosGenerationStateChanged(bool is_generating) final;
  
  void OnThirdPartyAutoTodosGenerationStateChanged(bool is_generating) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  PageHandlerFactoryProxy
    : public PageHandlerFactory {
 public:
  using InterfaceType = PageHandlerFactory;

  explicit PageHandlerFactoryProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> handler) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  PageHandlerProxy
    : public PageHandler {
 public:
  using InterfaceType = PageHandler;

  explicit PageHandlerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void GenerateFirstPartyAutoTodos(GenerateFirstPartyAutoTodosCallback callback) final;
  
  void GetAutoTodos(GetAutoTodosCallback callback) final;
  
  void UpdateAutoTodo(const ::context_hub::AutoTodoEntry& todo, UpdateAutoTodoCallback callback) final;
  
  void GenerateTabBasedTodos(GenerateTabBasedTodosCallback callback) final;
  
  void SetTodoFeedback(AutoTodoItemFeedbackPtr feedback, SetTodoFeedbackCallback callback) final;
  
  void DeleteTodoFeedback(const std::string& id, DeleteTodoFeedbackCallback callback) final;
  
  void ClearTodoFeedbacks(ClearTodoFeedbacksCallback callback) final;
  
  void GetTodoFeedbacks(GetTodoFeedbacksCallback callback) final;
  
  void GetSaveToMemoryBankContext(GetSaveToMemoryBankContextCallback callback) final;
  
  void GetAllMemoryBankEntries(GetAllMemoryBankEntriesCallback callback) final;
  
  void DeleteMemoryBankEntries(const std::vector<int64_t>& ids, DeleteMemoryBankEntriesCallback callback) final;
  
  void SaveMemoryBankEntry(MemoryBankEntryAnnotationsPtr annotations, SaveMemoryBankEntryCallback callback) final;
  
  void GetAllMemoryBankTags(GetAllMemoryBankTagsCallback callback) final;
  
  void GetAllMemoryBankCollections(GetAllMemoryBankCollectionsCallback callback) final;
  
  void GetTabs(GetTabsCallback callback) final;
  
  void RetrieveAndGroupTabs(const std::string& user_command, RetrieveAndGroupTabsCallback callback) final;
  
  void GetExistingTabGroupsAndChats(GetExistingTabGroupsAndChatsCallback callback) final;
  
  void SwitchToTab(int64_t tab_id) final;
  
  void CloseTab(int64_t tab_id) final;
  
  void ClearTabGroups(ClearTabGroupsCallback callback) final;
  
  void ClearTabGroupChatHistory(ClearTabGroupChatHistoryCallback callback) final;
  
  void AskGeminiWithContext(const std::string& user_command, const std::vector<int64_t>& memory_bank_entry_ids, AskGeminiWithContextCallback callback) final;
  
  void ConfirmAllTabGroups(ConfirmAllTabGroupsCallback callback) final;
  
  void GetConfirmedTabGroups(GetConfirmedTabGroupsCallback callback) final;
  
  void RemoveConfirmedTabGroup(const ::base::Uuid& saved_guid, RemoveConfirmedTabGroupCallback callback) final;
  
  void CloseConfirmedTabGroup(const ::base::Uuid& saved_guid, CloseConfirmedTabGroupCallback callback) final;
  
  void RemoveAllConfirmedTabGroups(RemoveAllConfirmedTabGroupsCallback callback) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};
class  PageStubDispatch {
 public:
  static bool Accept(Page* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      Page* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<Page>>
class PageStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageStub() = default;
  ~PageStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageHandlerFactoryStubDispatch {
 public:
  static bool Accept(PageHandlerFactory* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      PageHandlerFactory* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<PageHandlerFactory>>
class PageHandlerFactoryStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageHandlerFactoryStub() = default;
  ~PageHandlerFactoryStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerFactoryStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerFactoryStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageHandlerStubDispatch {
 public:
  static bool Accept(PageHandler* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      PageHandler* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<PageHandler>>
class PageHandlerStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageHandlerStub() = default;
  ~PageHandlerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageHandlerFactoryRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageHandlerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageHandlerResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};













class  ChatMessage {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ChatMessage, T>::value>;
  using DataView = ChatMessageDataView;
  using Data_ = internal::ChatMessage_Data;

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

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

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


  ChatMessage();

  ChatMessage(
      ChatRole role,
      const std::string& content);


  ~ChatMessage();

  // 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 = ChatMessagePtr>
  ChatMessagePtr 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, ChatMessage::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, ChatMessage::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<
        ChatMessage::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ChatMessage::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::ChatMessage_UnserializedMessageContext<
            UserType, ChatMessage::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<ChatMessage::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ChatMessage::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::ChatMessage_UnserializedMessageContext<
            UserType, ChatMessage::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ChatMessage::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ChatRole role;
  
  std::string content;

  // 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, ChatMessage::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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







class  AutoTodoItemFeedback {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<AutoTodoItemFeedback, T>::value>;
  using DataView = AutoTodoItemFeedbackDataView;
  using Data_ = internal::AutoTodoItemFeedback_Data;

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

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

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


  AutoTodoItemFeedback();

  AutoTodoItemFeedback(
      const std::string& todo_id,
      bool liked);


  ~AutoTodoItemFeedback();

  // 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 = AutoTodoItemFeedbackPtr>
  AutoTodoItemFeedbackPtr 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, AutoTodoItemFeedback::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, AutoTodoItemFeedback::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<
        AutoTodoItemFeedback::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        AutoTodoItemFeedback::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::AutoTodoItemFeedback_UnserializedMessageContext<
            UserType, AutoTodoItemFeedback::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<AutoTodoItemFeedback::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return AutoTodoItemFeedback::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::AutoTodoItemFeedback_UnserializedMessageContext<
            UserType, AutoTodoItemFeedback::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<AutoTodoItemFeedback::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string todo_id;
  
  bool liked;

  // 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, AutoTodoItemFeedback::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  SourceReference {
 public:
  using DataView = SourceReferenceDataView;
  using Data_ = internal::SourceReference_Data;
  using Tag = Data_::SourceReference_Tag;

  template <typename... Args>
  static SourceReferencePtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |gmail|.
  static SourceReferencePtr NewGmail(
      const ::context_hub::SourceReference& value);
  // Construct an instance holding |photos|.
  static SourceReferencePtr NewPhotos(
      PhotosReferencePtr value);

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

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

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  SourceReference(const SourceReference& other) = delete;
  SourceReference& operator=(const SourceReference& other) = delete;

  // 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 UnionPtrType = SourceReferencePtr>
  SourceReferencePtr 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,
            typename std::enable_if<std::is_same<
                T, SourceReference>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, SourceReference>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_gmail() const { return tag_ == Tag::kGmail; }
  const ::context_hub::SourceReference& get_gmail() const {
    CHECK(tag_ == Tag::kGmail);
    return data_.gmail;
  }
  ::context_hub::SourceReference& get_gmail() {
    CHECK(tag_ == Tag::kGmail);
    return data_.gmail;
  }
  void set_gmail(const ::context_hub::SourceReference& gmail);

  bool is_photos() const { return tag_ == Tag::kPhotos; }
  const PhotosReferencePtr& get_photos() const {
    CHECK(tag_ == Tag::kPhotos);
    return data_.photos;
  }
  PhotosReferencePtr& get_photos() {
    CHECK(tag_ == Tag::kPhotos);
    return data_.photos;
  }
  void set_photos(PhotosReferencePtr photos);

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

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<SourceReference::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kGmail)>,
        const ::context_hub::SourceReference& value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kPhotos)>,
        PhotosReferencePtr value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    ::context_hub::SourceReference gmail;
    PhotosReferencePtr photos;
  };

  SourceReference(
      std::in_place_index_t<static_cast<size_t>(Tag::kGmail)>,
      const ::context_hub::SourceReference& value);
  SourceReference(
      std::in_place_index_t<static_cast<size_t>(Tag::kPhotos)>,
      PhotosReferencePtr value);

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

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};



class  AutoTodoData {
 public:
  using DataView = AutoTodoDataDataView;
  using Data_ = internal::AutoTodoData_Data;
  using Tag = Data_::AutoTodoData_Tag;

  template <typename... Args>
  static AutoTodoDataPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |first_party|.
  static AutoTodoDataPtr NewFirstParty(
      const ::context_hub::FirstPartyData& value);
  // Construct an instance holding |third_party|.
  static AutoTodoDataPtr NewThirdParty(
      const ::context_hub::ThirdPartyData& value);

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

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

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  AutoTodoData(const AutoTodoData& other) = delete;
  AutoTodoData& operator=(const AutoTodoData& other) = delete;

  // 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 UnionPtrType = AutoTodoDataPtr>
  AutoTodoDataPtr 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,
            typename std::enable_if<std::is_same<
                T, AutoTodoData>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, AutoTodoData>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_first_party() const { return tag_ == Tag::kFirstParty; }
  const ::context_hub::FirstPartyData& get_first_party() const {
    CHECK(tag_ == Tag::kFirstParty);
    return data_.first_party;
  }
  ::context_hub::FirstPartyData& get_first_party() {
    CHECK(tag_ == Tag::kFirstParty);
    return data_.first_party;
  }
  void set_first_party(const ::context_hub::FirstPartyData& first_party);

  bool is_third_party() const { return tag_ == Tag::kThirdParty; }
  const ::context_hub::ThirdPartyData& get_third_party() const {
    CHECK(tag_ == Tag::kThirdParty);
    return data_.third_party;
  }
  ::context_hub::ThirdPartyData& get_third_party() {
    CHECK(tag_ == Tag::kThirdParty);
    return data_.third_party;
  }
  void set_third_party(const ::context_hub::ThirdPartyData& third_party);

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

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<AutoTodoData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kFirstParty)>,
        const ::context_hub::FirstPartyData& value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kThirdParty)>,
        const ::context_hub::ThirdPartyData& value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    ::context_hub::FirstPartyData first_party;
    ::context_hub::ThirdPartyData third_party;
  };

  AutoTodoData(
      std::in_place_index_t<static_cast<size_t>(Tag::kFirstParty)>,
      const ::context_hub::FirstPartyData& value);
  AutoTodoData(
      std::in_place_index_t<static_cast<size_t>(Tag::kThirdParty)>,
      const ::context_hub::ThirdPartyData& value);

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

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};





class  GmailReference {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<GmailReference, T>::value>;
  using DataView = GmailReferenceDataView;
  using Data_ = internal::GmailReference_Data;

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

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

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


  GmailReference();

  GmailReference(
      const ::GURL& message_url,
      const std::string& subject);


  ~GmailReference();

  // 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 = GmailReferencePtr>
  GmailReferencePtr 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, GmailReference::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, GmailReference::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<
        GmailReference::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        GmailReference::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::GmailReference_UnserializedMessageContext<
            UserType, GmailReference::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<GmailReference::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return GmailReference::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::GmailReference_UnserializedMessageContext<
            UserType, GmailReference::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<GmailReference::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL message_url;
  
  std::string subject;

  // 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, GmailReference::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  PhotosReference {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<PhotosReference, T>::value>;
  using DataView = PhotosReferenceDataView;
  using Data_ = internal::PhotosReference_Data;

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

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

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


  PhotosReference();

  explicit PhotosReference(
      const ::GURL& photos_url);


  ~PhotosReference();

  // 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 = PhotosReferencePtr>
  PhotosReferencePtr 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, PhotosReference::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, PhotosReference::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<
        PhotosReference::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        PhotosReference::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::PhotosReference_UnserializedMessageContext<
            UserType, PhotosReference::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<PhotosReference::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return PhotosReference::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::PhotosReference_UnserializedMessageContext<
            UserType, PhotosReference::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<PhotosReference::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL photos_url;

  // 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, PhotosReference::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  FirstPartyData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<FirstPartyData, T>::value>;
  using DataView = FirstPartyDataDataView;
  using Data_ = internal::FirstPartyData_Data;

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

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

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


  FirstPartyData();

  FirstPartyData(
      std::vector<::context_hub::SourceReference> source_references,
      const ::GURL& actionable_url);


  ~FirstPartyData();

  // 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 = FirstPartyDataPtr>
  FirstPartyDataPtr 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, FirstPartyData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, FirstPartyData::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<
        FirstPartyData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        FirstPartyData::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::FirstPartyData_UnserializedMessageContext<
            UserType, FirstPartyData::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<FirstPartyData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return FirstPartyData::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::FirstPartyData_UnserializedMessageContext<
            UserType, FirstPartyData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<FirstPartyData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::context_hub::SourceReference> source_references;
  
  ::GURL actionable_url;

  // 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, FirstPartyData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  ThirdPartyData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ThirdPartyData, T>::value>;
  using DataView = ThirdPartyDataDataView;
  using Data_ = internal::ThirdPartyData_Data;

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

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

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


  ThirdPartyData();

  ThirdPartyData(
      int64_t tab_id,
      ::base::Time last_active_timestamp,
      ::context_hub::ThirdPartyData::GroupType group_type);


  ~ThirdPartyData();

  // 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 = ThirdPartyDataPtr>
  ThirdPartyDataPtr 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, ThirdPartyData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, ThirdPartyData::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<
        ThirdPartyData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ThirdPartyData::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::ThirdPartyData_UnserializedMessageContext<
            UserType, ThirdPartyData::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<ThirdPartyData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ThirdPartyData::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::ThirdPartyData_UnserializedMessageContext<
            UserType, ThirdPartyData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ThirdPartyData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  int64_t tab_id;
  
  ::base::Time last_active_timestamp;
  
  ::context_hub::ThirdPartyData::GroupType group_type;

  // 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, ThirdPartyData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  AutoTodoItem {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<AutoTodoItem, T>::value>;
  using DataView = AutoTodoItemDataView;
  using Data_ = internal::AutoTodoItem_Data;

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

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

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


  AutoTodoItem();

  AutoTodoItem(
      const std::string& id,
      const std::string& title,
      const std::string& description,
      ::context_hub::AutoTodoEntry::Status status,
      float score,
      const ::std::variant<::context_hub::FirstPartyData, ::context_hub::ThirdPartyData>& data);


  ~AutoTodoItem();

  // 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 = AutoTodoItemPtr>
  AutoTodoItemPtr 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, AutoTodoItem::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, AutoTodoItem::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<
        AutoTodoItem::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        AutoTodoItem::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::AutoTodoItem_UnserializedMessageContext<
            UserType, AutoTodoItem::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<AutoTodoItem::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return AutoTodoItem::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::AutoTodoItem_UnserializedMessageContext<
            UserType, AutoTodoItem::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<AutoTodoItem::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string id;
  
  std::string title;
  
  std::string description;
  
  ::context_hub::AutoTodoEntry::Status status;
  
  float score;
  
  ::std::variant<::context_hub::FirstPartyData, ::context_hub::ThirdPartyData> data;

  // 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, AutoTodoItem::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  MemoryBankEntry {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<MemoryBankEntry, T>::value>;
  using DataView = MemoryBankEntryDataView;
  using Data_ = internal::MemoryBankEntry_Data;

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

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

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


  MemoryBankEntry();

  MemoryBankEntry(
      int64_t id,
      EntryType type,
      ::base::Time timestamp,
      const ::GURL& url,
      const std::string& tab_title,
      const std::optional<std::string>& selected_text,
      std::vector<std::string> tags,
      const std::optional<std::string>& note,
      const std::optional<std::string>& collection);


  ~MemoryBankEntry();

  // 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 = MemoryBankEntryPtr>
  MemoryBankEntryPtr 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, MemoryBankEntry::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, MemoryBankEntry::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<
        MemoryBankEntry::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        MemoryBankEntry::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::MemoryBankEntry_UnserializedMessageContext<
            UserType, MemoryBankEntry::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<MemoryBankEntry::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return MemoryBankEntry::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::MemoryBankEntry_UnserializedMessageContext<
            UserType, MemoryBankEntry::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<MemoryBankEntry::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  int64_t id;
  
  EntryType type;
  
  ::base::Time timestamp;
  
  ::GURL url;
  
  std::string tab_title;
  
  std::optional<std::string> selected_text;
  
  std::vector<std::string> tags;
  
  std::optional<std::string> note;
  
  std::optional<std::string> collection;

  // 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, MemoryBankEntry::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  TabInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<TabInfo, T>::value>;
  using DataView = TabInfoDataView;
  using Data_ = internal::TabInfo_Data;

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

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

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


  TabInfo();

  TabInfo(
      int64_t id,
      const std::string& title,
      const ::GURL& url);


  ~TabInfo();

  // 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 = TabInfoPtr>
  TabInfoPtr 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, TabInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, TabInfo::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<
        TabInfo::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        TabInfo::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::TabInfo_UnserializedMessageContext<
            UserType, TabInfo::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<TabInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return TabInfo::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::TabInfo_UnserializedMessageContext<
            UserType, TabInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<TabInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  int64_t id;
  
  std::string title;
  
  ::GURL url;

  // 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, TabInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  TabGroup {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<TabGroup, T>::value>;
  using DataView = TabGroupDataView;
  using Data_ = internal::TabGroup_Data;

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

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

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


  TabGroup();

  TabGroup(
      const std::string& label,
      std::vector<TabInfoPtr> tabs,
      const std::optional<::base::Uuid>& saved_guid);

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

  ~TabGroup();

  // 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 = TabGroupPtr>
  TabGroupPtr 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, TabGroup::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, TabGroup::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<
        TabGroup::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        TabGroup::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::TabGroup_UnserializedMessageContext<
            UserType, TabGroup::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<TabGroup::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return TabGroup::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::TabGroup_UnserializedMessageContext<
            UserType, TabGroup::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<TabGroup::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string label;
  
  std::vector<TabInfoPtr> tabs;
  
  std::optional<::base::Uuid> saved_guid;

  // 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, TabGroup::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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






class  SaveToMemoryBankContext {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SaveToMemoryBankContext, T>::value>;
  using DataView = SaveToMemoryBankContextDataView;
  using Data_ = internal::SaveToMemoryBankContext_Data;

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

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

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


  SaveToMemoryBankContext();

  SaveToMemoryBankContext(
      const ::GURL& url,
      const std::string& tab_title,
      const std::optional<std::string>& selected_text,
      bool is_text_selection);


  ~SaveToMemoryBankContext();

  // 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 = SaveToMemoryBankContextPtr>
  SaveToMemoryBankContextPtr 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, SaveToMemoryBankContext::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, SaveToMemoryBankContext::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<
        SaveToMemoryBankContext::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SaveToMemoryBankContext::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::SaveToMemoryBankContext_UnserializedMessageContext<
            UserType, SaveToMemoryBankContext::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<SaveToMemoryBankContext::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SaveToMemoryBankContext::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::SaveToMemoryBankContext_UnserializedMessageContext<
            UserType, SaveToMemoryBankContext::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SaveToMemoryBankContext::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL url;
  
  std::string tab_title;
  
  std::optional<std::string> selected_text;
  
  bool is_text_selection;

  // 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, SaveToMemoryBankContext::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  MemoryBankEntryAnnotations {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<MemoryBankEntryAnnotations, T>::value>;
  using DataView = MemoryBankEntryAnnotationsDataView;
  using Data_ = internal::MemoryBankEntryAnnotations_Data;

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

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

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


  MemoryBankEntryAnnotations();

  MemoryBankEntryAnnotations(
      const std::optional<std::string>& collection,
      const std::optional<std::string>& note,
      std::optional<std::vector<std::string>> tags);


  ~MemoryBankEntryAnnotations();

  // 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 = MemoryBankEntryAnnotationsPtr>
  MemoryBankEntryAnnotationsPtr 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, MemoryBankEntryAnnotations::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

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

  template <typename T, MemoryBankEntryAnnotations::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<
        MemoryBankEntryAnnotations::DataView, std::vector<uint8_t>, send_validation>(input);
  }

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

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        MemoryBankEntryAnnotations::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::MemoryBankEntryAnnotations_UnserializedMessageContext<
            UserType, MemoryBankEntryAnnotations::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<MemoryBankEntryAnnotations::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return MemoryBankEntryAnnotations::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::MemoryBankEntryAnnotations_UnserializedMessageContext<
            UserType, MemoryBankEntryAnnotations::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<MemoryBankEntryAnnotations::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::optional<std::string> collection;
  
  std::optional<std::string> note;
  
  std::optional<std::vector<std::string>> tags;

  // 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, MemoryBankEntryAnnotations::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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


template <typename UnionPtrType>
SourceReferencePtr SourceReference::Clone() const {
  switch (tag_) {
    case Tag::kGmail:
      return NewGmail(
          mojo::Clone(data_.gmail));
    case Tag::kPhotos:
      return NewPhotos(
          mojo::Clone(data_.photos));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, SourceReference>::value>::type*>
bool SourceReference::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kGmail:
      return mojo::Equals(data_.gmail, other.data_.gmail);
    case Tag::kPhotos:
      return mojo::Equals(data_.photos, other.data_.photos);
  }

  return false;
}
template <typename UnionPtrType>
AutoTodoDataPtr AutoTodoData::Clone() const {
  switch (tag_) {
    case Tag::kFirstParty:
      return NewFirstParty(
          mojo::Clone(data_.first_party));
    case Tag::kThirdParty:
      return NewThirdParty(
          mojo::Clone(data_.third_party));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, AutoTodoData>::value>::type*>
bool AutoTodoData::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kFirstParty:
      return mojo::Equals(data_.first_party, other.data_.first_party);
    case Tag::kThirdParty:
      return mojo::Equals(data_.third_party, other.data_.third_party);
  }

  return false;
}
template <typename StructPtrType>
GmailReferencePtr GmailReference::Clone() const {
  return New(
      mojo::Clone(message_url),
      mojo::Clone(subject)
  );
}

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

template <typename T, GmailReference::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.message_url < rhs.message_url)
    return true;
  if (rhs.message_url < lhs.message_url)
    return false;
  if (lhs.subject < rhs.subject)
    return true;
  if (rhs.subject < lhs.subject)
    return false;
  return false;
}
template <typename StructPtrType>
PhotosReferencePtr PhotosReference::Clone() const {
  return New(
      mojo::Clone(photos_url)
  );
}

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

template <typename T, PhotosReference::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.photos_url < rhs.photos_url)
    return true;
  if (rhs.photos_url < lhs.photos_url)
    return false;
  return false;
}
template <typename StructPtrType>
FirstPartyDataPtr FirstPartyData::Clone() const {
  return New(
      mojo::Clone(source_references),
      mojo::Clone(actionable_url)
  );
}

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

template <typename T, FirstPartyData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.source_references < rhs.source_references)
    return true;
  if (rhs.source_references < lhs.source_references)
    return false;
  if (lhs.actionable_url < rhs.actionable_url)
    return true;
  if (rhs.actionable_url < lhs.actionable_url)
    return false;
  return false;
}
template <typename StructPtrType>
ThirdPartyDataPtr ThirdPartyData::Clone() const {
  return New(
      mojo::Clone(tab_id),
      mojo::Clone(last_active_timestamp),
      mojo::Clone(group_type)
  );
}

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

template <typename T, ThirdPartyData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.tab_id < rhs.tab_id)
    return true;
  if (rhs.tab_id < lhs.tab_id)
    return false;
  if (lhs.last_active_timestamp < rhs.last_active_timestamp)
    return true;
  if (rhs.last_active_timestamp < lhs.last_active_timestamp)
    return false;
  if (lhs.group_type < rhs.group_type)
    return true;
  if (rhs.group_type < lhs.group_type)
    return false;
  return false;
}
template <typename StructPtrType>
AutoTodoItemPtr AutoTodoItem::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(title),
      mojo::Clone(description),
      mojo::Clone(status),
      mojo::Clone(score),
      mojo::Clone(data)
  );
}

template <typename T, AutoTodoItem::EnableIfSame<T>*>
bool AutoTodoItem::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id, other_struct.id))
    return false;
  if (!mojo::Equals(this->title, other_struct.title))
    return false;
  if (!mojo::Equals(this->description, other_struct.description))
    return false;
  if (!mojo::Equals(this->status, other_struct.status))
    return false;
  if (!mojo::Equals(this->score, other_struct.score))
    return false;
  if (!mojo::Equals(this->data, other_struct.data))
    return false;
  return true;
}

template <typename T, AutoTodoItem::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  if (lhs.description < rhs.description)
    return true;
  if (rhs.description < lhs.description)
    return false;
  if (lhs.status < rhs.status)
    return true;
  if (rhs.status < lhs.status)
    return false;
  if (lhs.score < rhs.score)
    return true;
  if (rhs.score < lhs.score)
    return false;
  if (lhs.data < rhs.data)
    return true;
  if (rhs.data < lhs.data)
    return false;
  return false;
}
template <typename StructPtrType>
MemoryBankEntryPtr MemoryBankEntry::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(type),
      mojo::Clone(timestamp),
      mojo::Clone(url),
      mojo::Clone(tab_title),
      mojo::Clone(selected_text),
      mojo::Clone(tags),
      mojo::Clone(note),
      mojo::Clone(collection)
  );
}

template <typename T, MemoryBankEntry::EnableIfSame<T>*>
bool MemoryBankEntry::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id, other_struct.id))
    return false;
  if (!mojo::Equals(this->type, other_struct.type))
    return false;
  if (!mojo::Equals(this->timestamp, other_struct.timestamp))
    return false;
  if (!mojo::Equals(this->url, other_struct.url))
    return false;
  if (!mojo::Equals(this->tab_title, other_struct.tab_title))
    return false;
  if (!mojo::Equals(this->selected_text, other_struct.selected_text))
    return false;
  if (!mojo::Equals(this->tags, other_struct.tags))
    return false;
  if (!mojo::Equals(this->note, other_struct.note))
    return false;
  if (!mojo::Equals(this->collection, other_struct.collection))
    return false;
  return true;
}

template <typename T, MemoryBankEntry::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.type < rhs.type)
    return true;
  if (rhs.type < lhs.type)
    return false;
  if (lhs.timestamp < rhs.timestamp)
    return true;
  if (rhs.timestamp < lhs.timestamp)
    return false;
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  if (lhs.tab_title < rhs.tab_title)
    return true;
  if (rhs.tab_title < lhs.tab_title)
    return false;
  if (lhs.selected_text < rhs.selected_text)
    return true;
  if (rhs.selected_text < lhs.selected_text)
    return false;
  if (lhs.tags < rhs.tags)
    return true;
  if (rhs.tags < lhs.tags)
    return false;
  if (lhs.note < rhs.note)
    return true;
  if (rhs.note < lhs.note)
    return false;
  if (lhs.collection < rhs.collection)
    return true;
  if (rhs.collection < lhs.collection)
    return false;
  return false;
}
template <typename StructPtrType>
TabInfoPtr TabInfo::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(title),
      mojo::Clone(url)
  );
}

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

template <typename T, TabInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  return false;
}
template <typename StructPtrType>
TabGroupPtr TabGroup::Clone() const {
  return New(
      mojo::Clone(label),
      mojo::Clone(tabs),
      mojo::Clone(saved_guid)
  );
}

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

template <typename T, TabGroup::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.label < rhs.label)
    return true;
  if (rhs.label < lhs.label)
    return false;
  if (lhs.tabs < rhs.tabs)
    return true;
  if (rhs.tabs < lhs.tabs)
    return false;
  if (lhs.saved_guid < rhs.saved_guid)
    return true;
  if (rhs.saved_guid < lhs.saved_guid)
    return false;
  return false;
}
template <typename StructPtrType>
ChatMessagePtr ChatMessage::Clone() const {
  return New(
      mojo::Clone(role),
      mojo::Clone(content)
  );
}

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

template <typename T, ChatMessage::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.role < rhs.role)
    return true;
  if (rhs.role < lhs.role)
    return false;
  if (lhs.content < rhs.content)
    return true;
  if (rhs.content < lhs.content)
    return false;
  return false;
}
template <typename StructPtrType>
SaveToMemoryBankContextPtr SaveToMemoryBankContext::Clone() const {
  return New(
      mojo::Clone(url),
      mojo::Clone(tab_title),
      mojo::Clone(selected_text),
      mojo::Clone(is_text_selection)
  );
}

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

template <typename T, SaveToMemoryBankContext::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  if (lhs.tab_title < rhs.tab_title)
    return true;
  if (rhs.tab_title < lhs.tab_title)
    return false;
  if (lhs.selected_text < rhs.selected_text)
    return true;
  if (rhs.selected_text < lhs.selected_text)
    return false;
  if (lhs.is_text_selection < rhs.is_text_selection)
    return true;
  if (rhs.is_text_selection < lhs.is_text_selection)
    return false;
  return false;
}
template <typename StructPtrType>
MemoryBankEntryAnnotationsPtr MemoryBankEntryAnnotations::Clone() const {
  return New(
      mojo::Clone(collection),
      mojo::Clone(note),
      mojo::Clone(tags)
  );
}

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

template <typename T, MemoryBankEntryAnnotations::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.collection < rhs.collection)
    return true;
  if (rhs.collection < lhs.collection)
    return false;
  if (lhs.note < rhs.note)
    return true;
  if (rhs.note < lhs.note)
    return false;
  if (lhs.tags < rhs.tags)
    return true;
  if (rhs.tags < lhs.tags)
    return false;
  return false;
}
template <typename StructPtrType>
AutoTodoItemFeedbackPtr AutoTodoItemFeedback::Clone() const {
  return New(
      mojo::Clone(todo_id),
      mojo::Clone(liked)
  );
}

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

template <typename T, AutoTodoItemFeedback::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.todo_id < rhs.todo_id)
    return true;
  if (rhs.todo_id < lhs.todo_id)
    return false;
  if (lhs.liked < rhs.liked)
    return true;
  if (rhs.liked < lhs.liked)
    return false;
  return false;
}


}  // browser::context_hub::mojom

namespace mojo {


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

  static const decltype(::browser::context_hub::mojom::GmailReference::message_url)& message_url(
      const ::browser::context_hub::mojom::GmailReferencePtr& input) {
    return input->message_url;
  }

  static const decltype(::browser::context_hub::mojom::GmailReference::subject)& subject(
      const ::browser::context_hub::mojom::GmailReferencePtr& input) {
    return input->subject;
  }

  static bool Read(::browser::context_hub::mojom::GmailReference::DataView input, ::browser::context_hub::mojom::GmailReferencePtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::PhotosReference::photos_url)& photos_url(
      const ::browser::context_hub::mojom::PhotosReferencePtr& input) {
    return input->photos_url;
  }

  static bool Read(::browser::context_hub::mojom::PhotosReference::DataView input, ::browser::context_hub::mojom::PhotosReferencePtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::FirstPartyData::source_references)& source_references(
      const ::browser::context_hub::mojom::FirstPartyDataPtr& input) {
    return input->source_references;
  }

  static const decltype(::browser::context_hub::mojom::FirstPartyData::actionable_url)& actionable_url(
      const ::browser::context_hub::mojom::FirstPartyDataPtr& input) {
    return input->actionable_url;
  }

  static bool Read(::browser::context_hub::mojom::FirstPartyData::DataView input, ::browser::context_hub::mojom::FirstPartyDataPtr* output);
};


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

  static decltype(::browser::context_hub::mojom::ThirdPartyData::tab_id) tab_id(
      const ::browser::context_hub::mojom::ThirdPartyDataPtr& input) {
    return input->tab_id;
  }

  static const decltype(::browser::context_hub::mojom::ThirdPartyData::last_active_timestamp)& last_active_timestamp(
      const ::browser::context_hub::mojom::ThirdPartyDataPtr& input) {
    return input->last_active_timestamp;
  }

  static decltype(::browser::context_hub::mojom::ThirdPartyData::group_type) group_type(
      const ::browser::context_hub::mojom::ThirdPartyDataPtr& input) {
    return input->group_type;
  }

  static bool Read(::browser::context_hub::mojom::ThirdPartyData::DataView input, ::browser::context_hub::mojom::ThirdPartyDataPtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::AutoTodoItem::id)& id(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->id;
  }

  static const decltype(::browser::context_hub::mojom::AutoTodoItem::title)& title(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->title;
  }

  static const decltype(::browser::context_hub::mojom::AutoTodoItem::description)& description(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->description;
  }

  static decltype(::browser::context_hub::mojom::AutoTodoItem::status) status(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->status;
  }

  static decltype(::browser::context_hub::mojom::AutoTodoItem::score) score(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->score;
  }

  static const decltype(::browser::context_hub::mojom::AutoTodoItem::data)& data(
      const ::browser::context_hub::mojom::AutoTodoItemPtr& input) {
    return input->data;
  }

  static bool Read(::browser::context_hub::mojom::AutoTodoItem::DataView input, ::browser::context_hub::mojom::AutoTodoItemPtr* output);
};


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

  static decltype(::browser::context_hub::mojom::MemoryBankEntry::id) id(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->id;
  }

  static decltype(::browser::context_hub::mojom::MemoryBankEntry::type) type(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->type;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::timestamp)& timestamp(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->timestamp;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::url)& url(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->url;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::tab_title)& tab_title(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->tab_title;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::selected_text)& selected_text(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->selected_text;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::tags)& tags(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->tags;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::note)& note(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->note;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntry::collection)& collection(
      const ::browser::context_hub::mojom::MemoryBankEntryPtr& input) {
    return input->collection;
  }

  static bool Read(::browser::context_hub::mojom::MemoryBankEntry::DataView input, ::browser::context_hub::mojom::MemoryBankEntryPtr* output);
};


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

  static decltype(::browser::context_hub::mojom::TabInfo::id) id(
      const ::browser::context_hub::mojom::TabInfoPtr& input) {
    return input->id;
  }

  static const decltype(::browser::context_hub::mojom::TabInfo::title)& title(
      const ::browser::context_hub::mojom::TabInfoPtr& input) {
    return input->title;
  }

  static const decltype(::browser::context_hub::mojom::TabInfo::url)& url(
      const ::browser::context_hub::mojom::TabInfoPtr& input) {
    return input->url;
  }

  static bool Read(::browser::context_hub::mojom::TabInfo::DataView input, ::browser::context_hub::mojom::TabInfoPtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::TabGroup::label)& label(
      const ::browser::context_hub::mojom::TabGroupPtr& input) {
    return input->label;
  }

  static const decltype(::browser::context_hub::mojom::TabGroup::tabs)& tabs(
      const ::browser::context_hub::mojom::TabGroupPtr& input) {
    return input->tabs;
  }

  static const decltype(::browser::context_hub::mojom::TabGroup::saved_guid)& saved_guid(
      const ::browser::context_hub::mojom::TabGroupPtr& input) {
    return input->saved_guid;
  }

  static bool Read(::browser::context_hub::mojom::TabGroup::DataView input, ::browser::context_hub::mojom::TabGroupPtr* output);
};


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

  static decltype(::browser::context_hub::mojom::ChatMessage::role) role(
      const ::browser::context_hub::mojom::ChatMessagePtr& input) {
    return input->role;
  }

  static const decltype(::browser::context_hub::mojom::ChatMessage::content)& content(
      const ::browser::context_hub::mojom::ChatMessagePtr& input) {
    return input->content;
  }

  static bool Read(::browser::context_hub::mojom::ChatMessage::DataView input, ::browser::context_hub::mojom::ChatMessagePtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::SaveToMemoryBankContext::url)& url(
      const ::browser::context_hub::mojom::SaveToMemoryBankContextPtr& input) {
    return input->url;
  }

  static const decltype(::browser::context_hub::mojom::SaveToMemoryBankContext::tab_title)& tab_title(
      const ::browser::context_hub::mojom::SaveToMemoryBankContextPtr& input) {
    return input->tab_title;
  }

  static const decltype(::browser::context_hub::mojom::SaveToMemoryBankContext::selected_text)& selected_text(
      const ::browser::context_hub::mojom::SaveToMemoryBankContextPtr& input) {
    return input->selected_text;
  }

  static decltype(::browser::context_hub::mojom::SaveToMemoryBankContext::is_text_selection) is_text_selection(
      const ::browser::context_hub::mojom::SaveToMemoryBankContextPtr& input) {
    return input->is_text_selection;
  }

  static bool Read(::browser::context_hub::mojom::SaveToMemoryBankContext::DataView input, ::browser::context_hub::mojom::SaveToMemoryBankContextPtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::MemoryBankEntryAnnotations::collection)& collection(
      const ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr& input) {
    return input->collection;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntryAnnotations::note)& note(
      const ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr& input) {
    return input->note;
  }

  static const decltype(::browser::context_hub::mojom::MemoryBankEntryAnnotations::tags)& tags(
      const ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr& input) {
    return input->tags;
  }

  static bool Read(::browser::context_hub::mojom::MemoryBankEntryAnnotations::DataView input, ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr* output);
};


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

  static const decltype(::browser::context_hub::mojom::AutoTodoItemFeedback::todo_id)& todo_id(
      const ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr& input) {
    return input->todo_id;
  }

  static decltype(::browser::context_hub::mojom::AutoTodoItemFeedback::liked) liked(
      const ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr& input) {
    return input->liked;
  }

  static bool Read(::browser::context_hub::mojom::AutoTodoItemFeedback::DataView input, ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr* output);
};


template <>
struct  UnionTraits<::browser::context_hub::mojom::SourceReference::DataView,
                                        ::browser::context_hub::mojom::SourceReferencePtr> {
  static bool IsNull(const ::browser::context_hub::mojom::SourceReferencePtr& input) { return !input; }
  static void SetToNull(::browser::context_hub::mojom::SourceReferencePtr* output) { output->reset(); }

  static ::browser::context_hub::mojom::SourceReference::Tag GetTag(const ::browser::context_hub::mojom::SourceReferencePtr& input) {
    return input->which();
  }

  static const ::context_hub::SourceReference& gmail(const ::browser::context_hub::mojom::SourceReferencePtr& input) {
    return input->get_gmail();
  }

  static const ::browser::context_hub::mojom::PhotosReferencePtr& photos(const ::browser::context_hub::mojom::SourceReferencePtr& input) {
    return input->get_photos();
  }

  static bool Read(::browser::context_hub::mojom::SourceReference::DataView input, ::browser::context_hub::mojom::SourceReferencePtr* output);
};


template <>
struct  UnionTraits<::browser::context_hub::mojom::AutoTodoData::DataView,
                                        ::browser::context_hub::mojom::AutoTodoDataPtr> {
  static bool IsNull(const ::browser::context_hub::mojom::AutoTodoDataPtr& input) { return !input; }
  static void SetToNull(::browser::context_hub::mojom::AutoTodoDataPtr* output) { output->reset(); }

  static ::browser::context_hub::mojom::AutoTodoData::Tag GetTag(const ::browser::context_hub::mojom::AutoTodoDataPtr& input) {
    return input->which();
  }

  static const ::context_hub::FirstPartyData& first_party(const ::browser::context_hub::mojom::AutoTodoDataPtr& input) {
    return input->get_first_party();
  }

  static const ::context_hub::ThirdPartyData& third_party(const ::browser::context_hub::mojom::AutoTodoDataPtr& input) {
    return input->get_third_party();
  }

  static bool Read(::browser::context_hub::mojom::AutoTodoData::DataView input, ::browser::context_hub::mojom::AutoTodoDataPtr* output);
};

}  // namespace mojo

#endif  // CHROME_BROWSER_UI_WEBUI_CONTEXT_HUB_CONTEXT_HUB_MOJOM_H_