// device/bluetooth/public/mojom/device.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 DEVICE_BLUETOOTH_PUBLIC_MOJOM_DEVICE_MOJOM_PARAMS_DATA_H_
#define DEVICE_BLUETOOTH_PUBLIC_MOJOM_DEVICE_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 bluetooth::mojom {
namespace internal {
class  Device_Disconnect_Params_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;

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

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

  mojo::internal::StructHeader header_;

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

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

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<internal::DeviceInfo_Data> info;

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

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

  mojo::internal::StructHeader header_;

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

  Device_GetServices_Params_Data();
  ~Device_GetServices_Params_Data() = delete;
};
static_assert(sizeof(Device_GetServices_Params_Data) == 8,
              "Bad sizeof(Device_GetServices_Params_Data)");
class  Device_GetServices_ResponseParams_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<internal::ServiceInfo_Data>>> services;

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

  Device_GetServices_ResponseParams_Data();
  ~Device_GetServices_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_GetServices_ResponseParams_Data) == 16,
              "Bad sizeof(Device_GetServices_ResponseParams_Data)");
class  Device_GetCharacteristics_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> service_id;

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

  Device_GetCharacteristics_Params_Data();
  ~Device_GetCharacteristics_Params_Data() = delete;
};
static_assert(sizeof(Device_GetCharacteristics_Params_Data) == 16,
              "Bad sizeof(Device_GetCharacteristics_Params_Data)");
class  Device_GetCharacteristics_ResponseParams_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<internal::CharacteristicInfo_Data>>> characteristics;

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

  Device_GetCharacteristics_ResponseParams_Data();
  ~Device_GetCharacteristics_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_GetCharacteristics_ResponseParams_Data) == 16,
              "Bad sizeof(Device_GetCharacteristics_ResponseParams_Data)");
class  Device_ReadValueForCharacteristic_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> service_id;
  mojo::internal::Pointer<mojo::internal::String_Data> characteristic_id;

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

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

  mojo::internal::StructHeader header_;
  int32_t result;
  uint8_t pad0_[4];
  mojo::internal::Pointer<mojo::internal::Array_Data<uint8_t>> value;

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

  Device_ReadValueForCharacteristic_ResponseParams_Data();
  ~Device_ReadValueForCharacteristic_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_ReadValueForCharacteristic_ResponseParams_Data) == 24,
              "Bad sizeof(Device_ReadValueForCharacteristic_ResponseParams_Data)");
class  Device_WriteValueForCharacteristic_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> service_id;
  mojo::internal::Pointer<mojo::internal::String_Data> characteristic_id;
  mojo::internal::Pointer<mojo::internal::Array_Data<uint8_t>> value;

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

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

  mojo::internal::StructHeader header_;
  int32_t result;
  uint8_t padfinal_[4];

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

  Device_WriteValueForCharacteristic_ResponseParams_Data();
  ~Device_WriteValueForCharacteristic_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_WriteValueForCharacteristic_ResponseParams_Data) == 16,
              "Bad sizeof(Device_WriteValueForCharacteristic_ResponseParams_Data)");
class  Device_GetDescriptors_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> service_id;
  mojo::internal::Pointer<mojo::internal::String_Data> characteristic_id;

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

  Device_GetDescriptors_Params_Data();
  ~Device_GetDescriptors_Params_Data() = delete;
};
static_assert(sizeof(Device_GetDescriptors_Params_Data) == 24,
              "Bad sizeof(Device_GetDescriptors_Params_Data)");
class  Device_GetDescriptors_ResponseParams_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<internal::DescriptorInfo_Data>>> descriptors;

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

  Device_GetDescriptors_ResponseParams_Data();
  ~Device_GetDescriptors_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_GetDescriptors_ResponseParams_Data) == 16,
              "Bad sizeof(Device_GetDescriptors_ResponseParams_Data)");
class  Device_ReadValueForDescriptor_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> service_id;
  mojo::internal::Pointer<mojo::internal::String_Data> characteristic_id;
  mojo::internal::Pointer<mojo::internal::String_Data> descriptor_id;

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

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

  mojo::internal::StructHeader header_;
  int32_t result;
  uint8_t pad0_[4];
  mojo::internal::Pointer<mojo::internal::Array_Data<uint8_t>> value;

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

  Device_ReadValueForDescriptor_ResponseParams_Data();
  ~Device_ReadValueForDescriptor_ResponseParams_Data() = delete;
};
static_assert(sizeof(Device_ReadValueForDescriptor_ResponseParams_Data) == 24,
              "Bad sizeof(Device_ReadValueForDescriptor_ResponseParams_Data)");
class  Device_WriteValueForDescriptor_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> service_id;
  mojo::internal::Pointer<mojo::internal::String_Data> characteristic_id;
  mojo::internal::Pointer<mojo::internal::String_Data> descriptor_id;
  mojo::internal::Pointer<mojo::internal::Array_Data<uint8_t>> value;

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

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

  mojo::internal::StructHeader header_;
  int32_t result;
  uint8_t padfinal_[4];

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

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

}  // namespace internal


