// components/policy/resources/webui/mojom/policy.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 COMPONENTS_POLICY_RESOURCES_WEBUI_MOJOM_POLICY_MOJOM_DATA_VIEW_H_
#define COMPONENTS_POLICY_RESOURCES_WEBUI_MOJOM_POLICY_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 "components/policy/resources/webui/mojom/policy.mojom-shared-internal.h"
#include "mojo/public/mojom/base/values.mojom-shared.h"


namespace policy::mojom {
class LogDataView;

class StatusDataView;

class ConflictDataView;

class PolicyDataView;

class PolicyGroupDataView;

class PolicyGroupsResponseDataView;



}  // policy::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::policy::mojom::LogDataView> {
  using Data = ::policy::mojom::internal::Log_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

template <>
struct MojomTypeTraits<::policy::mojom::StatusDataView> {
  using Data = ::policy::mojom::internal::Status_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

template <>
struct MojomTypeTraits<::policy::mojom::ConflictDataView> {
  using Data = ::policy::mojom::internal::Conflict_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

template <>
struct MojomTypeTraits<::policy::mojom::PolicyDataView> {
  using Data = ::policy::mojom::internal::Policy_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

template <>
struct MojomTypeTraits<::policy::mojom::PolicyGroupDataView> {
  using Data = ::policy::mojom::internal::PolicyGroup_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

template <>
struct MojomTypeTraits<::policy::mojom::PolicyGroupsResponseDataView> {
  using Data = ::policy::mojom::internal::PolicyGroupsResponse_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace policy::mojom {


enum class GetPoliciesReason : int32_t {
  
  kCopy = 0,
  
  kExport = 1,
  kMinValue = 0,
  kMaxValue = 1,
};

 std::ostream& operator<<(std::ostream& os, GetPoliciesReason value);
inline bool IsKnownEnumValue(GetPoliciesReason value) {
  return internal::GetPoliciesReason_Data::IsKnownValue(
      static_cast<int32_t>(value));
}

// Returns true if the enum has an infallible conversion from the mojom enum.
consteval bool HasInfallibleConversion(GetPoliciesReason) {
  return true;
}
// Interface base classes. They are used for type safety check.
class PolicyPageHandlerInterfaceBase {};

using PolicyPageHandlerPtrDataView =
    mojo::InterfacePtrDataView<PolicyPageHandlerInterfaceBase>;
using PolicyPageHandlerRequestDataView =
    mojo::InterfaceRequestDataView<PolicyPageHandlerInterfaceBase>;
using PolicyPageHandlerAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<PolicyPageHandlerInterfaceBase>;
using PolicyPageHandlerAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<PolicyPageHandlerInterfaceBase>;
class PolicyPageClientInterfaceBase {};

using PolicyPageClientPtrDataView =
    mojo::InterfacePtrDataView<PolicyPageClientInterfaceBase>;
using PolicyPageClientRequestDataView =
    mojo::InterfaceRequestDataView<PolicyPageClientInterfaceBase>;
using PolicyPageClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<PolicyPageClientInterfaceBase>;
using PolicyPageClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<PolicyPageClientInterfaceBase>;
class PolicyPageHandlerFactoryInterfaceBase {};

using PolicyPageHandlerFactoryPtrDataView =
    mojo::InterfacePtrDataView<PolicyPageHandlerFactoryInterfaceBase>;
using PolicyPageHandlerFactoryRequestDataView =
    mojo::InterfaceRequestDataView<PolicyPageHandlerFactoryInterfaceBase>;
using PolicyPageHandlerFactoryAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<PolicyPageHandlerFactoryInterfaceBase>;
using PolicyPageHandlerFactoryAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<PolicyPageHandlerFactoryInterfaceBase>;


class LogDataView {
 public:
  LogDataView() = default;

  LogDataView(
      internal::Log_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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

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

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

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

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


class StatusDataView {
 public:
  StatusDataView() = default;

  StatusDataView(
      internal::Status_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadAssetId(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `asset_id` 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 `MaybeReadAssetId` instead "
    "of `ReadAssetId if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->asset_id.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetLocationDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadLocation(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `location` 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 `MaybeReadLocation` instead "
    "of `ReadLocation if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->location.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetDirectoryApiIdDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadDirectoryApiId(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `directory_api_id` 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 `MaybeReadDirectoryApiId` instead "
    "of `ReadDirectoryApiId if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->directory_api_id.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetClientIdDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadClientId(UserType* output) {
    
    auto* pointer = data_->client_id.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  std::optional<bool> is_off_hours_active() const {

    return data_->is_off_hours_active_$flag
        ? std::make_optional(!!data_->is_off_hours_active_$value)
        : std::nullopt;
  }
  inline void GetDeviceIdDataView(
      mojo::StringDataView* output);

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

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadMachine(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `machine` 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 `MaybeReadMachine` instead "
    "of `ReadMachine if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->machine.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetVersionDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadVersion(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `version` 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 `MaybeReadVersion` instead "
    "of `ReadVersion if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->version.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetUsernameDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadUsername(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `username` 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 `MaybeReadUsername` instead "
    "of `ReadUsername if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->username.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetGaiaIdDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadGaiaId(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `gaia_id` 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 `MaybeReadGaiaId` instead "
    "of `ReadGaiaId if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->gaia_id.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetProfileIdDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadProfileId(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `profile_id` 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 `MaybeReadProfileId` instead "
    "of `ReadProfileId if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->profile_id.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetStatusDataView(
      mojo::StringDataView* output);

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadRefreshInterval(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `refresh_interval` 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 `MaybeReadRefreshInterval` instead "
    "of `ReadRefreshInterval if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->refresh_interval.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetTimeSinceLastRefreshDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTimeSinceLastRefresh(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `time_since_last_refresh` 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 `MaybeReadTimeSinceLastRefresh` instead "
    "of `ReadTimeSinceLastRefresh if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->time_since_last_refresh.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetTimeSinceLastFetchAttemptDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTimeSinceLastFetchAttempt(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `time_since_last_fetch_attempt` 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 `MaybeReadTimeSinceLastFetchAttempt` instead "
    "of `ReadTimeSinceLastFetchAttempt if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->time_since_last_fetch_attempt.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetExtensionInstallTimeSinceLastRefreshDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadExtensionInstallTimeSinceLastRefresh(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `extension_install_time_since_last_refresh` 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 `MaybeReadExtensionInstallTimeSinceLastRefresh` instead "
    "of `ReadExtensionInstallTimeSinceLastRefresh if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->extension_install_time_since_last_refresh.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetExtensionInstallTimeSinceLastFetchAttemptDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadExtensionInstallTimeSinceLastFetchAttempt(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `extension_install_time_since_last_fetch_attempt` 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 `MaybeReadExtensionInstallTimeSinceLastFetchAttempt` instead "
    "of `ReadExtensionInstallTimeSinceLastFetchAttempt if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->extension_install_time_since_last_fetch_attempt.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetLastCloudReportSentTimestampDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadLastCloudReportSentTimestamp(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `last_cloud_report_sent_timestamp` 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 `MaybeReadLastCloudReportSentTimestamp` instead "
    "of `ReadLastCloudReportSentTimestamp if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->last_cloud_report_sent_timestamp.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetTimeSinceLastCloudReportSentDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadTimeSinceLastCloudReportSent(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `time_since_last_cloud_report_sent` 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 `MaybeReadTimeSinceLastCloudReportSent` instead "
    "of `ReadTimeSinceLastCloudReportSent if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->time_since_last_cloud_report_sent.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetEnterpriseDomainManagerDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadEnterpriseDomainManager(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        mojo::StringDataView, UserType>(),
    "Attempting to read the optional `enterprise_domain_manager` 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 `MaybeReadEnterpriseDomainManager` instead "
    "of `ReadEnterpriseDomainManager if you're fine with null values being "
    "silently ignored in this case.");
    auto* pointer = data_->enterprise_domain_manager.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  std::optional<bool> is_affiliated() const {

    return data_->is_affiliated_$flag
        ? std::make_optional(!!data_->is_affiliated_$value)
        : std::nullopt;
  }
  bool policies_push_available() const {
    return data_->policies_push_available;
  }
  bool error() const {
    return data_->error;
  }
  bool extension_install_error() const {
    return data_->extension_install_error;
  }
 private:
  internal::Status_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class ConflictDataView {
 public:
  ConflictDataView() = default;

  ConflictDataView(
      internal::Conflict_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadSource(UserType* output) {
    
    auto* pointer = data_->source.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetValueDataView(
      ::mojo_base::mojom::ValueDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadValue(UserType* output) {
    
static_assert(
    mojo::internal::IsValidUserTypeForOptionalValue<
        ::mojo_base::mojom::ValueDataView, 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.is_null() ? &data_->value : nullptr;
    return mojo::internal::Deserialize<::mojo_base::mojom::ValueDataView>(
        pointer, output, message_);
  }
 private:
  internal::Conflict_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


class PolicyDataView {
 public:
  PolicyDataView() = default;

  PolicyDataView(
      internal::Policy_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  bool ignored() const {
    return data_->ignored;
  }
  inline void GetNameDataView(
      mojo::StringDataView* output);

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

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadSource(UserType* output) {
    
    auto* pointer = data_->source.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  inline void GetValueDataView(
      ::mojo_base::mojom::ValueDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadValue(UserType* output) {
    
    auto* pointer = !data_->value.is_null() ? &data_->value : nullptr;
    return mojo::internal::Deserialize<::mojo_base::mojom::ValueDataView>(
        pointer, output, message_);
  }
  bool restart_required() const {
    return data_->restart_required;
  }
  bool deprecated() const {
    return data_->deprecated;
  }
  bool future() const {
    return data_->future;
  }
  std::optional<bool> all_sources_merged() const {

    return data_->all_sources_merged_$flag
        ? std::make_optional(!!data_->all_sources_merged_$value)
        : std::nullopt;
  }
  inline void GetConflictsDataView(
      mojo::ArrayDataView<ConflictDataView>* output);

  template <typename UserType>
  [[nodiscard]] bool ReadConflicts(UserType* output) {
    
    auto* pointer = data_->conflicts.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<::policy::mojom::ConflictDataView>>(
        pointer, output, message_);
  }
  inline void GetSupersededDataView(
      mojo::ArrayDataView<ConflictDataView>* output);

  template <typename UserType>
  [[nodiscard]] bool ReadSuperseded(UserType* output) {
    
    auto* pointer = data_->superseded.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<::policy::mojom::ConflictDataView>>(
        pointer, output, message_);
  }
  inline void GetErrorDataView(
      mojo::StringDataView* output);

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

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

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


class PolicyGroupDataView {
 public:
  PolicyGroupDataView() = default;

  PolicyGroupDataView(
      internal::PolicyGroup_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

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

  template <typename UserType>
  [[nodiscard]] bool ReadPolicies(UserType* output) {
    
    auto* pointer = data_->policies.Get();
    return mojo::internal::Deserialize<mojo::MapDataView<mojo::StringDataView, ::policy::mojom::PolicyDataView>>(
        pointer, output, message_);
  }
  inline void GetPrecedenceOrderDataView(
      mojo::ArrayDataView<mojo::StringDataView>* output);

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


class PolicyGroupsResponseDataView {
 public:
  PolicyGroupsResponseDataView() = default;

  PolicyGroupsResponseDataView(
      internal::PolicyGroupsResponse_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

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

  template <typename UserType>
  [[nodiscard]] bool ReadPolicyIdsPresentationOrder(UserType* output) {
    
    auto* pointer = data_->policy_ids_presentation_order.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<mojo::StringDataView>>(
        pointer, output, message_);
  }
  inline void GetPolicyGroupsDataView(
      mojo::MapDataView<mojo::StringDataView, PolicyGroupDataView>* output);

  template <typename UserType>
  [[nodiscard]] bool ReadPolicyGroups(UserType* output) {
    
    auto* pointer = data_->policy_groups.Get();
    return mojo::internal::Deserialize<mojo::MapDataView<mojo::StringDataView, ::policy::mojom::PolicyGroupDataView>>(
        pointer, output, message_);
  }
 private:
  internal::PolicyGroupsResponse_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // policy::mojom

#endif  // COMPONENTS_POLICY_RESOURCES_WEBUI_MOJOM_POLICY_MOJOM_DATA_VIEW_H_