// components/services/storage/public/mojom/storage_service.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 COMPONENTS_SERVICES_STORAGE_PUBLIC_MOJOM_STORAGE_SERVICE_MOJOM_PARAMS_DATA_H_
#define COMPONENTS_SERVICES_STORAGE_PUBLIC_MOJOM_STORAGE_SERVICE_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 storage::mojom {
namespace internal {
class  StorageService_EnableAggressiveDomStorageFlushing_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;

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

  StorageService_EnableAggressiveDomStorageFlushing_Params_Data();
  ~StorageService_EnableAggressiveDomStorageFlushing_Params_Data() = delete;
};
static_assert(sizeof(StorageService_EnableAggressiveDomStorageFlushing_Params_Data) == 8,
              "Bad sizeof(StorageService_EnableAggressiveDomStorageFlushing_Params_Data)");
class  StorageService_BindSessionStorageControl_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> path;
  uint8_t clear_on_open : 1;
  uint8_t pad1_[3];
  mojo::internal::Handle_Data receiver;

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

  StorageService_BindSessionStorageControl_Params_Data();
  ~StorageService_BindSessionStorageControl_Params_Data() = delete;
};
static_assert(sizeof(StorageService_BindSessionStorageControl_Params_Data) == 24,
              "Bad sizeof(StorageService_BindSessionStorageControl_Params_Data)");
class  StorageService_BindLocalStorageControl_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> path;
  mojo::internal::Handle_Data receiver;
  uint8_t padfinal_[4];

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

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

  mojo::internal::StructHeader header_;
  mojo::internal::Handle_Data test_api_receiver;
  uint8_t padfinal_[4];

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

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

}  // namespace internal


class StorageService_EnableAggressiveDomStorageFlushing_ParamsDataView {
 public:
  StorageService_EnableAggressiveDomStorageFlushing_ParamsDataView() = default;

  StorageService_EnableAggressiveDomStorageFlushing_ParamsDataView(
      internal::StorageService_EnableAggressiveDomStorageFlushing_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
 private:
  internal::StorageService_EnableAggressiveDomStorageFlushing_Params_Data* data_ = nullptr;
};


class StorageService_BindSessionStorageControl_ParamsDataView {
 public:
  StorageService_BindSessionStorageControl_ParamsDataView() = default;

  StorageService_BindSessionStorageControl_ParamsDataView(
      internal::StorageService_BindSessionStorageControl_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadPath(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::mojo_base::mojom::FilePathDataView, UserType>(),
    "Attempting to read the optional `path` 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 `MaybeReadPath` instead "
    "of `ReadPath if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->path.Get();
    return mojo::internal::Deserialize<::mojo_base::mojom::FilePathDataView>(
        pointer, output, message_);
  }
  bool clear_on_open() const {
    return data_->clear_on_open;
  }
  template <typename UserType>
  UserType TakeReceiver() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::storage::mojom::SessionStorageControlInterfaceBase>>(
            &data_->receiver, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::StorageService_BindSessionStorageControl_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class StorageService_BindLocalStorageControl_ParamsDataView {
 public:
  StorageService_BindLocalStorageControl_ParamsDataView() = default;

  StorageService_BindLocalStorageControl_ParamsDataView(
      internal::StorageService_BindLocalStorageControl_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadPath(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::mojo_base::mojom::FilePathDataView, UserType>(),
    "Attempting to read the optional `path` 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 `MaybeReadPath` instead "
    "of `ReadPath if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->path.Get();
    return mojo::internal::Deserialize<::mojo_base::mojom::FilePathDataView>(
        pointer, output, message_);
  }
  template <typename UserType>
  UserType TakeReceiver() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::storage::mojom::LocalStorageControlInterfaceBase>>(
            &data_->receiver, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::StorageService_BindLocalStorageControl_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class StorageService_BindTestApi_ParamsDataView {
 public:
  StorageService_BindTestApi_ParamsDataView() = default;

  StorageService_BindTestApi_ParamsDataView(
      internal::StorageService_BindTestApi_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  mojo::ScopedMessagePipeHandle TakeTestApiReceiver() {
    mojo::ScopedMessagePipeHandle result;
    bool ret =
        mojo::internal::Deserialize<mojo::ScopedMessagePipeHandle>(
            &data_->test_api_receiver, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::StorageService_BindTestApi_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};



inline void StorageService_BindSessionStorageControl_ParamsDataView::GetPathDataView(
    ::mojo_base::mojom::FilePathDataView* output) {
  auto pointer = data_->path.Get();
  *output = ::mojo_base::mojom::FilePathDataView(pointer, message_);
}


inline void StorageService_BindLocalStorageControl_ParamsDataView::GetPathDataView(
    ::mojo_base::mojom::FilePathDataView* output) {
  auto pointer = data_->path.Get();
  *output = ::mojo_base::mojom::FilePathDataView(pointer, message_);
}





}  // storage::mojom

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

#endif  // COMPONENTS_SERVICES_STORAGE_PUBLIC_MOJOM_STORAGE_SERVICE_MOJOM_PARAMS_DATA_H_