class Device_Disconnect_ParamsDataView {
 public:
  Device_Disconnect_ParamsDataView() = default;

  Device_Disconnect_ParamsDataView(
      internal::Device_Disconnect_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

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


class Device_GetInfo_ParamsDataView {
 public:
  Device_GetInfo_ParamsDataView() = default;

  Device_GetInfo_ParamsDataView(
      internal::Device_GetInfo_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

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


class Device_GetInfo_ResponseParamsDataView {
 public:
  Device_GetInfo_ResponseParamsDataView() = default;

  Device_GetInfo_ResponseParamsDataView(
      internal::Device_GetInfo_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetInfoDataView(
      DeviceInfoDataView* output);

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


class Device_GetServices_ParamsDataView {
 public:
  Device_GetServices_ParamsDataView() = default;

  Device_GetServices_ParamsDataView(
      internal::Device_GetServices_Params_Data* data,
      mojo::Message* message)
      : data_(data) {}

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


class Device_GetServices_ResponseParamsDataView {
 public:
  Device_GetServices_ResponseParamsDataView() = default;

  Device_GetServices_ResponseParamsDataView(
      internal::Device_GetServices_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadServices(UserType* output) {
    
    auto* pointer = data_->services.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<::bluetooth::mojom::ServiceInfoDataView>>(
        pointer, output, message_);
  }
 private:
  internal::Device_GetServices_ResponseParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class Device_GetCharacteristics_ParamsDataView {
 public:
  Device_GetCharacteristics_ParamsDataView() = default;

  Device_GetCharacteristics_ParamsDataView(
      internal::Device_GetCharacteristics_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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


class Device_GetCharacteristics_ResponseParamsDataView {
 public:
  Device_GetCharacteristics_ResponseParamsDataView() = default;

  Device_GetCharacteristics_ResponseParamsDataView(
      internal::Device_GetCharacteristics_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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


class Device_ReadValueForCharacteristic_ParamsDataView {
 public:
  Device_ReadValueForCharacteristic_ParamsDataView() = default;

  Device_ReadValueForCharacteristic_ParamsDataView(
      internal::Device_ReadValueForCharacteristic_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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


class Device_ReadValueForCharacteristic_ResponseParamsDataView {
 public:
  Device_ReadValueForCharacteristic_ResponseParamsDataView() = default;

  Device_ReadValueForCharacteristic_ResponseParamsDataView(
      internal::Device_ReadValueForCharacteristic_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) const {
    auto data_value = data_->result;
    return mojo::internal::Deserialize<::bluetooth::mojom::GattResult>(
        data_value, output);
  }
  GattResult result() const {
    return ::mojo::internal::ToKnownEnumValueHelper(
          static_cast<::bluetooth::mojom::GattResult>(data_->result));
  }
  inline void GetValueDataView(
      mojo::ArrayDataView<uint8_t>* output);

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


class Device_WriteValueForCharacteristic_ParamsDataView {
 public:
  Device_WriteValueForCharacteristic_ParamsDataView() = default;

  Device_WriteValueForCharacteristic_ParamsDataView(
      internal::Device_WriteValueForCharacteristic_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadValue(UserType* output) {
    
    auto* pointer = data_->value.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<uint8_t>>(
        pointer, output, message_);
  }
 private:
  internal::Device_WriteValueForCharacteristic_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class Device_WriteValueForCharacteristic_ResponseParamsDataView {
 public:
  Device_WriteValueForCharacteristic_ResponseParamsDataView() = default;

  Device_WriteValueForCharacteristic_ResponseParamsDataView(
      internal::Device_WriteValueForCharacteristic_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) const {
    auto data_value = data_->result;
    return mojo::internal::Deserialize<::bluetooth::mojom::GattResult>(
        data_value, output);
  }
  GattResult result() const {
    return ::mojo::internal::ToKnownEnumValueHelper(
          static_cast<::bluetooth::mojom::GattResult>(data_->result));
  }
 private:
  internal::Device_WriteValueForCharacteristic_ResponseParams_Data* data_ = nullptr;
};


class Device_GetDescriptors_ParamsDataView {
 public:
  Device_GetDescriptors_ParamsDataView() = default;

  Device_GetDescriptors_ParamsDataView(
      internal::Device_GetDescriptors_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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


class Device_GetDescriptors_ResponseParamsDataView {
 public:
  Device_GetDescriptors_ResponseParamsDataView() = default;

  Device_GetDescriptors_ResponseParamsDataView(
      internal::Device_GetDescriptors_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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


class Device_ReadValueForDescriptor_ParamsDataView {
 public:
  Device_ReadValueForDescriptor_ParamsDataView() = default;

  Device_ReadValueForDescriptor_ParamsDataView(
      internal::Device_ReadValueForDescriptor_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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

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


class Device_ReadValueForDescriptor_ResponseParamsDataView {
 public:
  Device_ReadValueForDescriptor_ResponseParamsDataView() = default;

  Device_ReadValueForDescriptor_ResponseParamsDataView(
      internal::Device_ReadValueForDescriptor_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) const {
    auto data_value = data_->result;
    return mojo::internal::Deserialize<::bluetooth::mojom::GattResult>(
        data_value, output);
  }
  GattResult result() const {
    return ::mojo::internal::ToKnownEnumValueHelper(
          static_cast<::bluetooth::mojom::GattResult>(data_->result));
  }
  inline void GetValueDataView(
      mojo::ArrayDataView<uint8_t>* output);

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


class Device_WriteValueForDescriptor_ParamsDataView {
 public:
  Device_WriteValueForDescriptor_ParamsDataView() = default;

  Device_WriteValueForDescriptor_ParamsDataView(
      internal::Device_WriteValueForDescriptor_Params_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadValue(UserType* output) {
    
    auto* pointer = data_->value.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<uint8_t>>(
        pointer, output, message_);
  }
 private:
  internal::Device_WriteValueForDescriptor_Params_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class Device_WriteValueForDescriptor_ResponseParamsDataView {
 public:
  Device_WriteValueForDescriptor_ResponseParamsDataView() = default;

  Device_WriteValueForDescriptor_ResponseParamsDataView(
      internal::Device_WriteValueForDescriptor_ResponseParams_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  [[nodiscard]] bool ReadResult(UserType* output) const {
    auto data_value = data_->result;
    return mojo::internal::Deserialize<::bluetooth::mojom::GattResult>(
        data_value, output);
  }
  GattResult result() const {
    return ::mojo::internal::ToKnownEnumValueHelper(
          static_cast<::bluetooth::mojom::GattResult>(data_->result));
  }
 private:
  internal::Device_WriteValueForDescriptor_ResponseParams_Data* data_ = nullptr;
};





inline void Device_GetInfo_ResponseParamsDataView::GetInfoDataView(
    DeviceInfoDataView* output) {
  auto pointer = data_->info.Get();
  *output = DeviceInfoDataView(pointer, message_);
}




inline void Device_GetServices_ResponseParamsDataView::GetServicesDataView(
    mojo::ArrayDataView<ServiceInfoDataView>* output) {
  auto pointer = data_->services.Get();
  *output = mojo::ArrayDataView<ServiceInfoDataView>(pointer, message_);
}


inline void Device_GetCharacteristics_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void Device_GetCharacteristics_ResponseParamsDataView::GetCharacteristicsDataView(
    mojo::ArrayDataView<CharacteristicInfoDataView>* output) {
  auto pointer = data_->characteristics.Get();
  *output = mojo::ArrayDataView<CharacteristicInfoDataView>(pointer, message_);
}


inline void Device_ReadValueForCharacteristic_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_ReadValueForCharacteristic_ParamsDataView::GetCharacteristicIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->characteristic_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void Device_ReadValueForCharacteristic_ResponseParamsDataView::GetValueDataView(
    mojo::ArrayDataView<uint8_t>* output) {
  auto pointer = data_->value.Get();
  *output = mojo::ArrayDataView<uint8_t>(pointer, message_);
}


inline void Device_WriteValueForCharacteristic_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_WriteValueForCharacteristic_ParamsDataView::GetCharacteristicIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->characteristic_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_WriteValueForCharacteristic_ParamsDataView::GetValueDataView(
    mojo::ArrayDataView<uint8_t>* output) {
  auto pointer = data_->value.Get();
  *output = mojo::ArrayDataView<uint8_t>(pointer, message_);
}




inline void Device_GetDescriptors_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_GetDescriptors_ParamsDataView::GetCharacteristicIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->characteristic_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void Device_GetDescriptors_ResponseParamsDataView::GetDescriptorsDataView(
    mojo::ArrayDataView<DescriptorInfoDataView>* output) {
  auto pointer = data_->descriptors.Get();
  *output = mojo::ArrayDataView<DescriptorInfoDataView>(pointer, message_);
}


inline void Device_ReadValueForDescriptor_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_ReadValueForDescriptor_ParamsDataView::GetCharacteristicIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->characteristic_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_ReadValueForDescriptor_ParamsDataView::GetDescriptorIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->descriptor_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void Device_ReadValueForDescriptor_ResponseParamsDataView::GetValueDataView(
    mojo::ArrayDataView<uint8_t>* output) {
  auto pointer = data_->value.Get();
  *output = mojo::ArrayDataView<uint8_t>(pointer, message_);
}


inline void Device_WriteValueForDescriptor_ParamsDataView::GetServiceIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->service_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_WriteValueForDescriptor_ParamsDataView::GetCharacteristicIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->characteristic_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_WriteValueForDescriptor_ParamsDataView::GetDescriptorIdDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->descriptor_id.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void Device_WriteValueForDescriptor_ParamsDataView::GetValueDataView(
    mojo::ArrayDataView<uint8_t>* output) {
  auto pointer = data_->value.Get();
  *output = mojo::ArrayDataView<uint8_t>(pointer, message_);
}





}  // bluetooth::mojom

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

#endif  // DEVICE_BLUETOOTH_PUBLIC_MOJOM_DEVICE_MOJOM_PARAMS_DATA_H_