// chrome/browser/ui/webui/omnibox/logging/logs.mojom-params-data.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2019 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_OMNIBOX_LOGGING_LOGS_MOJOM_PARAMS_DATA_H_
#define CHROME_BROWSER_UI_WEBUI_OMNIBOX_LOGGING_LOGS_MOJOM_PARAMS_DATA_H_
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif

namespace mojo::internal {
class ValidationContext;
}


namespace omnibox::logging::mojom {
namespace internal {
class  PageHandlerFactory_CreatePageHandler_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Interface_Data page;
  mojo::internal::Handle_Data handler;
  uint8_t padfinal_[4];

 private:
  friend class mojo::internal::MessageFragment<PageHandlerFactory_CreatePageHandler_Params_Data>;

  PageHandlerFactory_CreatePageHandler_Params_Data();
  ~PageHandlerFactory_CreatePageHandler_Params_Data() = delete;
};
static_assert(sizeof(PageHandlerFactory_CreatePageHandler_Params_Data) == 24,
              "Bad sizeof(PageHandlerFactory_CreatePageHandler_Params_Data)");
class  Page_OnLogMessageAdded_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<::mojo_base::mojom::internal::Time_Data> event_time;
  mojo::internal::Pointer<mojo::internal::String_Data> tag;
  mojo::internal::Pointer<mojo::internal::String_Data> source_file;
  uint32_t source_line;
  uint8_t pad3_[4];
  mojo::internal::Pointer<mojo::internal::String_Data> message;
  mojo::internal::Pointer<mojo::internal::String_Data> proto_type;
  mojo::internal::Pointer<mojo::internal::String_Data> proto_base64;

 private:
  friend class mojo::internal::MessageFragment<Page_OnLogMessageAdded_Params_Data>;

  Page_OnLogMessageAdded_Params_Data();
  ~Page_OnLogMessageAdded_Params_Data() = delete;
};
static_assert(sizeof(Page_OnLogMessageAdded_Params_Data) == 64,
              "Bad sizeof(Page_OnLogMessageAdded_Params_Data)");

}  // namespace internal


class PageHandlerFactory_CreatePageHandler_ParamsDataView {
 public:
  PageHandlerFactory_CreatePageHandler_ParamsDataView() = default;

  PageHandlerFactory_CreatePageHandler_ParamsDataView(
      internal::PageHandlerFactory_CreatePageHandler_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  UserType TakePage() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::omnibox::logging::mojom::PageInterfaceBase>>(
            &data_->page, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeHandler() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::omnibox::logging::mojom::PageHandlerInterfaceBase>>(
            &data_->handler, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::PageHandlerFactory_CreatePageHandler_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class Page_OnLogMessageAdded_ParamsDataView {
 public:
  Page_OnLogMessageAdded_ParamsDataView() = default;

  Page_OnLogMessageAdded_ParamsDataView(
      internal::Page_OnLogMessageAdded_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetEventTimeDataView(
      ::mojo_base::mojom::TimeDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadEventTime(UserType* output) {
    
    auto* pointer = data_->event_time.Get();
    return mojo::internal::Deserialize<::mojo_base::mojom::TimeDataView>(
        pointer, output, message_);
  }
  inline void GetTagDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTag(UserType* output) {
    
    auto* pointer = data_->tag.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetSourceFileDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadSourceFile(UserType* output) {
    
    auto* pointer = data_->source_file.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  uint32_t source_line() const {
    return data_->source_line;
  }
  inline void GetMessageDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadMessage(UserType* output) {
    
    auto* pointer = data_->message.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetProtoTypeDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadProtoType(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `proto_type` field into a type which "
    "cannot represent a null value. Either wrap the destination object "
    "with std::optional, ensure that any corresponding "
    "{Struct/Union/Array/String}Traits define the necessary IsNull and "
    "SetToNull methods, or use `MaybeReadProtoType` instead "
    "of `ReadProtoType if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->proto_type.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetProtoBase64DataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadProtoBase64(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `proto_base64` field into a type which "
    "cannot represent a null value. Either wrap the destination object "
    "with std::optional, ensure that any corresponding "
    "{Struct/Union/Array/String}Traits define the necessary IsNull and "
    "SetToNull methods, or use `MaybeReadProtoBase64` instead "
    "of `ReadProtoBase64 if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->proto_base64.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
 private:
  internal::Page_OnLogMessageAdded_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};



inline void Page_OnLogMessageAdded_ParamsDataView::GetEventTimeDataView(
    ::mojo_base::mojom::TimeDataView* output) {
  auto pointer = data_->event_time.Get();
  *output = ::mojo_base::mojom::TimeDataView(pointer, message_);
}
inline void Page_OnLogMessageAdded_ParamsDataView::GetTagDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->tag.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Page_OnLogMessageAdded_ParamsDataView::GetSourceFileDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->source_file.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Page_OnLogMessageAdded_ParamsDataView::GetMessageDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->message.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Page_OnLogMessageAdded_ParamsDataView::GetProtoTypeDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->proto_type.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Page_OnLogMessageAdded_ParamsDataView::GetProtoBase64DataView(
    mojo::StringDataView* output) {
  auto pointer = data_->proto_base64.Get();
  *output = mojo::StringDataView(pointer, message_);
}



}  // omnibox::logging::mojom

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

#endif  // CHROME_BROWSER_UI_WEBUI_OMNIBOX_LOGGING_LOGS_MOJOM_PARAMS_DATA_H_