// third_party/blink/public/mojom/web_launch/web_launch.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 THIRD_PARTY_BLINK_PUBLIC_MOJOM_WEB_LAUNCH_WEB_LAUNCH_MOJOM_PARAMS_DATA_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_WEB_LAUNCH_WEB_LAUNCH_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 blink::mojom {
namespace internal {
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) WebLaunchService_EnqueueLaunchParams_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<::url::mojom::internal::Url_Data> launch_url;
  mojo::internal::Pointer<::mojo_base::mojom::internal::TimeTicks_Data> time_navigation_started_in_browser;
  uint8_t navigation_started : 1;
  uint8_t pad2_[7];
  mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<::blink::mojom::internal::FileSystemAccessEntry_Data>>> files;

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

  WebLaunchService_EnqueueLaunchParams_Params_Data();
  ~WebLaunchService_EnqueueLaunchParams_Params_Data() = delete;
};
static_assert(sizeof(WebLaunchService_EnqueueLaunchParams_Params_Data) == 40,
              "Bad sizeof(WebLaunchService_EnqueueLaunchParams_Params_Data)");

}  // namespace internal


class WebLaunchService_EnqueueLaunchParams_ParamsDataView {
 public:
  WebLaunchService_EnqueueLaunchParams_ParamsDataView() = default;

  WebLaunchService_EnqueueLaunchParams_ParamsDataView(
      internal::WebLaunchService_EnqueueLaunchParams_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetLaunchUrlDataView(
      ::url::mojom::UrlDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadLaunchUrl(UserType* output) {
    
    auto* pointer = data_->launch_url.Get();
    return mojo::internal::Deserialize<::url::mojom::UrlDataView>(
        pointer, output, message_);
  }
  inline void GetTimeNavigationStartedInBrowserDataView(
      ::mojo_base::mojom::TimeTicksDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTimeNavigationStartedInBrowser(UserType* output) {
    
    auto* pointer = data_->time_navigation_started_in_browser.Get();
    return mojo::internal::Deserialize<::mojo_base::mojom::TimeTicksDataView>(
        pointer, output, message_);
  }
  bool navigation_started() const {
    return data_->navigation_started;
  }
  inline void GetFilesDataView(
      mojo::ArrayDataView<::blink::mojom::FileSystemAccessEntryDataView>* output);

  template <typename UserType>
  [[nodiscard]] bool ReadFiles(UserType* output) {
    
    auto* pointer = data_->files.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<::blink::mojom::FileSystemAccessEntryDataView>>(
        pointer, output, message_);
  }
 private:
  internal::WebLaunchService_EnqueueLaunchParams_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};

inline void WebLaunchService_EnqueueLaunchParams_ParamsDataView::GetLaunchUrlDataView(
    ::url::mojom::UrlDataView* output) {
  auto pointer = data_->launch_url.Get();
  *output = ::url::mojom::UrlDataView(pointer, message_);
}
inline void WebLaunchService_EnqueueLaunchParams_ParamsDataView::GetTimeNavigationStartedInBrowserDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->time_navigation_started_in_browser.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}
inline void WebLaunchService_EnqueueLaunchParams_ParamsDataView::GetFilesDataView(
    mojo::ArrayDataView<::blink::mojom::FileSystemAccessEntryDataView>* output) {
  auto pointer = data_->files.Get();
  *output = mojo::ArrayDataView<::blink::mojom::FileSystemAccessEntryDataView>(pointer, message_);
}



}  // blink::mojom

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

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_WEB_LAUNCH_WEB_LAUNCH_MOJOM_PARAMS_DATA_H_