// third_party/blink/public/mojom/choosers/file_chooser.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_CHOOSERS_FILE_CHOOSER_MOJOM_PARAMS_DATA_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_CHOOSERS_FILE_CHOOSER_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) FileChooser_OpenFileChooser_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<internal::FileChooserParams_Data> params;

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

  FileChooser_OpenFileChooser_Params_Data();
  ~FileChooser_OpenFileChooser_Params_Data() = delete;
};
static_assert(sizeof(FileChooser_OpenFileChooser_Params_Data) == 16,
              "Bad sizeof(FileChooser_OpenFileChooser_Params_Data)");
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) FileChooser_OpenFileChooser_ResponseParams_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<internal::FileChooserResult_Data> result;

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

  FileChooser_OpenFileChooser_ResponseParams_Data();
  ~FileChooser_OpenFileChooser_ResponseParams_Data() = delete;
};
static_assert(sizeof(FileChooser_OpenFileChooser_ResponseParams_Data) == 16,
              "Bad sizeof(FileChooser_OpenFileChooser_ResponseParams_Data)");
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) FileChooser_EnumerateChosenDirectory_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::FilePath_Data> directory_path;

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

  FileChooser_EnumerateChosenDirectory_Params_Data();
  ~FileChooser_EnumerateChosenDirectory_Params_Data() = delete;
};
static_assert(sizeof(FileChooser_EnumerateChosenDirectory_Params_Data) == 16,
              "Bad sizeof(FileChooser_EnumerateChosenDirectory_Params_Data)");
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) FileChooser_EnumerateChosenDirectory_ResponseParams_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<internal::FileChooserResult_Data> result;

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

  FileChooser_EnumerateChosenDirectory_ResponseParams_Data();
  ~FileChooser_EnumerateChosenDirectory_ResponseParams_Data() = delete;
};
static_assert(sizeof(FileChooser_EnumerateChosenDirectory_ResponseParams_Data) == 16,
              "Bad sizeof(FileChooser_EnumerateChosenDirectory_ResponseParams_Data)");

}  // namespace internal


class FileChooser_OpenFileChooser_ParamsDataView {
 public:
  FileChooser_OpenFileChooser_ParamsDataView() = default;

  FileChooser_OpenFileChooser_ParamsDataView(
      internal::FileChooser_OpenFileChooser_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetParamsDataView(
      FileChooserParamsDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadParams(UserType* output) {
    
    auto* pointer = data_->params.Get();
    return mojo::internal::Deserialize<::blink::mojom::FileChooserParamsDataView>(
        pointer, output, message_);
  }
 private:
  internal::FileChooser_OpenFileChooser_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class FileChooser_OpenFileChooser_ResponseParamsDataView {
 public:
  FileChooser_OpenFileChooser_ResponseParamsDataView() = default;

  FileChooser_OpenFileChooser_ResponseParamsDataView(
      internal::FileChooser_OpenFileChooser_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetResultDataView(
      FileChooserResultDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::blink::mojom::FileChooserResultDataView, UserType>(),
    "Attempting to read the optional `result` 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 `MaybeReadResult` instead "
    "of `ReadResult if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->result.Get();
    return mojo::internal::Deserialize<::blink::mojom::FileChooserResultDataView>(
        pointer, output, message_);
  }
 private:
  internal::FileChooser_OpenFileChooser_ResponseParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class FileChooser_EnumerateChosenDirectory_ParamsDataView {
 public:
  FileChooser_EnumerateChosenDirectory_ParamsDataView() = default;

  FileChooser_EnumerateChosenDirectory_ParamsDataView(
      internal::FileChooser_EnumerateChosenDirectory_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadDirectoryPath(UserType* output) {
    
    auto* pointer = data_->directory_path.Get();
    return mojo::internal::Deserialize<::mojo_base::mojom::FilePathDataView>(
        pointer, output, message_);
  }
 private:
  internal::FileChooser_EnumerateChosenDirectory_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class FileChooser_EnumerateChosenDirectory_ResponseParamsDataView {
 public:
  FileChooser_EnumerateChosenDirectory_ResponseParamsDataView() = default;

  FileChooser_EnumerateChosenDirectory_ResponseParamsDataView(
      internal::FileChooser_EnumerateChosenDirectory_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetResultDataView(
      FileChooserResultDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::blink::mojom::FileChooserResultDataView, UserType>(),
    "Attempting to read the optional `result` 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 `MaybeReadResult` instead "
    "of `ReadResult if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->result.Get();
    return mojo::internal::Deserialize<::blink::mojom::FileChooserResultDataView>(
        pointer, output, message_);
  }
 private:
  internal::FileChooser_EnumerateChosenDirectory_ResponseParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};

inline void FileChooser_OpenFileChooser_ParamsDataView::GetParamsDataView(
    FileChooserParamsDataView* output) {
  auto pointer = data_->params.Get();
  *output = FileChooserParamsDataView(pointer, message_);
}


inline void FileChooser_OpenFileChooser_ResponseParamsDataView::GetResultDataView(
    FileChooserResultDataView* output) {
  auto pointer = data_->result.Get();
  *output = FileChooserResultDataView(pointer, message_);
}


inline void FileChooser_EnumerateChosenDirectory_ParamsDataView::GetDirectoryPathDataView(
    ::mojo_base::mojom::FilePathDataView* output) {
  auto pointer = data_->directory_path.Get();
  *output = ::mojo_base::mojom::FilePathDataView(pointer, message_);
}


inline void FileChooser_EnumerateChosenDirectory_ResponseParamsDataView::GetResultDataView(
    FileChooserResultDataView* output) {
  auto pointer = data_->result.Get();
  *output = FileChooserResultDataView(pointer, message_);
}



}  // blink::mojom

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

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_CHOOSERS_FILE_CHOOSER_MOJOM_PARAMS_DATA_H_