// components/mirroring/mojom/mirroring_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_MIRRORING_MOJOM_MIRRORING_SERVICE_MOJOM_PARAMS_DATA_H_
#define COMPONENTS_MIRRORING_MOJOM_MIRRORING_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 mirroring::mojom {
namespace internal {
class  MirroringService_Start_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<::mirroring::mojom::internal::SessionParameters_Data> params;
  mojo::internal::Pointer<::gfx::mojom::internal::Size_Data> max_resolution;
  mojo::internal::Interface_Data observer;
  mojo::internal::Interface_Data resource_provider;
  mojo::internal::Interface_Data outbound_channel;
  mojo::internal::Handle_Data inbound_channel;
  uint8_t padfinal_[4];

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

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

  mojo::internal::StructHeader header_;

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

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

  mojo::internal::StructHeader header_;

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

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

  mojo::internal::StructHeader header_;
  ::mojo_base::mojom::internal::Value_Data json_stats;

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

  MirroringService_GetMirroringStats_ResponseParams_Data();
  ~MirroringService_GetMirroringStats_ResponseParams_Data() = delete;
};
static_assert(sizeof(MirroringService_GetMirroringStats_ResponseParams_Data) == 24,
              "Bad sizeof(MirroringService_GetMirroringStats_ResponseParams_Data)");

}  // namespace internal


class MirroringService_Start_ParamsDataView {
 public:
  MirroringService_Start_ParamsDataView() = default;

  MirroringService_Start_ParamsDataView(
      internal::MirroringService_Start_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetParamsDataView(
      ::mirroring::mojom::SessionParametersDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadParams(UserType* output) {
    
    auto* pointer = data_->params.Get();
    return mojo::internal::Deserialize<::mirroring::mojom::SessionParametersDataView>(
        pointer, output, message_);
  }
  inline void GetMaxResolutionDataView(
      ::gfx::mojom::SizeDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadMaxResolution(UserType* output) {
    
    auto* pointer = data_->max_resolution.Get();
    return mojo::internal::Deserialize<::gfx::mojom::SizeDataView>(
        pointer, output, message_);
  }
  template <typename UserType>
  UserType TakeObserver() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::mirroring::mojom::SessionObserverInterfaceBase>>(
            &data_->observer, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeResourceProvider() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::mirroring::mojom::ResourceProviderInterfaceBase>>(
            &data_->resource_provider, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeOutboundChannel() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::mirroring::mojom::CastMessageChannelInterfaceBase>>(
            &data_->outbound_channel, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeInboundChannel() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::mirroring::mojom::CastMessageChannelInterfaceBase>>(
            &data_->inbound_channel, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::MirroringService_Start_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class MirroringService_SwitchMirroringSourceTab_ParamsDataView {
 public:
  MirroringService_SwitchMirroringSourceTab_ParamsDataView() = default;

  MirroringService_SwitchMirroringSourceTab_ParamsDataView(
      internal::MirroringService_SwitchMirroringSourceTab_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

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


class MirroringService_GetMirroringStats_ParamsDataView {
 public:
  MirroringService_GetMirroringStats_ParamsDataView() = default;

  MirroringService_GetMirroringStats_ParamsDataView(
      internal::MirroringService_GetMirroringStats_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

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


class MirroringService_GetMirroringStats_ResponseParamsDataView {
 public:
  MirroringService_GetMirroringStats_ResponseParamsDataView() = default;

  MirroringService_GetMirroringStats_ResponseParamsDataView(
      internal::MirroringService_GetMirroringStats_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadJsonStats(UserType* output) {
    
    auto* pointer = !data_->json_stats.is_null() ? &data_->json_stats : nullptr;
    return mojo::internal::Deserialize<::mojo_base::mojom::ValueDataView>(
        pointer, output, message_);
  }
 private:
  internal::MirroringService_GetMirroringStats_ResponseParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};

inline void MirroringService_Start_ParamsDataView::GetParamsDataView(
    ::mirroring::mojom::SessionParametersDataView* output) {
  auto pointer = data_->params.Get();
  *output = ::mirroring::mojom::SessionParametersDataView(pointer, message_);
}
inline void MirroringService_Start_ParamsDataView::GetMaxResolutionDataView(
    ::gfx::mojom::SizeDataView* output) {
  auto pointer = data_->max_resolution.Get();
  *output = ::gfx::mojom::SizeDataView(pointer, message_);
}






inline void MirroringService_GetMirroringStats_ResponseParamsDataView::GetJsonStatsDataView(
    ::mojo_base::mojom::ValueDataView* output) {
  auto pointer = &data_->json_stats;
  *output = ::mojo_base::mojom::ValueDataView(pointer, message_);
}



}  // mirroring::mojom

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

#endif  // COMPONENTS_MIRRORING_MOJOM_MIRRORING_SERVICE_MOJOM_PARAMS_DATA_H_