// third_party/blink/public/mojom/hyphenation/hyphenation.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_HYPHENATION_HYPHENATION_MOJOM_PARAMS_DATA_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_HYPHENATION_HYPHENATION_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) Hyphenation_OpenDictionary_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<mojo::internal::String_Data> locale;

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

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

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<::mojo_base::mojom::internal::ReadOnlyFile_Data> hyphenation_dictionary_handle;

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

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

}  // namespace internal


class Hyphenation_OpenDictionary_ParamsDataView {
 public:
  Hyphenation_OpenDictionary_ParamsDataView() = default;

  Hyphenation_OpenDictionary_ParamsDataView(
      internal::Hyphenation_OpenDictionary_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetLocaleDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadLocale(UserType* output) {
    
    auto* pointer = data_->locale.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
 private:
  internal::Hyphenation_OpenDictionary_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class Hyphenation_OpenDictionary_ResponseParamsDataView {
 public:
  Hyphenation_OpenDictionary_ResponseParamsDataView() = default;

  Hyphenation_OpenDictionary_ResponseParamsDataView(
      internal::Hyphenation_OpenDictionary_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

inline void Hyphenation_OpenDictionary_ParamsDataView::GetLocaleDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->locale.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void Hyphenation_OpenDictionary_ResponseParamsDataView::GetHyphenationDictionaryHandleDataView(
    ::mojo_base::mojom::ReadOnlyFileDataView* output) {
  auto pointer = data_->hyphenation_dictionary_handle.Get();
  *output = ::mojo_base::mojom::ReadOnlyFileDataView(pointer, message_);
}



}  // blink::mojom

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

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_HYPHENATION_HYPHENATION_MOJOM_PARAMS_DATA_H_