// third_party/blink/public/mojom/ai/ai_semantic_embedder.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_AI_AI_SEMANTIC_EMBEDDER_MOJOM_PARAMS_DATA_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_AI_AI_SEMANTIC_EMBEDDER_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) AISemanticEmbedder_Embed_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<mojo::internal::String_Data>>> inputs;
  mojo::internal::Pointer<internal::AISemanticEmbedderEmbedOptions_Data> options;

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

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

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

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

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

}  // namespace internal


class AISemanticEmbedder_Embed_ParamsDataView {
 public:
  AISemanticEmbedder_Embed_ParamsDataView() = default;

  AISemanticEmbedder_Embed_ParamsDataView(
      internal::AISemanticEmbedder_Embed_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetInputsDataView(
      mojo::ArrayDataView<mojo::StringDataView>* output);

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

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


class AISemanticEmbedder_Embed_ResponseParamsDataView {
 public:
  AISemanticEmbedder_Embed_ResponseParamsDataView() = default;

  AISemanticEmbedder_Embed_ResponseParamsDataView(
      internal::AISemanticEmbedder_Embed_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::blink::mojom::SemanticEmbedderResultDataView, 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::SemanticEmbedderResultDataView>(
        pointer, output, message_);
  }
 private:
  internal::AISemanticEmbedder_Embed_ResponseParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};

inline void AISemanticEmbedder_Embed_ParamsDataView::GetInputsDataView(
    mojo::ArrayDataView<mojo::StringDataView>* output) {
  auto pointer = data_->inputs.Get();
  *output = mojo::ArrayDataView<mojo::StringDataView>(pointer, message_);
}
inline void AISemanticEmbedder_Embed_ParamsDataView::GetOptionsDataView(
    AISemanticEmbedderEmbedOptionsDataView* output) {
  auto pointer = data_->options.Get();
  *output = AISemanticEmbedderEmbedOptionsDataView(pointer, message_);
}


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



}  // blink::mojom

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

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_AI_AI_SEMANTIC_EMBEDDER_MOJOM_PARAMS_DATA_H_