// services/audio/public/mojom/log_factory_manager.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 SERVICES_AUDIO_PUBLIC_MOJOM_LOG_FACTORY_MANAGER_MOJOM_PARAMS_DATA_H_
#define SERVICES_AUDIO_PUBLIC_MOJOM_LOG_FACTORY_MANAGER_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 audio::mojom {
namespace internal {
class  LogFactoryManager_SetLogFactory_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Interface_Data factory;

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

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

}  // namespace internal


class LogFactoryManager_SetLogFactory_ParamsDataView {
 public:
  LogFactoryManager_SetLogFactory_ParamsDataView() = default;

  LogFactoryManager_SetLogFactory_ParamsDataView(
      internal::LogFactoryManager_SetLogFactory_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  UserType TakeFactory() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::media::mojom::AudioLogFactoryInterfaceBase>>(
            &data_->factory, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::LogFactoryManager_SetLogFactory_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};




}  // audio::mojom

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

#endif  // SERVICES_AUDIO_PUBLIC_MOJOM_LOG_FACTORY_MANAGER_MOJOM_PARAMS_DATA_H_