// services/network/public/mojom/proxy_config_with_annotation.mojom-data-view.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file defines XDataView for type traits and can be included in
// _mojom_traits.h definitions but otherwise please use .mojom-forward.h,
// .mojom-shared.h or .mojom.h.

// IWYU pragma: private
// IWYU pragma: friend "traits"

#ifndef SERVICES_NETWORK_PUBLIC_MOJOM_PROXY_CONFIG_WITH_ANNOTATION_MOJOM_DATA_VIEW_H_
#define SERVICES_NETWORK_PUBLIC_MOJOM_PROXY_CONFIG_WITH_ANNOTATION_MOJOM_DATA_VIEW_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/string_data_view.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "services/network/public/mojom/proxy_config_with_annotation.mojom-shared-internal.h"
#include "services/network/public/mojom/mutable_network_traffic_annotation_tag.mojom-shared.h"
#include "services/network/public/mojom/proxy_config.mojom-shared.h"


namespace network::mojom {
class ProxyConfigWithAnnotationDataView;



}  // network::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::network::mojom::ProxyConfigWithAnnotationDataView> {
  using Data = ::network::mojom::internal::ProxyConfigWithAnnotation_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace network::mojom {
// Interface base classes. They are used for type safety check.
class ProxyConfigClientInterfaceBase {};

using ProxyConfigClientPtrDataView =
    mojo::InterfacePtrDataView<ProxyConfigClientInterfaceBase>;
using ProxyConfigClientRequestDataView =
    mojo::InterfaceRequestDataView<ProxyConfigClientInterfaceBase>;
using ProxyConfigClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<ProxyConfigClientInterfaceBase>;
using ProxyConfigClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<ProxyConfigClientInterfaceBase>;
class ProxyConfigPollerClientInterfaceBase {};

using ProxyConfigPollerClientPtrDataView =
    mojo::InterfacePtrDataView<ProxyConfigPollerClientInterfaceBase>;
using ProxyConfigPollerClientRequestDataView =
    mojo::InterfaceRequestDataView<ProxyConfigPollerClientInterfaceBase>;
using ProxyConfigPollerClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<ProxyConfigPollerClientInterfaceBase>;
using ProxyConfigPollerClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<ProxyConfigPollerClientInterfaceBase>;
class ProxyErrorClientInterfaceBase {};

using ProxyErrorClientPtrDataView =
    mojo::InterfacePtrDataView<ProxyErrorClientInterfaceBase>;
using ProxyErrorClientRequestDataView =
    mojo::InterfaceRequestDataView<ProxyErrorClientInterfaceBase>;
using ProxyErrorClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<ProxyErrorClientInterfaceBase>;
using ProxyErrorClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<ProxyErrorClientInterfaceBase>;


class ProxyConfigWithAnnotationDataView {
 public:
  ProxyConfigWithAnnotationDataView() = default;

  ProxyConfigWithAnnotationDataView(
      internal::ProxyConfigWithAnnotation_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetValueDataView(
      ::network::mojom::ProxyConfigDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadValue(UserType* output) {
    
    auto* pointer = data_->value.Get();
    return mojo::internal::Deserialize<::network::mojom::ProxyConfigDataView>(
        pointer, output, message_);
  }
  inline void GetTrafficAnnotationDataView(
      ::network::mojom::MutableNetworkTrafficAnnotationTagDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTrafficAnnotation(UserType* output) {
    
    auto* pointer = data_->traffic_annotation.Get();
    return mojo::internal::Deserialize<::network::mojom::MutableNetworkTrafficAnnotationTagDataView>(
        pointer, output, message_);
  }
 private:
  internal::ProxyConfigWithAnnotation_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // network::mojom

#endif  // SERVICES_NETWORK_PUBLIC_MOJOM_PROXY_CONFIG_WITH_ANNOTATION_MOJOM_DATA_VIEW_H_