// device/bluetooth/public/mojom/gatt_characteristic_properties.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2016 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_GATT_CHARACTERISTIC_PROPERTIES_MOJOM_SHARED_H_
#define DEVICE_BLUETOOTH_PUBLIC_MOJOM_GATT_CHARACTERISTIC_PROPERTIES_MOJOM_SHARED_H_

#include <stdint.h>

#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#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"
#include "mojo/public/cpp/system/message_pipe.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "device/bluetooth/public/mojom/gatt_characteristic_properties.mojom-shared-internal.h"




#include "device/bluetooth/public/mojom/gatt_characteristic_properties.mojom-data-view.h"  // IWYU pragma: export




namespace std {

}  // namespace std

namespace mojo {


namespace internal {

template <typename MaybeConstUserType>
struct Serializer<::bluetooth::mojom::GattCharacteristicPropertiesDataView, MaybeConstUserType> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::bluetooth::mojom::GattCharacteristicPropertiesDataView, UserType>;

  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::bluetooth::mojom::internal::GattCharacteristicProperties_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

    fragment->broadcast = Traits::broadcast(input);

    fragment->read = Traits::read(input);

    fragment->write_without_response = Traits::write_without_response(input);

    fragment->write = Traits::write(input);

    fragment->notify = Traits::notify(input);

    fragment->indicate = Traits::indicate(input);

    fragment->authenticated_signed_writes = Traits::authenticated_signed_writes(input);

    fragment->extended_properties = Traits::extended_properties(input);

    fragment->reliable_write = Traits::reliable_write(input);

    fragment->writable_auxiliaries = Traits::writable_auxiliaries(input);

    fragment->read_encrypted = Traits::read_encrypted(input);

    fragment->write_encrypted = Traits::write_encrypted(input);

    fragment->read_encrypted_authenticated = Traits::read_encrypted_authenticated(input);

    fragment->write_encrypted_authenticated = Traits::write_encrypted_authenticated(input);
  }

  static bool Deserialize(::bluetooth::mojom::internal::GattCharacteristicProperties_Data* input,
                          UserType* output,
                          Message* message) {
    if (!input)
      return CallSetToNullIfExists<Traits>(output);

    ::bluetooth::mojom::GattCharacteristicPropertiesDataView data_view(input, message);
    return CallTraitsRead<Traits>(data_view, output);
  }
};

}  // namespace internal

}  // namespace mojo


namespace bluetooth::mojom {




}  // bluetooth::mojom

// Declare TraceFormatTraits for enums, which should be defined in ::perfetto
// namespace.

#endif  // DEVICE_BLUETOOTH_PUBLIC_MOJOM_GATT_CHARACTERISTIC_PROPERTIES_MOJOM_SHARED_H_