// device/vr/public/mojom/vr_service.mojom.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2013 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_VR_PUBLIC_MOJOM_VR_SERVICE_MOJOM_H_
#define DEVICE_VR_PUBLIC_MOJOM_VR_SERVICE_MOJOM_H_

#include <stdint.h>

#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

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

#include "device/vr/public/mojom/vr_service.mojom-features.h"  // IWYU pragma: export
#include "device/vr/public/mojom/vr_service.mojom-shared.h"  // IWYU pragma: export
#include "device/vr/public/mojom/vr_service.mojom-forward.h"  // IWYU pragma: export
#include "device/gamepad/public/mojom/gamepad.mojom.h"
#include "device/vr/public/mojom/xr_hand_tracking_data.mojom.h"
#include "device/vr/public/mojom/xr_session.mojom-forward.h"
#include "mojo/public/mojom/base/big_buffer.mojom.h"
#include "mojo/public/mojom/base/time.mojom.h"
#include "gpu/ipc/common/exported_shared_image.mojom.h"
#include "gpu/ipc/common/shared_image_metadata.mojom-forward.h"
#include "gpu/ipc/common/sync_token.mojom.h"
#include "ui/display/mojom/display.mojom-forward.h"
#include "ui/gfx/geometry/mojom/geometry.mojom.h"
#include "ui/gfx/mojom/gpu_fence_handle.mojom.h"
#include "ui/gfx/mojom/transform.mojom.h"
#include <string>
#include <vector>

#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"


#include "device/vr/public/mojom/vr_service_mojom_traits.h"
#include "base/component_export.h"




namespace device::mojom {

class VRServiceProxy;

template <typename ImplRefTraits>
class VRServiceStub;

class VRServiceRequestValidator;
class VRServiceResponseValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRService
    : public VRServiceInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.VRService";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static inline constexpr uint32_t kSyncMethodOrdinals[] = {
    5
  };
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = VRServiceInterfaceBase;
  using Proxy_ = VRServiceProxy;

  template <typename ImplRefTraits>
  using Stub_ = VRServiceStub<ImplRefTraits>;

  using RequestValidator_ = VRServiceRequestValidator;
  using ResponseValidator_ = VRServiceResponseValidator;
  enum MethodMinVersions : uint32_t {
    kSetClientMinVersion = 0,
    kRequestSessionMinVersion = 0,
    kSupportsSessionMinVersion = 0,
    kExitPresentMinVersion = 0,
    kSetFramesThrottledMinVersion = 0,
    kMakeXrCompatibleMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct SetClient_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RequestSession_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SupportsSession_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ExitPresent_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetFramesThrottled_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct MakeXrCompatible_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~VRService() = default;

  virtual void SetClient(::mojo::PendingRemote<VRServiceClient> client) = 0;

  using RequestSessionCallback = base::OnceCallback<void(RequestSessionResultPtr)>;
  using RequestSessionMojoCallback = base::OnceCallback<void(RequestSessionResultPtr)>;

  virtual void RequestSession(::device::mojom::XRSessionOptionsPtr options, RequestSessionCallback callback) = 0;

  using SupportsSessionCallback = base::OnceCallback<void(bool)>;
  using SupportsSessionMojoCallback = base::OnceCallback<void(bool)>;

  virtual void SupportsSession(::device::mojom::XRSessionOptionsPtr options, SupportsSessionCallback callback) = 0;

  using ExitPresentCallback = base::OnceCallback<void()>;
  using ExitPresentMojoCallback = base::OnceCallback<void()>;

  virtual void ExitPresent(ExitPresentCallback callback) = 0;

  virtual void SetFramesThrottled(bool throttled) = 0;

  // Sync method. This signature is used by the client side; the service side
  // should implement the signature with callback below.
  
  virtual bool MakeXrCompatible(XrCompatibleResult* out_xr_compatible_result);
  using MakeXrCompatibleCallback = base::OnceCallback<void(XrCompatibleResult)>;
  using MakeXrCompatibleMojoCallback = base::OnceCallback<void(XrCompatibleResult)>;

  virtual void MakeXrCompatible(MakeXrCompatibleCallback callback) = 0;
};

class XRSessionMetricsRecorderProxy;

template <typename ImplRefTraits>
class XRSessionMetricsRecorderStub;

class XRSessionMetricsRecorderRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionMetricsRecorder
    : public XRSessionMetricsRecorderInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRSessionMetricsRecorder";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRSessionMetricsRecorderInterfaceBase;
  using Proxy_ = XRSessionMetricsRecorderProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRSessionMetricsRecorderStub<ImplRefTraits>;

  using RequestValidator_ = XRSessionMetricsRecorderRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kReportFeatureUsedMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct ReportFeatureUsed_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRSessionMetricsRecorder() = default;

  virtual void ReportFeatureUsed(::device::mojom::XRSessionFeature feature) = 0;
};

class VRServiceClientProxy;

template <typename ImplRefTraits>
class VRServiceClientStub;

class VRServiceClientRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceClient
    : public VRServiceClientInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.VRServiceClient";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = VRServiceClientInterfaceBase;
  using Proxy_ = VRServiceClientProxy;

  template <typename ImplRefTraits>
  using Stub_ = VRServiceClientStub<ImplRefTraits>;

  using RequestValidator_ = VRServiceClientRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kOnDeviceChangedMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct OnDeviceChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~VRServiceClient() = default;

  virtual void OnDeviceChanged() = 0;
};

class XREnvironmentIntegrationProviderProxy;

template <typename ImplRefTraits>
class XREnvironmentIntegrationProviderStub;

class XREnvironmentIntegrationProviderRequestValidator;
class XREnvironmentIntegrationProviderResponseValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREnvironmentIntegrationProvider
    : public XREnvironmentIntegrationProviderInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XREnvironmentIntegrationProvider";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XREnvironmentIntegrationProviderInterfaceBase;
  using Proxy_ = XREnvironmentIntegrationProviderProxy;

  template <typename ImplRefTraits>
  using Stub_ = XREnvironmentIntegrationProviderStub<ImplRefTraits>;

  using RequestValidator_ = XREnvironmentIntegrationProviderRequestValidator;
  using ResponseValidator_ = XREnvironmentIntegrationProviderResponseValidator;
  enum MethodMinVersions : uint32_t {
    kSubscribeToHitTestMinVersion = 0,
    kSubscribeToHitTestForTransientInputMinVersion = 0,
    kUnsubscribeFromHitTestMinVersion = 0,
    kCreateAnchorMinVersion = 0,
    kDetachAnchorMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct SubscribeToHitTest_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SubscribeToHitTestForTransientInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UnsubscribeFromHitTest_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CreateAnchor_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct DetachAnchor_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XREnvironmentIntegrationProvider() = default;

  using SubscribeToHitTestCallback = base::OnceCallback<void(const std::optional<::device::HitTestSubscriptionId>&)>;
  using SubscribeToHitTestMojoCallback = base::OnceCallback<void(const std::optional<::device::HitTestSubscriptionId>&)>;

  virtual void SubscribeToHitTest(XRNativeOriginInformationPtr native_origin_information, const std::vector<EntityTypeForHitTest>& entity_types, XRRayPtr ray, SubscribeToHitTestCallback callback) = 0;

  using SubscribeToHitTestForTransientInputCallback = base::OnceCallback<void(const std::optional<::device::HitTestSubscriptionId>&)>;
  using SubscribeToHitTestForTransientInputMojoCallback = base::OnceCallback<void(const std::optional<::device::HitTestSubscriptionId>&)>;

  virtual void SubscribeToHitTestForTransientInput(const std::string& profile_name, const std::vector<EntityTypeForHitTest>& entity_types, XRRayPtr ray, SubscribeToHitTestForTransientInputCallback callback) = 0;

  virtual void UnsubscribeFromHitTest(const ::device::HitTestSubscriptionId& subscription_id) = 0;

  using CreateAnchorCallback = base::OnceCallback<void(const std::optional<::device::AnchorId>&)>;
  using CreateAnchorMojoCallback = base::OnceCallback<void(const std::optional<::device::AnchorId>&)>;

  virtual void CreateAnchor(XRNativeOriginInformationPtr native_origin_information, const ::device::Pose& native_origin_from_anchor, const std::optional<::device::PlaneId>& plane_id, CreateAnchorCallback callback) = 0;

  virtual void DetachAnchor(const ::device::AnchorId& anchor_id) = 0;
};

class XRFrameDataProviderProxy;

template <typename ImplRefTraits>
class XRFrameDataProviderStub;

class XRFrameDataProviderRequestValidator;
class XRFrameDataProviderResponseValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataProvider
    : public XRFrameDataProviderInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRFrameDataProvider";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = true;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRFrameDataProviderInterfaceBase;
  using Proxy_ = XRFrameDataProviderProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRFrameDataProviderStub<ImplRefTraits>;

  using RequestValidator_ = XRFrameDataProviderRequestValidator;
  using ResponseValidator_ = XRFrameDataProviderResponseValidator;
  enum MethodMinVersions : uint32_t {
    kGetFrameDataMinVersion = 0,
    kGetEnvironmentIntegrationProviderMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct GetFrameData_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetEnvironmentIntegrationProvider_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRFrameDataProvider() = default;

  using GetFrameDataCallback = base::OnceCallback<void(XRFrameDataPtr)>;
  using GetFrameDataMojoCallback = base::OnceCallback<void(XRFrameDataPtr)>;

  virtual void GetFrameData(XRFrameDataRequestOptionsPtr options, GetFrameDataCallback callback) = 0;

  virtual void GetEnvironmentIntegrationProvider(::mojo::PendingAssociatedReceiver<XREnvironmentIntegrationProvider> environment_provider) = 0;
};

class XRPresentationProviderProxy;

template <typename ImplRefTraits>
class XRPresentationProviderStub;

class XRPresentationProviderRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationProvider
    : public XRPresentationProviderInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRPresentationProvider";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRPresentationProviderInterfaceBase;
  using Proxy_ = XRPresentationProviderProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRPresentationProviderStub<ImplRefTraits>;

  using RequestValidator_ = XRPresentationProviderRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kUpdateLayerBoundsMinVersion = 0,
    kSubmitFrameMissingMinVersion = 0,
    kSubmitFrameMinVersion = 0,
    kSubmitFrameDrawnIntoTextureMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct UpdateLayerBounds_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SubmitFrameMissing_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SubmitFrame_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SubmitFrameDrawnIntoTexture_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRPresentationProvider() = default;

  virtual void UpdateLayerBounds(int16_t frame_id, const ::gfx::RectF& left_bounds, const ::gfx::RectF& right_bounds, const ::gfx::Size& source_size) = 0;

  virtual void SubmitFrameMissing(int16_t frame_id, ::gpu::SharedImageExportResult camera_export_multi_result) = 0;

  virtual void SubmitFrame(int16_t frame_id, ::base::TimeDelta time_waited) = 0;

  virtual void SubmitFrameDrawnIntoTexture(int16_t frame_id, std::vector<XRLayerUpdatePtr> layer_updates, ::gpu::SharedImageExportResult camera_export_multi_result, ::base::TimeDelta time_waited) = 0;
};

class XRPresentationClientProxy;

template <typename ImplRefTraits>
class XRPresentationClientStub;

class XRPresentationClientRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationClient
    : public XRPresentationClientInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRPresentationClient";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRPresentationClientInterfaceBase;
  using Proxy_ = XRPresentationClientProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRPresentationClientStub<ImplRefTraits>;

  using RequestValidator_ = XRPresentationClientRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kOnSubmitFrameTransferredMinVersion = 0,
    kOnSubmitFrameRenderedMinVersion = 0,
    kOnSubmitFrameGpuFenceMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct OnSubmitFrameTransferred_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnSubmitFrameRendered_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnSubmitFrameGpuFence_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRPresentationClient() = default;

  virtual void OnSubmitFrameTransferred(bool succeeded, const std::vector<::device::LayerId>& layer_ids) = 0;

  virtual void OnSubmitFrameRendered() = 0;

  virtual void OnSubmitFrameGpuFence(::gfx::GpuFenceHandle gpu_fence_handle) = 0;
};

class XRSessionClientProxy;

template <typename ImplRefTraits>
class XRSessionClientStub;

class XRSessionClientRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionClient
    : public XRSessionClientInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRSessionClient";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRSessionClientInterfaceBase;
  using Proxy_ = XRSessionClientProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRSessionClientStub<ImplRefTraits>;

  using RequestValidator_ = XRSessionClientRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kOnExitPresentMinVersion = 0,
    kOnVisibilityStateChangedMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct OnExitPresent_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnVisibilityStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRSessionClient() = default;

  virtual void OnExitPresent() = 0;

  virtual void OnVisibilityStateChanged(XRVisibilityState visibility_state) = 0;
};

class XRLayerManagerProxy;

template <typename ImplRefTraits>
class XRLayerManagerStub;

class XRLayerManagerRequestValidator;
class XRLayerManagerResponseValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerManager
    : public XRLayerManagerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.XRLayerManager";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRLayerManagerInterfaceBase;
  using Proxy_ = XRLayerManagerProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRLayerManagerStub<ImplRefTraits>;

  using RequestValidator_ = XRLayerManagerRequestValidator;
  using ResponseValidator_ = XRLayerManagerResponseValidator;
  enum MethodMinVersions : uint32_t {
    kCreateCompositionLayerMinVersion = 0,
    kDestroyCompositionLayerMinVersion = 0,
    kUpdateCompositionLayerMinVersion = 0,
    kSetEnabledCompositionLayersMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct CreateCompositionLayer_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct DestroyCompositionLayer_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UpdateCompositionLayer_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetEnabledCompositionLayers_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRLayerManager() = default;

  using CreateCompositionLayerCallback = base::OnceCallback<void(CreateCompositionLayerResult)>;
  using CreateCompositionLayerMojoCallback = base::OnceCallback<void(CreateCompositionLayerResult)>;

  virtual void CreateCompositionLayer(XRCompositionLayerDataPtr create_data, CreateCompositionLayerCallback callback) = 0;

  virtual void DestroyCompositionLayer(const ::device::LayerId& layer_id) = 0;

  virtual void UpdateCompositionLayer(const ::device::LayerId& layer_id, XRLayerMutableDataPtr update_data) = 0;

  virtual void SetEnabledCompositionLayers(const std::vector<::device::LayerId>& layer_ids) = 0;
};

class WebXrInternalsRendererListenerProxy;

template <typename ImplRefTraits>
class WebXrInternalsRendererListenerStub;

class WebXrInternalsRendererListenerRequestValidator;


class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) WebXrInternalsRendererListener
    : public WebXrInternalsRendererListenerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "device.mojom.WebXrInternalsRendererListener";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = WebXrInternalsRendererListenerInterfaceBase;
  using Proxy_ = WebXrInternalsRendererListenerProxy;

  template <typename ImplRefTraits>
  using Stub_ = WebXrInternalsRendererListenerStub<ImplRefTraits>;

  using RequestValidator_ = WebXrInternalsRendererListenerRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kOnFrameDataMinVersion = 0,
    kOnConsoleLogMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct OnFrameData_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnConsoleLog_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~WebXrInternalsRendererListener() = default;

  virtual void OnFrameData(::device::mojom::XrFrameStatisticsPtr xrframe_statistics) = 0;

  virtual void OnConsoleLog(::device::mojom::XrLogMessagePtr xrlogging_statistics) = 0;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceProxy
    : public VRService {
 public:
  using InterfaceType = VRService;

  explicit VRServiceProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void SetClient(::mojo::PendingRemote<VRServiceClient> client) final;
  
  void RequestSession(::device::mojom::XRSessionOptionsPtr options, RequestSessionCallback callback) final;
  
  void SupportsSession(::device::mojom::XRSessionOptionsPtr options, SupportsSessionCallback callback) final;
  
  void ExitPresent(ExitPresentCallback callback) final;
  
  void SetFramesThrottled(bool throttled) final;
  
  bool MakeXrCompatible(XrCompatibleResult* out_xr_compatible_result) final;
  
  void MakeXrCompatible(MakeXrCompatibleCallback callback) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionMetricsRecorderProxy
    : public XRSessionMetricsRecorder {
 public:
  using InterfaceType = XRSessionMetricsRecorder;

  explicit XRSessionMetricsRecorderProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void ReportFeatureUsed(::device::mojom::XRSessionFeature feature) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceClientProxy
    : public VRServiceClient {
 public:
  using InterfaceType = VRServiceClient;

  explicit VRServiceClientProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void OnDeviceChanged() final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREnvironmentIntegrationProviderProxy
    : public XREnvironmentIntegrationProvider {
 public:
  using InterfaceType = XREnvironmentIntegrationProvider;

  explicit XREnvironmentIntegrationProviderProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void SubscribeToHitTest(XRNativeOriginInformationPtr native_origin_information, const std::vector<EntityTypeForHitTest>& entity_types, XRRayPtr ray, SubscribeToHitTestCallback callback) final;
  
  void SubscribeToHitTestForTransientInput(const std::string& profile_name, const std::vector<EntityTypeForHitTest>& entity_types, XRRayPtr ray, SubscribeToHitTestForTransientInputCallback callback) final;
  
  void UnsubscribeFromHitTest(const ::device::HitTestSubscriptionId& subscription_id) final;
  
  void CreateAnchor(XRNativeOriginInformationPtr native_origin_information, const ::device::Pose& native_origin_from_anchor, const std::optional<::device::PlaneId>& plane_id, CreateAnchorCallback callback) final;
  
  void DetachAnchor(const ::device::AnchorId& anchor_id) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataProviderProxy
    : public XRFrameDataProvider {
 public:
  using InterfaceType = XRFrameDataProvider;

  explicit XRFrameDataProviderProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void GetFrameData(XRFrameDataRequestOptionsPtr options, GetFrameDataCallback callback) final;
  
  void GetEnvironmentIntegrationProvider(::mojo::PendingAssociatedReceiver<XREnvironmentIntegrationProvider> environment_provider) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationProviderProxy
    : public XRPresentationProvider {
 public:
  using InterfaceType = XRPresentationProvider;

  explicit XRPresentationProviderProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void UpdateLayerBounds(int16_t frame_id, const ::gfx::RectF& left_bounds, const ::gfx::RectF& right_bounds, const ::gfx::Size& source_size) final;
  
  void SubmitFrameMissing(int16_t frame_id, ::gpu::SharedImageExportResult camera_export_multi_result) final;
  
  void SubmitFrame(int16_t frame_id, ::base::TimeDelta time_waited) final;
  
  void SubmitFrameDrawnIntoTexture(int16_t frame_id, std::vector<XRLayerUpdatePtr> layer_updates, ::gpu::SharedImageExportResult camera_export_multi_result, ::base::TimeDelta time_waited) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationClientProxy
    : public XRPresentationClient {
 public:
  using InterfaceType = XRPresentationClient;

  explicit XRPresentationClientProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void OnSubmitFrameTransferred(bool succeeded, const std::vector<::device::LayerId>& layer_ids) final;
  
  void OnSubmitFrameRendered() final;
  
  void OnSubmitFrameGpuFence(::gfx::GpuFenceHandle gpu_fence_handle) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionClientProxy
    : public XRSessionClient {
 public:
  using InterfaceType = XRSessionClient;

  explicit XRSessionClientProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void OnExitPresent() final;
  
  void OnVisibilityStateChanged(XRVisibilityState visibility_state) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerManagerProxy
    : public XRLayerManager {
 public:
  using InterfaceType = XRLayerManager;

  explicit XRLayerManagerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void CreateCompositionLayer(XRCompositionLayerDataPtr create_data, CreateCompositionLayerCallback callback) final;
  
  void DestroyCompositionLayer(const ::device::LayerId& layer_id) final;
  
  void UpdateCompositionLayer(const ::device::LayerId& layer_id, XRLayerMutableDataPtr update_data) final;
  
  void SetEnabledCompositionLayers(const std::vector<::device::LayerId>& layer_ids) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) WebXrInternalsRendererListenerProxy
    : public WebXrInternalsRendererListener {
 public:
  using InterfaceType = WebXrInternalsRendererListener;

  explicit WebXrInternalsRendererListenerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void OnFrameData(::device::mojom::XrFrameStatisticsPtr xrframe_statistics) final;
  
  void OnConsoleLog(::device::mojom::XrLogMessagePtr xrlogging_statistics) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceStubDispatch {
 public:
  static bool Accept(VRService* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      VRService* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<VRService>>
class VRServiceStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  VRServiceStub() = default;
  ~VRServiceStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return VRServiceStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return VRServiceStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionMetricsRecorderStubDispatch {
 public:
  static bool Accept(XRSessionMetricsRecorder* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRSessionMetricsRecorder* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRSessionMetricsRecorder>>
class XRSessionMetricsRecorderStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRSessionMetricsRecorderStub() = default;
  ~XRSessionMetricsRecorderStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRSessionMetricsRecorderStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRSessionMetricsRecorderStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceClientStubDispatch {
 public:
  static bool Accept(VRServiceClient* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      VRServiceClient* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<VRServiceClient>>
class VRServiceClientStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  VRServiceClientStub() = default;
  ~VRServiceClientStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return VRServiceClientStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return VRServiceClientStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREnvironmentIntegrationProviderStubDispatch {
 public:
  static bool Accept(XREnvironmentIntegrationProvider* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XREnvironmentIntegrationProvider* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XREnvironmentIntegrationProvider>>
class XREnvironmentIntegrationProviderStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XREnvironmentIntegrationProviderStub() = default;
  ~XREnvironmentIntegrationProviderStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XREnvironmentIntegrationProviderStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XREnvironmentIntegrationProviderStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataProviderStubDispatch {
 public:
  static bool Accept(XRFrameDataProvider* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRFrameDataProvider* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRFrameDataProvider>>
class XRFrameDataProviderStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRFrameDataProviderStub() = default;
  ~XRFrameDataProviderStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRFrameDataProviderStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRFrameDataProviderStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationProviderStubDispatch {
 public:
  static bool Accept(XRPresentationProvider* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRPresentationProvider* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRPresentationProvider>>
class XRPresentationProviderStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRPresentationProviderStub() = default;
  ~XRPresentationProviderStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRPresentationProviderStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRPresentationProviderStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationClientStubDispatch {
 public:
  static bool Accept(XRPresentationClient* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRPresentationClient* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRPresentationClient>>
class XRPresentationClientStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRPresentationClientStub() = default;
  ~XRPresentationClientStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRPresentationClientStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRPresentationClientStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionClientStubDispatch {
 public:
  static bool Accept(XRSessionClient* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRSessionClient* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRSessionClient>>
class XRSessionClientStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRSessionClientStub() = default;
  ~XRSessionClientStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRSessionClientStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRSessionClientStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerManagerStubDispatch {
 public:
  static bool Accept(XRLayerManager* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRLayerManager* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<XRLayerManager>>
class XRLayerManagerStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  XRLayerManagerStub() = default;
  ~XRLayerManagerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRLayerManagerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRLayerManagerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) WebXrInternalsRendererListenerStubDispatch {
 public:
  static bool Accept(WebXrInternalsRendererListener* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      WebXrInternalsRendererListener* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<WebXrInternalsRendererListener>>
class WebXrInternalsRendererListenerStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  WebXrInternalsRendererListenerStub() = default;
  ~WebXrInternalsRendererListenerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return WebXrInternalsRendererListenerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return WebXrInternalsRendererListenerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionMetricsRecorderRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceClientRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREnvironmentIntegrationProviderRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataProviderRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationProviderRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationClientRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionClientRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerManagerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) WebXrInternalsRendererListenerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRServiceResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREnvironmentIntegrationProviderResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataProviderResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerManagerResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRDepthConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRDepthConfig, T>::value>;
  using DataView = XRDepthConfigDataView;
  using Data_ = internal::XRDepthConfig_Data;

  template <typename... Args>
  static XRDepthConfigPtr New(Args&&... args) {
    return XRDepthConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRDepthConfigPtr From(const U& u) {
    return mojo::TypeConverter<XRDepthConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRDepthConfig>::Convert(*this);
  }


  XRDepthConfig();

  XRDepthConfig(
      ::device::mojom::XRDepthUsage depth_usage,
      ::device::mojom::XRDepthDataFormat depth_data_format,
      std::optional<::device::mojom::XRDepthType> depth_type);


  ~XRDepthConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRDepthConfigPtr>
  XRDepthConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRDepthConfig::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRDepthConfig::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRDepthConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRDepthConfig_UnserializedMessageContext<
            UserType, XRDepthConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRDepthConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRDepthConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRDepthConfig_UnserializedMessageContext<
            UserType, XRDepthConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRDepthConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::mojom::XRDepthUsage depth_usage;
  
  ::device::mojom::XRDepthDataFormat depth_data_format;
  
  std::optional<::device::mojom::XRDepthType> depth_type;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRDepthConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}










class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRFieldOfView {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<VRFieldOfView, T>::value>;
  using DataView = VRFieldOfViewDataView;
  using Data_ = internal::VRFieldOfView_Data;

  template <typename... Args>
  static VRFieldOfViewPtr New(Args&&... args) {
    return VRFieldOfViewPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static VRFieldOfViewPtr From(const U& u) {
    return mojo::TypeConverter<VRFieldOfViewPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, VRFieldOfView>::Convert(*this);
  }


  VRFieldOfView();

  VRFieldOfView(
      float up_degrees,
      float down_degrees,
      float left_degrees,
      float right_degrees);


  ~VRFieldOfView();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = VRFieldOfViewPtr>
  VRFieldOfViewPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRFieldOfView::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRFieldOfView::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        VRFieldOfView::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::VRFieldOfView_UnserializedMessageContext<
            UserType, VRFieldOfView::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<VRFieldOfView::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return VRFieldOfView::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::VRFieldOfView_UnserializedMessageContext<
            UserType, VRFieldOfView::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<VRFieldOfView::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float up_degrees;
  
  float down_degrees;
  
  float left_degrees;
  
  float right_degrees;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, VRFieldOfView::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}







class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) AnchorId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<AnchorId, T>::value>;
  using DataView = AnchorIdDataView;
  using Data_ = internal::AnchorId_Data;

  template <typename... Args>
  static AnchorIdPtr New(Args&&... args) {
    return AnchorIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static AnchorIdPtr From(const U& u) {
    return mojo::TypeConverter<AnchorIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, AnchorId>::Convert(*this);
  }


  AnchorId();

  explicit AnchorId(
      uint64_t id_value);


  ~AnchorId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = AnchorIdPtr>
  AnchorIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        AnchorId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        AnchorId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        AnchorId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::AnchorId_UnserializedMessageContext<
            UserType, AnchorId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<AnchorId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return AnchorId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::AnchorId_UnserializedMessageContext<
            UserType, AnchorId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<AnchorId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, AnchorId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) HitTestSubscriptionId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<HitTestSubscriptionId, T>::value>;
  using DataView = HitTestSubscriptionIdDataView;
  using Data_ = internal::HitTestSubscriptionId_Data;

  template <typename... Args>
  static HitTestSubscriptionIdPtr New(Args&&... args) {
    return HitTestSubscriptionIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static HitTestSubscriptionIdPtr From(const U& u) {
    return mojo::TypeConverter<HitTestSubscriptionIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, HitTestSubscriptionId>::Convert(*this);
  }


  HitTestSubscriptionId();

  explicit HitTestSubscriptionId(
      uint64_t id_value);


  ~HitTestSubscriptionId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = HitTestSubscriptionIdPtr>
  HitTestSubscriptionIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        HitTestSubscriptionId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        HitTestSubscriptionId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        HitTestSubscriptionId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::HitTestSubscriptionId_UnserializedMessageContext<
            UserType, HitTestSubscriptionId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<HitTestSubscriptionId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return HitTestSubscriptionId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::HitTestSubscriptionId_UnserializedMessageContext<
            UserType, HitTestSubscriptionId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<HitTestSubscriptionId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, HitTestSubscriptionId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) PlaneId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<PlaneId, T>::value>;
  using DataView = PlaneIdDataView;
  using Data_ = internal::PlaneId_Data;

  template <typename... Args>
  static PlaneIdPtr New(Args&&... args) {
    return PlaneIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static PlaneIdPtr From(const U& u) {
    return mojo::TypeConverter<PlaneIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, PlaneId>::Convert(*this);
  }


  PlaneId();

  explicit PlaneId(
      uint64_t id_value);


  ~PlaneId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = PlaneIdPtr>
  PlaneIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        PlaneId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        PlaneId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        PlaneId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::PlaneId_UnserializedMessageContext<
            UserType, PlaneId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<PlaneId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return PlaneId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::PlaneId_UnserializedMessageContext<
            UserType, PlaneId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<PlaneId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, PlaneId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) MeshId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<MeshId, T>::value>;
  using DataView = MeshIdDataView;
  using Data_ = internal::MeshId_Data;

  template <typename... Args>
  static MeshIdPtr New(Args&&... args) {
    return MeshIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static MeshIdPtr From(const U& u) {
    return mojo::TypeConverter<MeshIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, MeshId>::Convert(*this);
  }


  MeshId();

  explicit MeshId(
      uint64_t id_value);


  ~MeshId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = MeshIdPtr>
  MeshIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, MeshId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, MeshId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, MeshId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        MeshId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        MeshId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        MeshId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::MeshId_UnserializedMessageContext<
            UserType, MeshId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<MeshId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return MeshId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::MeshId_UnserializedMessageContext<
            UserType, MeshId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<MeshId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, MeshId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, MeshId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, MeshId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, MeshId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XrVisibilityMaskId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XrVisibilityMaskId, T>::value>;
  using DataView = XrVisibilityMaskIdDataView;
  using Data_ = internal::XrVisibilityMaskId_Data;

  template <typename... Args>
  static XrVisibilityMaskIdPtr New(Args&&... args) {
    return XrVisibilityMaskIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XrVisibilityMaskIdPtr From(const U& u) {
    return mojo::TypeConverter<XrVisibilityMaskIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XrVisibilityMaskId>::Convert(*this);
  }


  XrVisibilityMaskId();

  explicit XrVisibilityMaskId(
      uint64_t id_value);


  ~XrVisibilityMaskId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XrVisibilityMaskIdPtr>
  XrVisibilityMaskIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XrVisibilityMaskId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XrVisibilityMaskId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XrVisibilityMaskId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XrVisibilityMaskId_UnserializedMessageContext<
            UserType, XrVisibilityMaskId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XrVisibilityMaskId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XrVisibilityMaskId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XrVisibilityMaskId_UnserializedMessageContext<
            UserType, XrVisibilityMaskId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XrVisibilityMaskId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XrVisibilityMaskId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}











class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationTransportOptions {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRPresentationTransportOptions, T>::value>;
  using DataView = XRPresentationTransportOptionsDataView;
  using Data_ = internal::XRPresentationTransportOptions_Data;

  template <typename... Args>
  static XRPresentationTransportOptionsPtr New(Args&&... args) {
    return XRPresentationTransportOptionsPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRPresentationTransportOptionsPtr From(const U& u) {
    return mojo::TypeConverter<XRPresentationTransportOptionsPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRPresentationTransportOptions>::Convert(*this);
  }


  XRPresentationTransportOptions();

  XRPresentationTransportOptions(
      XRPresentationTransportMethod transport_method,
      bool wait_for_transfer_notification,
      bool wait_for_render_notification,
      bool wait_for_gpu_fence);


  ~XRPresentationTransportOptions();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRPresentationTransportOptionsPtr>
  XRPresentationTransportOptionsPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPresentationTransportOptions::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPresentationTransportOptions::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRPresentationTransportOptions::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRPresentationTransportOptions_UnserializedMessageContext<
            UserType, XRPresentationTransportOptions::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRPresentationTransportOptions::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRPresentationTransportOptions::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRPresentationTransportOptions_UnserializedMessageContext<
            UserType, XRPresentationTransportOptions::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRPresentationTransportOptions::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRPresentationTransportMethod transport_method;
  
  bool wait_for_transfer_notification;
  
  bool wait_for_render_notification;
  
  bool wait_for_gpu_fence;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRPresentationTransportOptions::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRInputSourceSpaceInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRInputSourceSpaceInfo, T>::value>;
  using DataView = XRInputSourceSpaceInfoDataView;
  using Data_ = internal::XRInputSourceSpaceInfo_Data;

  template <typename... Args>
  static XRInputSourceSpaceInfoPtr New(Args&&... args) {
    return XRInputSourceSpaceInfoPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRInputSourceSpaceInfoPtr From(const U& u) {
    return mojo::TypeConverter<XRInputSourceSpaceInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRInputSourceSpaceInfo>::Convert(*this);
  }


  XRInputSourceSpaceInfo();

  XRInputSourceSpaceInfo(
      uint32_t input_source_id,
      XRInputSourceSpaceType input_source_space_type);


  ~XRInputSourceSpaceInfo();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRInputSourceSpaceInfoPtr>
  XRInputSourceSpaceInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceSpaceInfo::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceSpaceInfo::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRInputSourceSpaceInfo::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRInputSourceSpaceInfo_UnserializedMessageContext<
            UserType, XRInputSourceSpaceInfo::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRInputSourceSpaceInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRInputSourceSpaceInfo::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRInputSourceSpaceInfo_UnserializedMessageContext<
            UserType, XRInputSourceSpaceInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRInputSourceSpaceInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint32_t input_source_id;
  
  XRInputSourceSpaceType input_source_space_type;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRHandJointSpaceInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRHandJointSpaceInfo, T>::value>;
  using DataView = XRHandJointSpaceInfoDataView;
  using Data_ = internal::XRHandJointSpaceInfo_Data;

  template <typename... Args>
  static XRHandJointSpaceInfoPtr New(Args&&... args) {
    return XRHandJointSpaceInfoPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRHandJointSpaceInfoPtr From(const U& u) {
    return mojo::TypeConverter<XRHandJointSpaceInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRHandJointSpaceInfo>::Convert(*this);
  }


  XRHandJointSpaceInfo();

  XRHandJointSpaceInfo(
      XRHandedness handedness,
      ::device::mojom::XRHandJoint joint);


  ~XRHandJointSpaceInfo();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRHandJointSpaceInfoPtr>
  XRHandJointSpaceInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHandJointSpaceInfo::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHandJointSpaceInfo::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRHandJointSpaceInfo::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRHandJointSpaceInfo_UnserializedMessageContext<
            UserType, XRHandJointSpaceInfo::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRHandJointSpaceInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRHandJointSpaceInfo::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRHandJointSpaceInfo_UnserializedMessageContext<
            UserType, XRHandJointSpaceInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRHandJointSpaceInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRHandedness handedness;
  
  ::device::mojom::XRHandJoint joint;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPlanePointData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRPlanePointData, T>::value>;
  using DataView = XRPlanePointDataDataView;
  using Data_ = internal::XRPlanePointData_Data;

  template <typename... Args>
  static XRPlanePointDataPtr New(Args&&... args) {
    return XRPlanePointDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRPlanePointDataPtr From(const U& u) {
    return mojo::TypeConverter<XRPlanePointDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRPlanePointData>::Convert(*this);
  }


  XRPlanePointData();

  XRPlanePointData(
      float x,
      float z);


  ~XRPlanePointData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRPlanePointDataPtr>
  XRPlanePointDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlanePointData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlanePointData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRPlanePointData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRPlanePointData_UnserializedMessageContext<
            UserType, XRPlanePointData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRPlanePointData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRPlanePointData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRPlanePointData_UnserializedMessageContext<
            UserType, XRPlanePointData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRPlanePointData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float x;
  
  float z;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRPlanePointData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}














class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) RgbTupleF32 {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<RgbTupleF32, T>::value>;
  using DataView = RgbTupleF32DataView;
  using Data_ = internal::RgbTupleF32_Data;

  template <typename... Args>
  static RgbTupleF32Ptr New(Args&&... args) {
    return RgbTupleF32Ptr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static RgbTupleF32Ptr From(const U& u) {
    return mojo::TypeConverter<RgbTupleF32Ptr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, RgbTupleF32>::Convert(*this);
  }


  RgbTupleF32();

  RgbTupleF32(
      float red,
      float green,
      float blue);


  ~RgbTupleF32();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = RgbTupleF32Ptr>
  RgbTupleF32Ptr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        RgbTupleF32::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        RgbTupleF32::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        RgbTupleF32::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::RgbTupleF32_UnserializedMessageContext<
            UserType, RgbTupleF32::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<RgbTupleF32::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return RgbTupleF32::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::RgbTupleF32_UnserializedMessageContext<
            UserType, RgbTupleF32::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<RgbTupleF32::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float red;
  
  float green;
  
  float blue;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, RgbTupleF32::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}










class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRDepthDataStillValid {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRDepthDataStillValid, T>::value>;
  using DataView = XRDepthDataStillValidDataView;
  using Data_ = internal::XRDepthDataStillValid_Data;

  template <typename... Args>
  static XRDepthDataStillValidPtr New(Args&&... args) {
    return XRDepthDataStillValidPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRDepthDataStillValidPtr From(const U& u) {
    return mojo::TypeConverter<XRDepthDataStillValidPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRDepthDataStillValid>::Convert(*this);
  }


  XRDepthDataStillValid();


  ~XRDepthDataStillValid();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRDepthDataStillValidPtr>
  XRDepthDataStillValidPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRDepthDataStillValid::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRDepthDataStillValid::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRDepthDataStillValid::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRDepthDataStillValid_UnserializedMessageContext<
            UserType, XRDepthDataStillValid::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRDepthDataStillValid::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRDepthDataStillValid::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRDepthDataStillValid_UnserializedMessageContext<
            UserType, XRDepthDataStillValid::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRDepthDataStillValid::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }


  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRDepthDataStillValid::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}








class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) LayerId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<LayerId, T>::value>;
  using DataView = LayerIdDataView;
  using Data_ = internal::LayerId_Data;

  template <typename... Args>
  static LayerIdPtr New(Args&&... args) {
    return LayerIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static LayerIdPtr From(const U& u) {
    return mojo::TypeConverter<LayerIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, LayerId>::Convert(*this);
  }


  LayerId();

  explicit LayerId(
      uint64_t id_value);


  ~LayerId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = LayerIdPtr>
  LayerIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, LayerId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, LayerId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, LayerId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        LayerId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        LayerId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        LayerId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::LayerId_UnserializedMessageContext<
            UserType, LayerId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<LayerId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return LayerId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::LayerId_UnserializedMessageContext<
            UserType, LayerId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<LayerId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t id_value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, LayerId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, LayerId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, LayerId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, LayerId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRProjectionLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRProjectionLayerData, T>::value>;
  using DataView = XRProjectionLayerDataDataView;
  using Data_ = internal::XRProjectionLayerData_Data;

  template <typename... Args>
  static XRProjectionLayerDataPtr New(Args&&... args) {
    return XRProjectionLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRProjectionLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XRProjectionLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRProjectionLayerData>::Convert(*this);
  }


  XRProjectionLayerData();


  ~XRProjectionLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRProjectionLayerDataPtr>
  XRProjectionLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRProjectionLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRProjectionLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRProjectionLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRProjectionLayerData_UnserializedMessageContext<
            UserType, XRProjectionLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRProjectionLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRProjectionLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRProjectionLayerData_UnserializedMessageContext<
            UserType, XRProjectionLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRProjectionLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }


  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRProjectionLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}
















class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameDataRequestOptions {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRFrameDataRequestOptions, T>::value>;
  using DataView = XRFrameDataRequestOptionsDataView;
  using Data_ = internal::XRFrameDataRequestOptions_Data;

  template <typename... Args>
  static XRFrameDataRequestOptionsPtr New(Args&&... args) {
    return XRFrameDataRequestOptionsPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRFrameDataRequestOptionsPtr From(const U& u) {
    return mojo::TypeConverter<XRFrameDataRequestOptionsPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRFrameDataRequestOptions>::Convert(*this);
  }


  XRFrameDataRequestOptions();

  XRFrameDataRequestOptions(
      bool include_lighting_estimation_data,
      bool depth_active,
      uint32_t stage_parameters_id);


  ~XRFrameDataRequestOptions();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRFrameDataRequestOptionsPtr>
  XRFrameDataRequestOptionsPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRFrameDataRequestOptions::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRFrameDataRequestOptions::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRFrameDataRequestOptions::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRFrameDataRequestOptions_UnserializedMessageContext<
            UserType, XRFrameDataRequestOptions::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRFrameDataRequestOptions::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRFrameDataRequestOptions::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRFrameDataRequestOptions_UnserializedMessageContext<
            UserType, XRFrameDataRequestOptions::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRFrameDataRequestOptions::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  bool include_lighting_estimation_data;
  
  bool depth_active;
  
  uint32_t stage_parameters_id;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRNativeOriginInformation {
 public:
  using DataView = XRNativeOriginInformationDataView;
  using Data_ = internal::XRNativeOriginInformation_Data;
  using Tag = Data_::XRNativeOriginInformation_Tag;

  template <typename... Args>
  static XRNativeOriginInformationPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |input_source_space_info|.
  static XRNativeOriginInformationPtr NewInputSourceSpaceInfo(
      XRInputSourceSpaceInfoPtr value);
  // Construct an instance holding |plane_id|.
  static XRNativeOriginInformationPtr NewPlaneId(
      const ::device::PlaneId& value);
  // Construct an instance holding |mesh_id|.
  static XRNativeOriginInformationPtr NewMeshId(
      const ::device::MeshId& value);
  // Construct an instance holding |anchor_id|.
  static XRNativeOriginInformationPtr NewAnchorId(
      const ::device::AnchorId& value);
  // Construct an instance holding |reference_space_type|.
  static XRNativeOriginInformationPtr NewReferenceSpaceType(
      XRReferenceSpaceType value);
  // Construct an instance holding |hand_joint_space_info|.
  static XRNativeOriginInformationPtr NewHandJointSpaceInfo(
      XRHandJointSpaceInfoPtr value);
  // Construct an instance holding |image_index|.
  static XRNativeOriginInformationPtr NewImageIndex(
      uint32_t value);

  template <typename U>
  static XRNativeOriginInformationPtr From(const U& u) {
    return mojo::TypeConverter<XRNativeOriginInformationPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRNativeOriginInformation>::Convert(*this);
  }
  ~XRNativeOriginInformation();

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  XRNativeOriginInformation(const XRNativeOriginInformation& other) = delete;
  XRNativeOriginInformation& operator=(const XRNativeOriginInformation& other) = delete;

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename UnionPtrType = XRNativeOriginInformationPtr>
  XRNativeOriginInformationPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRNativeOriginInformation>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRNativeOriginInformation>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_input_source_space_info() const { return tag_ == Tag::kInputSourceSpaceInfo; }
  const XRInputSourceSpaceInfoPtr& get_input_source_space_info() const {
    CHECK(tag_ == Tag::kInputSourceSpaceInfo);
    return data_.input_source_space_info;
  }
  XRInputSourceSpaceInfoPtr& get_input_source_space_info() {
    CHECK(tag_ == Tag::kInputSourceSpaceInfo);
    return data_.input_source_space_info;
  }
  void set_input_source_space_info(XRInputSourceSpaceInfoPtr input_source_space_info);

  bool is_plane_id() const { return tag_ == Tag::kPlaneId; }
  const ::device::PlaneId& get_plane_id() const {
    CHECK(tag_ == Tag::kPlaneId);
    return data_.plane_id;
  }
  ::device::PlaneId& get_plane_id() {
    CHECK(tag_ == Tag::kPlaneId);
    return data_.plane_id;
  }
  void set_plane_id(const ::device::PlaneId& plane_id);

  bool is_mesh_id() const { return tag_ == Tag::kMeshId; }
  const ::device::MeshId& get_mesh_id() const {
    CHECK(tag_ == Tag::kMeshId);
    return data_.mesh_id;
  }
  ::device::MeshId& get_mesh_id() {
    CHECK(tag_ == Tag::kMeshId);
    return data_.mesh_id;
  }
  void set_mesh_id(const ::device::MeshId& mesh_id);

  bool is_anchor_id() const { return tag_ == Tag::kAnchorId; }
  const ::device::AnchorId& get_anchor_id() const {
    CHECK(tag_ == Tag::kAnchorId);
    return data_.anchor_id;
  }
  ::device::AnchorId& get_anchor_id() {
    CHECK(tag_ == Tag::kAnchorId);
    return data_.anchor_id;
  }
  void set_anchor_id(const ::device::AnchorId& anchor_id);

  bool is_reference_space_type() const { return tag_ == Tag::kReferenceSpaceType; }
  XRReferenceSpaceType get_reference_space_type() const {
    CHECK(tag_ == Tag::kReferenceSpaceType);
    return data_.reference_space_type;
  }
  void set_reference_space_type(XRReferenceSpaceType reference_space_type);

  bool is_hand_joint_space_info() const { return tag_ == Tag::kHandJointSpaceInfo; }
  const XRHandJointSpaceInfoPtr& get_hand_joint_space_info() const {
    CHECK(tag_ == Tag::kHandJointSpaceInfo);
    return data_.hand_joint_space_info;
  }
  XRHandJointSpaceInfoPtr& get_hand_joint_space_info() {
    CHECK(tag_ == Tag::kHandJointSpaceInfo);
    return data_.hand_joint_space_info;
  }
  void set_hand_joint_space_info(XRHandJointSpaceInfoPtr hand_joint_space_info);

  bool is_image_index() const { return tag_ == Tag::kImageIndex; }
  uint32_t get_image_index() const {
    CHECK(tag_ == Tag::kImageIndex);
    return data_.image_index;
  }
  void set_image_index(uint32_t image_index);

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRNativeOriginInformation::DataView>(input);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<XRNativeOriginInformation::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kInputSourceSpaceInfo)>,
        XRInputSourceSpaceInfoPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kPlaneId)>,
        const ::device::PlaneId& value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kMeshId)>,
        const ::device::MeshId& value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kAnchorId)>,
        const ::device::AnchorId& value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kReferenceSpaceType)>,
        XRReferenceSpaceType value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kHandJointSpaceInfo)>,
        XRHandJointSpaceInfoPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kImageIndex)>,
        uint32_t value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    XRInputSourceSpaceInfoPtr input_source_space_info;
    ::device::PlaneId plane_id;
    ::device::MeshId mesh_id;
    ::device::AnchorId anchor_id;
    XRReferenceSpaceType reference_space_type;
    XRHandJointSpaceInfoPtr hand_joint_space_info;
    uint32_t image_index;
  };

  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kInputSourceSpaceInfo)>,
      XRInputSourceSpaceInfoPtr value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kPlaneId)>,
      const ::device::PlaneId& value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kMeshId)>,
      const ::device::MeshId& value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kAnchorId)>,
      const ::device::AnchorId& value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kReferenceSpaceType)>,
      XRReferenceSpaceType value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kHandJointSpaceInfo)>,
      XRHandJointSpaceInfoPtr value);
  XRNativeOriginInformation(
      std::in_place_index_t<static_cast<size_t>(Tag::kImageIndex)>,
      uint32_t value);

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRDepthData {
 public:
  using DataView = XRDepthDataDataView;
  using Data_ = internal::XRDepthData_Data;
  using Tag = Data_::XRDepthData_Tag;

  template <typename... Args>
  static XRDepthDataPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |data_still_valid|.
  static XRDepthDataPtr NewDataStillValid(
      XRDepthDataStillValidPtr value);
  // Construct an instance holding |updated_depth_data|.
  static XRDepthDataPtr NewUpdatedDepthData(
      XRDepthDataUpdatedPtr value);

  template <typename U>
  static XRDepthDataPtr From(const U& u) {
    return mojo::TypeConverter<XRDepthDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRDepthData>::Convert(*this);
  }
  ~XRDepthData();

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  XRDepthData(const XRDepthData& other) = delete;
  XRDepthData& operator=(const XRDepthData& other) = delete;

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename UnionPtrType = XRDepthDataPtr>
  XRDepthDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRDepthData>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRDepthData>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_data_still_valid() const { return tag_ == Tag::kDataStillValid; }
  const XRDepthDataStillValidPtr& get_data_still_valid() const {
    CHECK(tag_ == Tag::kDataStillValid);
    return data_.data_still_valid;
  }
  XRDepthDataStillValidPtr& get_data_still_valid() {
    CHECK(tag_ == Tag::kDataStillValid);
    return data_.data_still_valid;
  }
  void set_data_still_valid(XRDepthDataStillValidPtr data_still_valid);

  bool is_updated_depth_data() const { return tag_ == Tag::kUpdatedDepthData; }
  const XRDepthDataUpdatedPtr& get_updated_depth_data() const {
    CHECK(tag_ == Tag::kUpdatedDepthData);
    return data_.updated_depth_data;
  }
  XRDepthDataUpdatedPtr& get_updated_depth_data() {
    CHECK(tag_ == Tag::kUpdatedDepthData);
    return data_.updated_depth_data;
  }
  void set_updated_depth_data(XRDepthDataUpdatedPtr updated_depth_data);

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRDepthData::DataView>(input);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<XRDepthData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kDataStillValid)>,
        XRDepthDataStillValidPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kUpdatedDepthData)>,
        XRDepthDataUpdatedPtr value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    XRDepthDataStillValidPtr data_still_valid;
    XRDepthDataUpdatedPtr updated_depth_data;
  };

  XRDepthData(
      std::in_place_index_t<static_cast<size_t>(Tag::kDataStillValid)>,
      XRDepthDataStillValidPtr value);
  XRDepthData(
      std::in_place_index_t<static_cast<size_t>(Tag::kUpdatedDepthData)>,
      XRDepthDataUpdatedPtr value);

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerSpecificData {
 public:
  using DataView = XRLayerSpecificDataDataView;
  using Data_ = internal::XRLayerSpecificData_Data;
  using Tag = Data_::XRLayerSpecificData_Tag;

  template <typename... Args>
  static XRLayerSpecificDataPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |projection|.
  static XRLayerSpecificDataPtr NewProjection(
      XRProjectionLayerDataPtr value);
  // Construct an instance holding |quad|.
  static XRLayerSpecificDataPtr NewQuad(
      XRQuadLayerDataPtr value);
  // Construct an instance holding |cylinder|.
  static XRLayerSpecificDataPtr NewCylinder(
      XRCylinderLayerDataPtr value);
  // Construct an instance holding |equirect|.
  static XRLayerSpecificDataPtr NewEquirect(
      XREquirectLayerDataPtr value);
  // Construct an instance holding |cube|.
  static XRLayerSpecificDataPtr NewCube(
      XRCubeLayerDataPtr value);

  template <typename U>
  static XRLayerSpecificDataPtr From(const U& u) {
    return mojo::TypeConverter<XRLayerSpecificDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLayerSpecificData>::Convert(*this);
  }
  ~XRLayerSpecificData();

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  XRLayerSpecificData(const XRLayerSpecificData& other) = delete;
  XRLayerSpecificData& operator=(const XRLayerSpecificData& other) = delete;

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename UnionPtrType = XRLayerSpecificDataPtr>
  XRLayerSpecificDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRLayerSpecificData>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, XRLayerSpecificData>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_projection() const { return tag_ == Tag::kProjection; }
  const XRProjectionLayerDataPtr& get_projection() const {
    CHECK(tag_ == Tag::kProjection);
    return data_.projection;
  }
  XRProjectionLayerDataPtr& get_projection() {
    CHECK(tag_ == Tag::kProjection);
    return data_.projection;
  }
  void set_projection(XRProjectionLayerDataPtr projection);

  bool is_quad() const { return tag_ == Tag::kQuad; }
  const XRQuadLayerDataPtr& get_quad() const {
    CHECK(tag_ == Tag::kQuad);
    return data_.quad;
  }
  XRQuadLayerDataPtr& get_quad() {
    CHECK(tag_ == Tag::kQuad);
    return data_.quad;
  }
  void set_quad(XRQuadLayerDataPtr quad);

  bool is_cylinder() const { return tag_ == Tag::kCylinder; }
  const XRCylinderLayerDataPtr& get_cylinder() const {
    CHECK(tag_ == Tag::kCylinder);
    return data_.cylinder;
  }
  XRCylinderLayerDataPtr& get_cylinder() {
    CHECK(tag_ == Tag::kCylinder);
    return data_.cylinder;
  }
  void set_cylinder(XRCylinderLayerDataPtr cylinder);

  bool is_equirect() const { return tag_ == Tag::kEquirect; }
  const XREquirectLayerDataPtr& get_equirect() const {
    CHECK(tag_ == Tag::kEquirect);
    return data_.equirect;
  }
  XREquirectLayerDataPtr& get_equirect() {
    CHECK(tag_ == Tag::kEquirect);
    return data_.equirect;
  }
  void set_equirect(XREquirectLayerDataPtr equirect);

  bool is_cube() const { return tag_ == Tag::kCube; }
  const XRCubeLayerDataPtr& get_cube() const {
    CHECK(tag_ == Tag::kCube);
    return data_.cube;
  }
  XRCubeLayerDataPtr& get_cube() {
    CHECK(tag_ == Tag::kCube);
    return data_.cube;
  }
  void set_cube(XRCubeLayerDataPtr cube);

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLayerSpecificData::DataView>(input);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<XRLayerSpecificData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kProjection)>,
        XRProjectionLayerDataPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kQuad)>,
        XRQuadLayerDataPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kCylinder)>,
        XRCylinderLayerDataPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kEquirect)>,
        XREquirectLayerDataPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kCube)>,
        XRCubeLayerDataPtr value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    XRProjectionLayerDataPtr projection;
    XRQuadLayerDataPtr quad;
    XRCylinderLayerDataPtr cylinder;
    XREquirectLayerDataPtr equirect;
    XRCubeLayerDataPtr cube;
  };

  XRLayerSpecificData(
      std::in_place_index_t<static_cast<size_t>(Tag::kProjection)>,
      XRProjectionLayerDataPtr value);
  XRLayerSpecificData(
      std::in_place_index_t<static_cast<size_t>(Tag::kQuad)>,
      XRQuadLayerDataPtr value);
  XRLayerSpecificData(
      std::in_place_index_t<static_cast<size_t>(Tag::kCylinder)>,
      XRCylinderLayerDataPtr value);
  XRLayerSpecificData(
      std::in_place_index_t<static_cast<size_t>(Tag::kEquirect)>,
      XREquirectLayerDataPtr value);
  XRLayerSpecificData(
      std::in_place_index_t<static_cast<size_t>(Tag::kCube)>,
      XRCubeLayerDataPtr value);

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};



class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) RequestSessionResult {
 public:
  using DataView = RequestSessionResultDataView;
  using Data_ = internal::RequestSessionResult_Data;
  using Tag = Data_::RequestSessionResult_Tag;

  template <typename... Args>
  static RequestSessionResultPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |success|.
  static RequestSessionResultPtr NewSuccess(
      RequestSessionSuccessPtr value);
  // Construct an instance holding |failure_reason|.
  static RequestSessionResultPtr NewFailureReason(
      ::device::mojom::RequestSessionError value);

  template <typename U>
  static RequestSessionResultPtr From(const U& u) {
    return mojo::TypeConverter<RequestSessionResultPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, RequestSessionResult>::Convert(*this);
  }
  ~RequestSessionResult();

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  RequestSessionResult(const RequestSessionResult& other) = delete;
  RequestSessionResult& operator=(const RequestSessionResult& other) = delete;

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename UnionPtrType = RequestSessionResultPtr>
  RequestSessionResultPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T,
            typename std::enable_if<std::is_same<
                T, RequestSessionResult>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, RequestSessionResult>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_success() const { return tag_ == Tag::kSuccess; }
  const RequestSessionSuccessPtr& get_success() const {
    CHECK(tag_ == Tag::kSuccess);
    return data_.success;
  }
  RequestSessionSuccessPtr& get_success() {
    CHECK(tag_ == Tag::kSuccess);
    return data_.success;
  }
  void set_success(RequestSessionSuccessPtr success);

  bool is_failure_reason() const { return tag_ == Tag::kFailureReason; }
  ::device::mojom::RequestSessionError get_failure_reason() const {
    CHECK(tag_ == Tag::kFailureReason);
    return data_.failure_reason;
  }
  void set_failure_reason(::device::mojom::RequestSessionError failure_reason);

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        RequestSessionResult::DataView>(input);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<RequestSessionResult::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
        RequestSessionSuccessPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kFailureReason)>,
        ::device::mojom::RequestSessionError value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    RequestSessionSuccessPtr success;
    ::device::mojom::RequestSessionError failure_reason;
  };

  RequestSessionResult(
      std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
      RequestSessionSuccessPtr value);
  RequestSessionResult(
      std::in_place_index_t<static_cast<size_t>(Tag::kFailureReason)>,
      ::device::mojom::RequestSessionError value);

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSessionDeviceConfig {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRSessionDeviceConfig, T>::value>;
  using DataView = XRSessionDeviceConfigDataView;
  using Data_ = internal::XRSessionDeviceConfig_Data;

  template <typename... Args>
  static XRSessionDeviceConfigPtr New(Args&&... args) {
    return XRSessionDeviceConfigPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRSessionDeviceConfigPtr From(const U& u) {
    return mojo::TypeConverter<XRSessionDeviceConfigPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRSessionDeviceConfig>::Convert(*this);
  }


  XRSessionDeviceConfig();

  XRSessionDeviceConfig(
      float default_framebuffer_scale,
      std::vector<XRViewPtr> views,
      bool supports_viewport_scaling,
      bool enable_anti_aliasing,
      XRDepthConfigPtr depth_configuration,
      uint16_t max_render_layers);

XRSessionDeviceConfig(const XRSessionDeviceConfig&) = delete;
XRSessionDeviceConfig& operator=(const XRSessionDeviceConfig&) = delete;

  ~XRSessionDeviceConfig();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRSessionDeviceConfigPtr>
  XRSessionDeviceConfigPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRSessionDeviceConfig::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRSessionDeviceConfig_UnserializedMessageContext<
            UserType, XRSessionDeviceConfig::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRSessionDeviceConfig::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRSessionDeviceConfig::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRSessionDeviceConfig_UnserializedMessageContext<
            UserType, XRSessionDeviceConfig::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRSessionDeviceConfig::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float default_framebuffer_scale;
  
  std::vector<XRViewPtr> views;
  
  bool supports_viewport_scaling;
  
  bool enable_anti_aliasing;
  
  XRDepthConfigPtr depth_configuration;
  
  uint16_t max_render_layers;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRSessionDeviceConfig::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSession {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRSession, T>::value>;
  using DataView = XRSessionDataView;
  using Data_ = internal::XRSession_Data;

  template <typename... Args>
  static XRSessionPtr New(Args&&... args) {
    return XRSessionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRSessionPtr From(const U& u) {
    return mojo::TypeConverter<XRSessionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRSession>::Convert(*this);
  }


  XRSession();

  XRSession(
      ::mojo::PendingRemote<XRFrameDataProvider> data_provider,
      ::mojo::PendingRemote<XRLayerManager> layer_manager,
      ::mojo::PendingReceiver<XRSessionClient> client_receiver,
      XRPresentationConnectionPtr submit_frame_sink,
      std::vector<::device::mojom::XRSessionFeature> enabled_features,
      XRSessionDeviceConfigPtr device_config,
      XREnvironmentBlendMode enviroment_blend_mode,
      XRInteractionMode interaction_mode,
      bool wants_fullscreen);

XRSession(const XRSession&) = delete;
XRSession& operator=(const XRSession&) = delete;

  ~XRSession();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRSessionPtr>
  XRSessionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRSession::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRSession::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRSession::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRSession::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRSession_UnserializedMessageContext<
            UserType, XRSession::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRSession::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRSession::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRSession_UnserializedMessageContext<
            UserType, XRSession::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRSession::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::mojo::PendingRemote<XRFrameDataProvider> data_provider;
  
  ::mojo::PendingRemote<XRLayerManager> layer_manager;
  
  ::mojo::PendingReceiver<XRSessionClient> client_receiver;
  
  XRPresentationConnectionPtr submit_frame_sink;
  
  std::vector<::device::mojom::XRSessionFeature> enabled_features;
  
  XRSessionDeviceConfigPtr device_config;
  
  XREnvironmentBlendMode enviroment_blend_mode;
  
  XRInteractionMode interaction_mode;
  
  bool wants_fullscreen;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRSession::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRSession::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRSession::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRSession::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPresentationConnection {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRPresentationConnection, T>::value>;
  using DataView = XRPresentationConnectionDataView;
  using Data_ = internal::XRPresentationConnection_Data;

  template <typename... Args>
  static XRPresentationConnectionPtr New(Args&&... args) {
    return XRPresentationConnectionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRPresentationConnectionPtr From(const U& u) {
    return mojo::TypeConverter<XRPresentationConnectionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRPresentationConnection>::Convert(*this);
  }


  XRPresentationConnection();

  XRPresentationConnection(
      ::mojo::PendingRemote<XRPresentationProvider> provider,
      ::mojo::PendingReceiver<XRPresentationClient> client_receiver,
      XRPresentationTransportOptionsPtr transport_options);

XRPresentationConnection(const XRPresentationConnection&) = delete;
XRPresentationConnection& operator=(const XRPresentationConnection&) = delete;

  ~XRPresentationConnection();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRPresentationConnectionPtr>
  XRPresentationConnectionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRPresentationConnection::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRPresentationConnection_UnserializedMessageContext<
            UserType, XRPresentationConnection::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRPresentationConnection::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRPresentationConnection::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRPresentationConnection_UnserializedMessageContext<
            UserType, XRPresentationConnection::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRPresentationConnection::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::mojo::PendingRemote<XRPresentationProvider> provider;
  
  ::mojo::PendingReceiver<XRPresentationClient> client_receiver;
  
  XRPresentationTransportOptionsPtr transport_options;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRPresentationConnection::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRInputSourceDescription {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRInputSourceDescription, T>::value>;
  using DataView = XRInputSourceDescriptionDataView;
  using Data_ = internal::XRInputSourceDescription_Data;

  template <typename... Args>
  static XRInputSourceDescriptionPtr New(Args&&... args) {
    return XRInputSourceDescriptionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRInputSourceDescriptionPtr From(const U& u) {
    return mojo::TypeConverter<XRInputSourceDescriptionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRInputSourceDescription>::Convert(*this);
  }


  XRInputSourceDescription();

  XRInputSourceDescription(
      XRTargetRayMode target_ray_mode,
      XRHandedness handedness,
      const std::optional<::gfx::Transform>& input_from_pointer,
      std::vector<std::string> profiles);


  ~XRInputSourceDescription();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRInputSourceDescriptionPtr>
  XRInputSourceDescriptionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceDescription::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceDescription::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRInputSourceDescription::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRInputSourceDescription_UnserializedMessageContext<
            UserType, XRInputSourceDescription::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRInputSourceDescription::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRInputSourceDescription::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRInputSourceDescription_UnserializedMessageContext<
            UserType, XRInputSourceDescription::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRInputSourceDescription::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRTargetRayMode target_ray_mode;
  
  XRHandedness handedness;
  
  std::optional<::gfx::Transform> input_from_pointer;
  
  std::vector<std::string> profiles;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRInputSourceDescription::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRInputSourceState {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRInputSourceState, T>::value>;
  using DataView = XRInputSourceStateDataView;
  using Data_ = internal::XRInputSourceState_Data;

  template <typename... Args>
  static XRInputSourceStatePtr New(Args&&... args) {
    return XRInputSourceStatePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRInputSourceStatePtr From(const U& u) {
    return mojo::TypeConverter<XRInputSourceStatePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRInputSourceState>::Convert(*this);
  }


  XRInputSourceState();

  XRInputSourceState(
      uint32_t source_id,
      XRInputSourceDescriptionPtr description,
      const std::optional<::gfx::Transform>& mojo_from_input,
      bool emulated_position,
      bool is_auxiliary,
      bool primary_input_pressed,
      bool primary_input_clicked,
      bool primary_squeeze_pressed,
      bool primary_squeeze_clicked,
      const std::optional<::device::Gamepad>& gamepad,
      const std::optional<::gfx::PointF>& overlay_pointer_position,
      ::device::mojom::XRHandTrackingDataPtr hand_tracking_data);

XRInputSourceState(const XRInputSourceState&) = delete;
XRInputSourceState& operator=(const XRInputSourceState&) = delete;

  ~XRInputSourceState();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRInputSourceStatePtr>
  XRInputSourceStatePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceState::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRInputSourceState::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRInputSourceState::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRInputSourceState_UnserializedMessageContext<
            UserType, XRInputSourceState::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRInputSourceState::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRInputSourceState::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRInputSourceState_UnserializedMessageContext<
            UserType, XRInputSourceState::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRInputSourceState::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint32_t source_id;
  
  XRInputSourceDescriptionPtr description;
  
  std::optional<::gfx::Transform> mojo_from_input;
  
  bool emulated_position;
  
  bool is_auxiliary;
  
  bool primary_input_pressed;
  
  bool primary_input_clicked;
  
  bool primary_squeeze_pressed;
  
  bool primary_squeeze_clicked;
  
  std::optional<::device::Gamepad> gamepad;
  
  std::optional<::gfx::PointF> overlay_pointer_position;
  
  ::device::mojom::XRHandTrackingDataPtr hand_tracking_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRInputSourceState::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRPose {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<VRPose, T>::value>;
  using DataView = VRPoseDataView;
  using Data_ = internal::VRPose_Data;

  template <typename... Args>
  static VRPosePtr New(Args&&... args) {
    return VRPosePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static VRPosePtr From(const U& u) {
    return mojo::TypeConverter<VRPosePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, VRPose>::Convert(*this);
  }


  VRPose();

  VRPose(
      const std::optional<::gfx::Quaternion>& orientation,
      const std::optional<::gfx::Point3F>& position,
      bool emulated_position);


  ~VRPose();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = VRPosePtr>
  VRPosePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, VRPose::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, VRPose::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, VRPose::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRPose::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRPose::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        VRPose::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::VRPose_UnserializedMessageContext<
            UserType, VRPose::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<VRPose::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return VRPose::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::VRPose_UnserializedMessageContext<
            UserType, VRPose::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<VRPose::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::optional<::gfx::Quaternion> orientation;
  
  std::optional<::gfx::Point3F> position;
  
  bool emulated_position;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, VRPose::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, VRPose::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, VRPose::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, VRPose::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) Pose {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<Pose, T>::value>;
  using DataView = PoseDataView;
  using Data_ = internal::Pose_Data;

  template <typename... Args>
  static PosePtr New(Args&&... args) {
    return PosePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static PosePtr From(const U& u) {
    return mojo::TypeConverter<PosePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, Pose>::Convert(*this);
  }


  Pose();

  Pose(
      const ::gfx::Quaternion& orientation,
      const ::gfx::Point3F& position);


  ~Pose();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = PosePtr>
  PosePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, Pose::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, Pose::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, Pose::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        Pose::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        Pose::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        Pose::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::Pose_UnserializedMessageContext<
            UserType, Pose::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<Pose::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return Pose::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::Pose_UnserializedMessageContext<
            UserType, Pose::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<Pose::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Quaternion orientation;
  
  ::gfx::Point3F position;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, Pose::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, Pose::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, Pose::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, Pose::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}










class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRRay {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRRay, T>::value>;
  using DataView = XRRayDataView;
  using Data_ = internal::XRRay_Data;

  template <typename... Args>
  static XRRayPtr New(Args&&... args) {
    return XRRayPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRRayPtr From(const U& u) {
    return mojo::TypeConverter<XRRayPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRRay>::Convert(*this);
  }


  XRRay();

  XRRay(
      const ::gfx::Point3F& origin,
      const ::gfx::Vector3dF& direction);


  ~XRRay();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRRayPtr>
  XRRayPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRRay::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRRay::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRRay::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRRay::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRRay::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRRay::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRRay_UnserializedMessageContext<
            UserType, XRRay::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRRay::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRRay::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRRay_UnserializedMessageContext<
            UserType, XRRay::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRRay::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Point3F origin;
  
  ::gfx::Vector3dF direction;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRRay::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRRay::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRRay::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRRay::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRHitResult {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRHitResult, T>::value>;
  using DataView = XRHitResultDataView;
  using Data_ = internal::XRHitResult_Data;

  template <typename... Args>
  static XRHitResultPtr New(Args&&... args) {
    return XRHitResultPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRHitResultPtr From(const U& u) {
    return mojo::TypeConverter<XRHitResultPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRHitResult>::Convert(*this);
  }


  XRHitResult();

  XRHitResult(
      const ::device::Pose& mojo_from_result,
      const std::optional<::device::PlaneId>& plane_id);


  ~XRHitResult();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRHitResultPtr>
  XRHitResultPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitResult::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitResult::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRHitResult::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRHitResult_UnserializedMessageContext<
            UserType, XRHitResult::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRHitResult::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRHitResult::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRHitResult_UnserializedMessageContext<
            UserType, XRHitResult::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRHitResult::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::Pose mojo_from_result;
  
  std::optional<::device::PlaneId> plane_id;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRHitResult::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRViewGeometry {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRViewGeometry, T>::value>;
  using DataView = XRViewGeometryDataView;
  using Data_ = internal::XRViewGeometry_Data;

  template <typename... Args>
  static XRViewGeometryPtr New(Args&&... args) {
    return XRViewGeometryPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRViewGeometryPtr From(const U& u) {
    return mojo::TypeConverter<XRViewGeometryPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRViewGeometry>::Convert(*this);
  }


  XRViewGeometry();

  XRViewGeometry(
      VRFieldOfViewPtr field_of_view,
      const ::gfx::Transform& mojo_from_view);

XRViewGeometry(const XRViewGeometry&) = delete;
XRViewGeometry& operator=(const XRViewGeometry&) = delete;

  ~XRViewGeometry();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRViewGeometryPtr>
  XRViewGeometryPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRViewGeometry::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRViewGeometry::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRViewGeometry::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRViewGeometry_UnserializedMessageContext<
            UserType, XRViewGeometry::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRViewGeometry::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRViewGeometry::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRViewGeometry_UnserializedMessageContext<
            UserType, XRViewGeometry::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRViewGeometry::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  VRFieldOfViewPtr field_of_view;
  
  ::gfx::Transform mojo_from_view;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRViewGeometry::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRVisibilityMask {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRVisibilityMask, T>::value>;
  using DataView = XRVisibilityMaskDataView;
  using Data_ = internal::XRVisibilityMask_Data;

  template <typename... Args>
  static XRVisibilityMaskPtr New(Args&&... args) {
    return XRVisibilityMaskPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRVisibilityMaskPtr From(const U& u) {
    return mojo::TypeConverter<XRVisibilityMaskPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRVisibilityMask>::Convert(*this);
  }


  XRVisibilityMask();

  XRVisibilityMask(
      std::vector<::gfx::PointF> vertices,
      std::vector<uint32_t> unvalidated_indices);


  ~XRVisibilityMask();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRVisibilityMaskPtr>
  XRVisibilityMaskPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRVisibilityMask::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRVisibilityMask::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRVisibilityMask::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRVisibilityMask_UnserializedMessageContext<
            UserType, XRVisibilityMask::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRVisibilityMask::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRVisibilityMask::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRVisibilityMask_UnserializedMessageContext<
            UserType, XRVisibilityMask::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRVisibilityMask::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::gfx::PointF> vertices;
  
  std::vector<uint32_t> unvalidated_indices;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRVisibilityMask::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRView {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRView, T>::value>;
  using DataView = XRViewDataView;
  using Data_ = internal::XRView_Data;

  template <typename... Args>
  static XRViewPtr New(Args&&... args) {
    return XRViewPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRViewPtr From(const U& u) {
    return mojo::TypeConverter<XRViewPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRView>::Convert(*this);
  }


  XRView();

  XRView(
      XREye eye,
      XRViewGeometryPtr geometry,
      const ::gfx::Rect& viewport,
      XRDepthDataPtr depth_data,
      bool is_first_person_observer,
      XRVisibilityMaskPtr visibility_mask,
      const ::device::XrVisibilityMaskId& visibility_mask_id);

XRView(const XRView&) = delete;
XRView& operator=(const XRView&) = delete;

  ~XRView();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRViewPtr>
  XRViewPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRView::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRView::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRView::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRView::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRView_UnserializedMessageContext<
            UserType, XRView::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRView::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRView::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRView_UnserializedMessageContext<
            UserType, XRView::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRView::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XREye eye;
  
  XRViewGeometryPtr geometry;
  
  ::gfx::Rect viewport;
  
  XRDepthDataPtr depth_data;
  
  bool is_first_person_observer;
  
  XRVisibilityMaskPtr visibility_mask;
  
  ::device::XrVisibilityMaskId visibility_mask_id;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRView::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRView::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRView::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRView::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) VRStageParameters {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<VRStageParameters, T>::value>;
  using DataView = VRStageParametersDataView;
  using Data_ = internal::VRStageParameters_Data;

  template <typename... Args>
  static VRStageParametersPtr New(Args&&... args) {
    return VRStageParametersPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static VRStageParametersPtr From(const U& u) {
    return mojo::TypeConverter<VRStageParametersPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, VRStageParameters>::Convert(*this);
  }


  VRStageParameters();

  VRStageParameters(
      const ::gfx::Transform& mojo_from_stage,
      std::optional<std::vector<::gfx::Point3F>> bounds);


  ~VRStageParameters();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = VRStageParametersPtr>
  VRStageParametersPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRStageParameters::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        VRStageParameters::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        VRStageParameters::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::VRStageParameters_UnserializedMessageContext<
            UserType, VRStageParameters::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<VRStageParameters::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return VRStageParameters::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::VRStageParameters_UnserializedMessageContext<
            UserType, VRStageParameters::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<VRStageParameters::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Transform mojo_from_stage;
  
  std::optional<std::vector<::gfx::Point3F>> bounds;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, VRStageParameters::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}









class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPlaneData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRPlaneData, T>::value>;
  using DataView = XRPlaneDataDataView;
  using Data_ = internal::XRPlaneData_Data;

  template <typename... Args>
  static XRPlaneDataPtr New(Args&&... args) {
    return XRPlaneDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRPlaneDataPtr From(const U& u) {
    return mojo::TypeConverter<XRPlaneDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRPlaneData>::Convert(*this);
  }


  XRPlaneData();

  XRPlaneData(
      const ::device::PlaneId& id,
      XRPlaneOrientation orientation,
      const std::optional<::device::Pose>& mojo_from_plane,
      std::optional<XRSemanticLabel> semantic_label,
      std::vector<XRPlanePointDataPtr> polygon);

XRPlaneData(const XRPlaneData&) = delete;
XRPlaneData& operator=(const XRPlaneData&) = delete;

  ~XRPlaneData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRPlaneDataPtr>
  XRPlaneDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlaneData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlaneData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRPlaneData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRPlaneData_UnserializedMessageContext<
            UserType, XRPlaneData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRPlaneData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRPlaneData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRPlaneData_UnserializedMessageContext<
            UserType, XRPlaneData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRPlaneData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::PlaneId id;
  
  XRPlaneOrientation orientation;
  
  std::optional<::device::Pose> mojo_from_plane;
  
  std::optional<XRSemanticLabel> semantic_label;
  
  std::vector<XRPlanePointDataPtr> polygon;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRPlaneData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRPlaneDetectionData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRPlaneDetectionData, T>::value>;
  using DataView = XRPlaneDetectionDataDataView;
  using Data_ = internal::XRPlaneDetectionData_Data;

  template <typename... Args>
  static XRPlaneDetectionDataPtr New(Args&&... args) {
    return XRPlaneDetectionDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRPlaneDetectionDataPtr From(const U& u) {
    return mojo::TypeConverter<XRPlaneDetectionDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRPlaneDetectionData>::Convert(*this);
  }


  XRPlaneDetectionData();

  XRPlaneDetectionData(
      std::vector<::device::PlaneId> all_planes_ids,
      std::vector<XRPlaneDataPtr> updated_planes_data);

XRPlaneDetectionData(const XRPlaneDetectionData&) = delete;
XRPlaneDetectionData& operator=(const XRPlaneDetectionData&) = delete;

  ~XRPlaneDetectionData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRPlaneDetectionDataPtr>
  XRPlaneDetectionDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlaneDetectionData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRPlaneDetectionData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRPlaneDetectionData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRPlaneDetectionData_UnserializedMessageContext<
            UserType, XRPlaneDetectionData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRPlaneDetectionData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRPlaneDetectionData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRPlaneDetectionData_UnserializedMessageContext<
            UserType, XRPlaneDetectionData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRPlaneDetectionData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::device::PlaneId> all_planes_ids;
  
  std::vector<XRPlaneDataPtr> updated_planes_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRPlaneDetectionData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRMeshData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRMeshData, T>::value>;
  using DataView = XRMeshDataDataView;
  using Data_ = internal::XRMeshData_Data;

  template <typename... Args>
  static XRMeshDataPtr New(Args&&... args) {
    return XRMeshDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRMeshDataPtr From(const U& u) {
    return mojo::TypeConverter<XRMeshDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRMeshData>::Convert(*this);
  }


  XRMeshData();

  XRMeshData(
      const ::device::MeshId& id,
      const std::optional<::device::Pose>& mojo_from_mesh,
      std::vector<float> vertices,
      std::vector<uint32_t> indices,
      std::optional<XRSemanticLabel> semantic_label);


  ~XRMeshData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRMeshDataPtr>
  XRMeshDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRMeshData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRMeshData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRMeshData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRMeshData_UnserializedMessageContext<
            UserType, XRMeshData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRMeshData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRMeshData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRMeshData_UnserializedMessageContext<
            UserType, XRMeshData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRMeshData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::MeshId id;
  
  std::optional<::device::Pose> mojo_from_mesh;
  
  std::vector<float> vertices;
  
  std::vector<uint32_t> indices;
  
  std::optional<XRSemanticLabel> semantic_label;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRMeshData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRMeshDetectionData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRMeshDetectionData, T>::value>;
  using DataView = XRMeshDetectionDataDataView;
  using Data_ = internal::XRMeshDetectionData_Data;

  template <typename... Args>
  static XRMeshDetectionDataPtr New(Args&&... args) {
    return XRMeshDetectionDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRMeshDetectionDataPtr From(const U& u) {
    return mojo::TypeConverter<XRMeshDetectionDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRMeshDetectionData>::Convert(*this);
  }


  XRMeshDetectionData();

  XRMeshDetectionData(
      std::vector<::device::MeshId> all_meshes_ids,
      std::vector<XRMeshDataPtr> updated_meshes_data);

XRMeshDetectionData(const XRMeshDetectionData&) = delete;
XRMeshDetectionData& operator=(const XRMeshDetectionData&) = delete;

  ~XRMeshDetectionData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRMeshDetectionDataPtr>
  XRMeshDetectionDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRMeshDetectionData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRMeshDetectionData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRMeshDetectionData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRMeshDetectionData_UnserializedMessageContext<
            UserType, XRMeshDetectionData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRMeshDetectionData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRMeshDetectionData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRMeshDetectionData_UnserializedMessageContext<
            UserType, XRMeshDetectionData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRMeshDetectionData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::device::MeshId> all_meshes_ids;
  
  std::vector<XRMeshDataPtr> updated_meshes_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRMeshDetectionData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRAnchorData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRAnchorData, T>::value>;
  using DataView = XRAnchorDataDataView;
  using Data_ = internal::XRAnchorData_Data;

  template <typename... Args>
  static XRAnchorDataPtr New(Args&&... args) {
    return XRAnchorDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRAnchorDataPtr From(const U& u) {
    return mojo::TypeConverter<XRAnchorDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRAnchorData>::Convert(*this);
  }


  XRAnchorData();

  XRAnchorData(
      const ::device::AnchorId& id,
      const std::optional<::device::Pose>& mojo_from_anchor);


  ~XRAnchorData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRAnchorDataPtr>
  XRAnchorDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRAnchorData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRAnchorData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRAnchorData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRAnchorData_UnserializedMessageContext<
            UserType, XRAnchorData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRAnchorData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRAnchorData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRAnchorData_UnserializedMessageContext<
            UserType, XRAnchorData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRAnchorData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::AnchorId id;
  
  std::optional<::device::Pose> mojo_from_anchor;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRAnchorData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRAnchorsData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRAnchorsData, T>::value>;
  using DataView = XRAnchorsDataDataView;
  using Data_ = internal::XRAnchorsData_Data;

  template <typename... Args>
  static XRAnchorsDataPtr New(Args&&... args) {
    return XRAnchorsDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRAnchorsDataPtr From(const U& u) {
    return mojo::TypeConverter<XRAnchorsDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRAnchorsData>::Convert(*this);
  }


  XRAnchorsData();

  XRAnchorsData(
      std::vector<::device::AnchorId> all_anchors_ids,
      std::vector<XRAnchorDataPtr> updated_anchors_data);

XRAnchorsData(const XRAnchorsData&) = delete;
XRAnchorsData& operator=(const XRAnchorsData&) = delete;

  ~XRAnchorsData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRAnchorsDataPtr>
  XRAnchorsDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRAnchorsData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRAnchorsData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRAnchorsData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRAnchorsData_UnserializedMessageContext<
            UserType, XRAnchorsData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRAnchorsData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRAnchorsData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRAnchorsData_UnserializedMessageContext<
            UserType, XRAnchorsData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRAnchorsData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::device::AnchorId> all_anchors_ids;
  
  std::vector<XRAnchorDataPtr> updated_anchors_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRAnchorsData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRHitTestSubscriptionResultData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRHitTestSubscriptionResultData, T>::value>;
  using DataView = XRHitTestSubscriptionResultDataDataView;
  using Data_ = internal::XRHitTestSubscriptionResultData_Data;

  template <typename... Args>
  static XRHitTestSubscriptionResultDataPtr New(Args&&... args) {
    return XRHitTestSubscriptionResultDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRHitTestSubscriptionResultDataPtr From(const U& u) {
    return mojo::TypeConverter<XRHitTestSubscriptionResultDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRHitTestSubscriptionResultData>::Convert(*this);
  }


  XRHitTestSubscriptionResultData();

  XRHitTestSubscriptionResultData(
      const ::device::HitTestSubscriptionId& subscription_id,
      std::vector<XRHitResultPtr> hit_test_results);

XRHitTestSubscriptionResultData(const XRHitTestSubscriptionResultData&) = delete;
XRHitTestSubscriptionResultData& operator=(const XRHitTestSubscriptionResultData&) = delete;

  ~XRHitTestSubscriptionResultData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRHitTestSubscriptionResultDataPtr>
  XRHitTestSubscriptionResultDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestSubscriptionResultData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestSubscriptionResultData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRHitTestSubscriptionResultData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRHitTestSubscriptionResultData_UnserializedMessageContext<
            UserType, XRHitTestSubscriptionResultData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRHitTestSubscriptionResultData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRHitTestSubscriptionResultData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRHitTestSubscriptionResultData_UnserializedMessageContext<
            UserType, XRHitTestSubscriptionResultData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRHitTestSubscriptionResultData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::HitTestSubscriptionId subscription_id;
  
  std::vector<XRHitResultPtr> hit_test_results;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRHitTestTransientInputSubscriptionResultData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRHitTestTransientInputSubscriptionResultData, T>::value>;
  using DataView = XRHitTestTransientInputSubscriptionResultDataDataView;
  using Data_ = internal::XRHitTestTransientInputSubscriptionResultData_Data;

  template <typename... Args>
  static XRHitTestTransientInputSubscriptionResultDataPtr New(Args&&... args) {
    return XRHitTestTransientInputSubscriptionResultDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRHitTestTransientInputSubscriptionResultDataPtr From(const U& u) {
    return mojo::TypeConverter<XRHitTestTransientInputSubscriptionResultDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRHitTestTransientInputSubscriptionResultData>::Convert(*this);
  }


  XRHitTestTransientInputSubscriptionResultData();

  XRHitTestTransientInputSubscriptionResultData(
      const ::device::HitTestSubscriptionId& subscription_id,
      base::flat_map<uint32_t, std::vector<XRHitResultPtr>> input_source_id_to_hit_test_results);

XRHitTestTransientInputSubscriptionResultData(const XRHitTestTransientInputSubscriptionResultData&) = delete;
XRHitTestTransientInputSubscriptionResultData& operator=(const XRHitTestTransientInputSubscriptionResultData&) = delete;

  ~XRHitTestTransientInputSubscriptionResultData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRHitTestTransientInputSubscriptionResultDataPtr>
  XRHitTestTransientInputSubscriptionResultDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestTransientInputSubscriptionResultData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestTransientInputSubscriptionResultData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRHitTestTransientInputSubscriptionResultData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRHitTestTransientInputSubscriptionResultData_UnserializedMessageContext<
            UserType, XRHitTestTransientInputSubscriptionResultData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRHitTestTransientInputSubscriptionResultData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRHitTestTransientInputSubscriptionResultData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRHitTestTransientInputSubscriptionResultData_UnserializedMessageContext<
            UserType, XRHitTestTransientInputSubscriptionResultData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRHitTestTransientInputSubscriptionResultData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::HitTestSubscriptionId subscription_id;
  
  base::flat_map<uint32_t, std::vector<XRHitResultPtr>> input_source_id_to_hit_test_results;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRHitTestSubscriptionResultsData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRHitTestSubscriptionResultsData, T>::value>;
  using DataView = XRHitTestSubscriptionResultsDataDataView;
  using Data_ = internal::XRHitTestSubscriptionResultsData_Data;

  template <typename... Args>
  static XRHitTestSubscriptionResultsDataPtr New(Args&&... args) {
    return XRHitTestSubscriptionResultsDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRHitTestSubscriptionResultsDataPtr From(const U& u) {
    return mojo::TypeConverter<XRHitTestSubscriptionResultsDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRHitTestSubscriptionResultsData>::Convert(*this);
  }


  XRHitTestSubscriptionResultsData();

  XRHitTestSubscriptionResultsData(
      std::vector<XRHitTestSubscriptionResultDataPtr> results,
      std::vector<XRHitTestTransientInputSubscriptionResultDataPtr> transient_input_results);

XRHitTestSubscriptionResultsData(const XRHitTestSubscriptionResultsData&) = delete;
XRHitTestSubscriptionResultsData& operator=(const XRHitTestSubscriptionResultsData&) = delete;

  ~XRHitTestSubscriptionResultsData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRHitTestSubscriptionResultsDataPtr>
  XRHitTestSubscriptionResultsDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestSubscriptionResultsData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRHitTestSubscriptionResultsData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRHitTestSubscriptionResultsData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRHitTestSubscriptionResultsData_UnserializedMessageContext<
            UserType, XRHitTestSubscriptionResultsData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRHitTestSubscriptionResultsData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRHitTestSubscriptionResultsData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRHitTestSubscriptionResultsData_UnserializedMessageContext<
            UserType, XRHitTestSubscriptionResultsData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRHitTestSubscriptionResultsData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<XRHitTestSubscriptionResultDataPtr> results;
  
  std::vector<XRHitTestTransientInputSubscriptionResultDataPtr> transient_input_results;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRSphericalHarmonics {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRSphericalHarmonics, T>::value>;
  using DataView = XRSphericalHarmonicsDataView;
  using Data_ = internal::XRSphericalHarmonics_Data;

  template <typename... Args>
  static XRSphericalHarmonicsPtr New(Args&&... args) {
    return XRSphericalHarmonicsPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRSphericalHarmonicsPtr From(const U& u) {
    return mojo::TypeConverter<XRSphericalHarmonicsPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRSphericalHarmonics>::Convert(*this);
  }


  XRSphericalHarmonics();

  explicit XRSphericalHarmonics(
      std::vector<::device::RgbTupleF32> coefficients);


  ~XRSphericalHarmonics();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRSphericalHarmonicsPtr>
  XRSphericalHarmonicsPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRSphericalHarmonics::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRSphericalHarmonics::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRSphericalHarmonics::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRSphericalHarmonics_UnserializedMessageContext<
            UserType, XRSphericalHarmonics::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRSphericalHarmonics::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRSphericalHarmonics::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRSphericalHarmonics_UnserializedMessageContext<
            UserType, XRSphericalHarmonics::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRSphericalHarmonics::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<::device::RgbTupleF32> coefficients;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRSphericalHarmonics::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRCubeMap {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRCubeMap, T>::value>;
  using DataView = XRCubeMapDataView;
  using Data_ = internal::XRCubeMap_Data;
  
  static constexpr uint64_t kNumComponentsPerPixel = 4ULL;

  template <typename... Args>
  static XRCubeMapPtr New(Args&&... args) {
    return XRCubeMapPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRCubeMapPtr From(const U& u) {
    return mojo::TypeConverter<XRCubeMapPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRCubeMap>::Convert(*this);
  }


  XRCubeMap();

  XRCubeMap(
      uint32_t width_and_height,
      std::vector<uint16_t> positive_x,
      std::vector<uint16_t> negative_x,
      std::vector<uint16_t> positive_y,
      std::vector<uint16_t> negative_y,
      std::vector<uint16_t> positive_z,
      std::vector<uint16_t> negative_z);


  ~XRCubeMap();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRCubeMapPtr>
  XRCubeMapPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCubeMap::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCubeMap::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRCubeMap::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRCubeMap_UnserializedMessageContext<
            UserType, XRCubeMap::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRCubeMap::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRCubeMap::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRCubeMap_UnserializedMessageContext<
            UserType, XRCubeMap::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRCubeMap::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint32_t width_and_height;
  
  std::vector<uint16_t> positive_x;
  
  std::vector<uint16_t> negative_x;
  
  std::vector<uint16_t> positive_y;
  
  std::vector<uint16_t> negative_y;
  
  std::vector<uint16_t> positive_z;
  
  std::vector<uint16_t> negative_z;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRCubeMap::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLightProbe {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLightProbe, T>::value>;
  using DataView = XRLightProbeDataView;
  using Data_ = internal::XRLightProbe_Data;

  template <typename... Args>
  static XRLightProbePtr New(Args&&... args) {
    return XRLightProbePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLightProbePtr From(const U& u) {
    return mojo::TypeConverter<XRLightProbePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLightProbe>::Convert(*this);
  }


  XRLightProbe();

  XRLightProbe(
      XRSphericalHarmonicsPtr spherical_harmonics,
      const ::gfx::Vector3dF& main_light_direction,
      const ::device::RgbTupleF32& main_light_intensity);

XRLightProbe(const XRLightProbe&) = delete;
XRLightProbe& operator=(const XRLightProbe&) = delete;

  ~XRLightProbe();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLightProbePtr>
  XRLightProbePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLightProbe::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLightProbe::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLightProbe::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLightProbe_UnserializedMessageContext<
            UserType, XRLightProbe::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLightProbe::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLightProbe::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLightProbe_UnserializedMessageContext<
            UserType, XRLightProbe::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLightProbe::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRSphericalHarmonicsPtr spherical_harmonics;
  
  ::gfx::Vector3dF main_light_direction;
  
  ::device::RgbTupleF32 main_light_intensity;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLightProbe::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRReflectionProbe {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRReflectionProbe, T>::value>;
  using DataView = XRReflectionProbeDataView;
  using Data_ = internal::XRReflectionProbe_Data;

  template <typename... Args>
  static XRReflectionProbePtr New(Args&&... args) {
    return XRReflectionProbePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRReflectionProbePtr From(const U& u) {
    return mojo::TypeConverter<XRReflectionProbePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRReflectionProbe>::Convert(*this);
  }


  XRReflectionProbe();

  explicit XRReflectionProbe(
      XRCubeMapPtr cube_map);

XRReflectionProbe(const XRReflectionProbe&) = delete;
XRReflectionProbe& operator=(const XRReflectionProbe&) = delete;

  ~XRReflectionProbe();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRReflectionProbePtr>
  XRReflectionProbePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRReflectionProbe::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRReflectionProbe::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRReflectionProbe::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRReflectionProbe_UnserializedMessageContext<
            UserType, XRReflectionProbe::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRReflectionProbe::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRReflectionProbe::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRReflectionProbe_UnserializedMessageContext<
            UserType, XRReflectionProbe::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRReflectionProbe::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRCubeMapPtr cube_map;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRReflectionProbe::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLightEstimationData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLightEstimationData, T>::value>;
  using DataView = XRLightEstimationDataDataView;
  using Data_ = internal::XRLightEstimationData_Data;

  template <typename... Args>
  static XRLightEstimationDataPtr New(Args&&... args) {
    return XRLightEstimationDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLightEstimationDataPtr From(const U& u) {
    return mojo::TypeConverter<XRLightEstimationDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLightEstimationData>::Convert(*this);
  }


  XRLightEstimationData();

  XRLightEstimationData(
      XRLightProbePtr light_probe,
      XRReflectionProbePtr reflection_probe);

XRLightEstimationData(const XRLightEstimationData&) = delete;
XRLightEstimationData& operator=(const XRLightEstimationData&) = delete;

  ~XRLightEstimationData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLightEstimationDataPtr>
  XRLightEstimationDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLightEstimationData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLightEstimationData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLightEstimationData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLightEstimationData_UnserializedMessageContext<
            UserType, XRLightEstimationData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLightEstimationData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLightEstimationData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLightEstimationData_UnserializedMessageContext<
            UserType, XRLightEstimationData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLightEstimationData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRLightProbePtr light_probe;
  
  XRReflectionProbePtr reflection_probe;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLightEstimationData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRDepthDataUpdated {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRDepthDataUpdated, T>::value>;
  using DataView = XRDepthDataUpdatedDataView;
  using Data_ = internal::XRDepthDataUpdated_Data;

  template <typename... Args>
  static XRDepthDataUpdatedPtr New(Args&&... args) {
    return XRDepthDataUpdatedPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRDepthDataUpdatedPtr From(const U& u) {
    return mojo::TypeConverter<XRDepthDataUpdatedPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRDepthDataUpdated>::Convert(*this);
  }


  XRDepthDataUpdated();

  XRDepthDataUpdated(
      ::mojo_base::BigBuffer pixel_data,
      const ::gfx::Transform& norm_texture_from_norm_view,
      const ::gfx::Size& size,
      float raw_value_to_meters,
      XRViewGeometryPtr view_geometry);

XRDepthDataUpdated(const XRDepthDataUpdated&) = delete;
XRDepthDataUpdated& operator=(const XRDepthDataUpdated&) = delete;

  ~XRDepthDataUpdated();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRDepthDataUpdatedPtr>
  XRDepthDataUpdatedPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRDepthDataUpdated::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRDepthDataUpdated_UnserializedMessageContext<
            UserType, XRDepthDataUpdated::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRDepthDataUpdated::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRDepthDataUpdated::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRDepthDataUpdated_UnserializedMessageContext<
            UserType, XRDepthDataUpdated::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRDepthDataUpdated::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::mojo_base::BigBuffer pixel_data;
  
  ::gfx::Transform norm_texture_from_norm_view;
  
  ::gfx::Size size;
  
  float raw_value_to_meters;
  
  XRViewGeometryPtr view_geometry;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRDepthDataUpdated::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRTrackedImageData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRTrackedImageData, T>::value>;
  using DataView = XRTrackedImageDataDataView;
  using Data_ = internal::XRTrackedImageData_Data;

  template <typename... Args>
  static XRTrackedImageDataPtr New(Args&&... args) {
    return XRTrackedImageDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRTrackedImageDataPtr From(const U& u) {
    return mojo::TypeConverter<XRTrackedImageDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRTrackedImageData>::Convert(*this);
  }


  XRTrackedImageData();

  XRTrackedImageData(
      uint32_t index,
      const ::device::Pose& mojo_from_image,
      bool actively_tracked,
      float width_in_meters);


  ~XRTrackedImageData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRTrackedImageDataPtr>
  XRTrackedImageDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRTrackedImageData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRTrackedImageData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRTrackedImageData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRTrackedImageData_UnserializedMessageContext<
            UserType, XRTrackedImageData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRTrackedImageData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRTrackedImageData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRTrackedImageData_UnserializedMessageContext<
            UserType, XRTrackedImageData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRTrackedImageData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint32_t index;
  
  ::device::Pose mojo_from_image;
  
  bool actively_tracked;
  
  float width_in_meters;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRTrackedImageData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRTrackedImagesData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRTrackedImagesData, T>::value>;
  using DataView = XRTrackedImagesDataDataView;
  using Data_ = internal::XRTrackedImagesData_Data;

  template <typename... Args>
  static XRTrackedImagesDataPtr New(Args&&... args) {
    return XRTrackedImagesDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRTrackedImagesDataPtr From(const U& u) {
    return mojo::TypeConverter<XRTrackedImagesDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRTrackedImagesData>::Convert(*this);
  }


  XRTrackedImagesData();

  XRTrackedImagesData(
      std::vector<XRTrackedImageDataPtr> images_data,
      std::optional<std::vector<bool>> image_trackable_scores);

XRTrackedImagesData(const XRTrackedImagesData&) = delete;
XRTrackedImagesData& operator=(const XRTrackedImagesData&) = delete;

  ~XRTrackedImagesData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRTrackedImagesDataPtr>
  XRTrackedImagesDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRTrackedImagesData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRTrackedImagesData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRTrackedImagesData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRTrackedImagesData_UnserializedMessageContext<
            UserType, XRTrackedImagesData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRTrackedImagesData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRTrackedImagesData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRTrackedImagesData_UnserializedMessageContext<
            UserType, XRTrackedImagesData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRTrackedImagesData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::vector<XRTrackedImageDataPtr> images_data;
  
  std::optional<std::vector<bool>> image_trackable_scores;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRTrackedImagesData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}







class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRQuadLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRQuadLayerData, T>::value>;
  using DataView = XRQuadLayerDataDataView;
  using Data_ = internal::XRQuadLayerData_Data;

  template <typename... Args>
  static XRQuadLayerDataPtr New(Args&&... args) {
    return XRQuadLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRQuadLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XRQuadLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRQuadLayerData>::Convert(*this);
  }


  XRQuadLayerData();

  XRQuadLayerData(
      const ::gfx::Transform& native_origin_from_layer,
      float width,
      float height);


  ~XRQuadLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRQuadLayerDataPtr>
  XRQuadLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRQuadLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRQuadLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRQuadLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRQuadLayerData_UnserializedMessageContext<
            UserType, XRQuadLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRQuadLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRQuadLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRQuadLayerData_UnserializedMessageContext<
            UserType, XRQuadLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRQuadLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Transform native_origin_from_layer;
  
  float width;
  
  float height;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRQuadLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRCylinderLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRCylinderLayerData, T>::value>;
  using DataView = XRCylinderLayerDataDataView;
  using Data_ = internal::XRCylinderLayerData_Data;

  template <typename... Args>
  static XRCylinderLayerDataPtr New(Args&&... args) {
    return XRCylinderLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRCylinderLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XRCylinderLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRCylinderLayerData>::Convert(*this);
  }


  XRCylinderLayerData();

  XRCylinderLayerData(
      const ::gfx::Transform& native_origin_from_layer,
      float radius,
      float central_angle,
      float aspect_ratio);


  ~XRCylinderLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRCylinderLayerDataPtr>
  XRCylinderLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCylinderLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCylinderLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRCylinderLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRCylinderLayerData_UnserializedMessageContext<
            UserType, XRCylinderLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRCylinderLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRCylinderLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRCylinderLayerData_UnserializedMessageContext<
            UserType, XRCylinderLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRCylinderLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Transform native_origin_from_layer;
  
  float radius;
  
  float central_angle;
  
  float aspect_ratio;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRCylinderLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XREquirectLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XREquirectLayerData, T>::value>;
  using DataView = XREquirectLayerDataDataView;
  using Data_ = internal::XREquirectLayerData_Data;

  template <typename... Args>
  static XREquirectLayerDataPtr New(Args&&... args) {
    return XREquirectLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XREquirectLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XREquirectLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XREquirectLayerData>::Convert(*this);
  }


  XREquirectLayerData();

  XREquirectLayerData(
      const ::gfx::Transform& native_origin_from_layer,
      float radius,
      float central_horizontal_angle,
      float upper_vertical_angle,
      float lower_vertical_angle);


  ~XREquirectLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XREquirectLayerDataPtr>
  XREquirectLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XREquirectLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XREquirectLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XREquirectLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XREquirectLayerData_UnserializedMessageContext<
            UserType, XREquirectLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XREquirectLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XREquirectLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XREquirectLayerData_UnserializedMessageContext<
            UserType, XREquirectLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XREquirectLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Transform native_origin_from_layer;
  
  float radius;
  
  float central_horizontal_angle;
  
  float upper_vertical_angle;
  
  float lower_vertical_angle;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XREquirectLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRCubeLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRCubeLayerData, T>::value>;
  using DataView = XRCubeLayerDataDataView;
  using Data_ = internal::XRCubeLayerData_Data;

  template <typename... Args>
  static XRCubeLayerDataPtr New(Args&&... args) {
    return XRCubeLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRCubeLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XRCubeLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRCubeLayerData>::Convert(*this);
  }


  XRCubeLayerData();

  explicit XRCubeLayerData(
      const ::gfx::Quaternion& orientation);


  ~XRCubeLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRCubeLayerDataPtr>
  XRCubeLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCubeLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCubeLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRCubeLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRCubeLayerData_UnserializedMessageContext<
            UserType, XRCubeLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRCubeLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRCubeLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRCubeLayerData_UnserializedMessageContext<
            UserType, XRCubeLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRCubeLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::gfx::Quaternion orientation;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRCubeLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerReadOnlyData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLayerReadOnlyData, T>::value>;
  using DataView = XRLayerReadOnlyDataDataView;
  using Data_ = internal::XRLayerReadOnlyData_Data;

  template <typename... Args>
  static XRLayerReadOnlyDataPtr New(Args&&... args) {
    return XRLayerReadOnlyDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLayerReadOnlyDataPtr From(const U& u) {
    return mojo::TypeConverter<XRLayerReadOnlyDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLayerReadOnlyData>::Convert(*this);
  }


  XRLayerReadOnlyData();

  XRLayerReadOnlyData(
      const ::device::LayerId& layer_id,
      XRLayerLayout layout,
      uint32_t texture_width,
      uint32_t texture_height,
      bool is_static,
      bool flip_y,
      bool needs_raster_access);


  ~XRLayerReadOnlyData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLayerReadOnlyDataPtr>
  XRLayerReadOnlyDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerReadOnlyData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerReadOnlyData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLayerReadOnlyData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLayerReadOnlyData_UnserializedMessageContext<
            UserType, XRLayerReadOnlyData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLayerReadOnlyData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLayerReadOnlyData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLayerReadOnlyData_UnserializedMessageContext<
            UserType, XRLayerReadOnlyData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLayerReadOnlyData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::LayerId layer_id;
  
  XRLayerLayout layout;
  
  uint32_t texture_width;
  
  uint32_t texture_height;
  
  bool is_static;
  
  bool flip_y;
  
  bool needs_raster_access;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLayerReadOnlyData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerMutableData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLayerMutableData, T>::value>;
  using DataView = XRLayerMutableDataDataView;
  using Data_ = internal::XRLayerMutableData_Data;

  template <typename... Args>
  static XRLayerMutableDataPtr New(Args&&... args) {
    return XRLayerMutableDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLayerMutableDataPtr From(const U& u) {
    return mojo::TypeConverter<XRLayerMutableDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLayerMutableData>::Convert(*this);
  }


  XRLayerMutableData();

  XRLayerMutableData(
      bool blend_texture_source_alpha,
      bool force_mono_presentation,
      float opacity,
      XRNativeOriginInformationPtr native_origin_information,
      XRLayerSpecificDataPtr layer_data);

XRLayerMutableData(const XRLayerMutableData&) = delete;
XRLayerMutableData& operator=(const XRLayerMutableData&) = delete;

  ~XRLayerMutableData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLayerMutableDataPtr>
  XRLayerMutableDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerMutableData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerMutableData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLayerMutableData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLayerMutableData_UnserializedMessageContext<
            UserType, XRLayerMutableData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLayerMutableData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLayerMutableData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLayerMutableData_UnserializedMessageContext<
            UserType, XRLayerMutableData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLayerMutableData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  bool blend_texture_source_alpha;
  
  bool force_mono_presentation;
  
  float opacity;
  
  XRNativeOriginInformationPtr native_origin_information;
  
  XRLayerSpecificDataPtr layer_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLayerMutableData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRCompositionLayerData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRCompositionLayerData, T>::value>;
  using DataView = XRCompositionLayerDataDataView;
  using Data_ = internal::XRCompositionLayerData_Data;

  template <typename... Args>
  static XRCompositionLayerDataPtr New(Args&&... args) {
    return XRCompositionLayerDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRCompositionLayerDataPtr From(const U& u) {
    return mojo::TypeConverter<XRCompositionLayerDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRCompositionLayerData>::Convert(*this);
  }


  XRCompositionLayerData();

  XRCompositionLayerData(
      XRLayerReadOnlyDataPtr read_only_data,
      XRLayerMutableDataPtr mutable_data);

XRCompositionLayerData(const XRCompositionLayerData&) = delete;
XRCompositionLayerData& operator=(const XRCompositionLayerData&) = delete;

  ~XRCompositionLayerData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRCompositionLayerDataPtr>
  XRCompositionLayerDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCompositionLayerData::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRCompositionLayerData::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRCompositionLayerData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRCompositionLayerData_UnserializedMessageContext<
            UserType, XRCompositionLayerData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRCompositionLayerData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRCompositionLayerData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRCompositionLayerData_UnserializedMessageContext<
            UserType, XRCompositionLayerData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRCompositionLayerData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRLayerReadOnlyDataPtr read_only_data;
  
  XRLayerMutableDataPtr mutable_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRCompositionLayerData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerFrameData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLayerFrameData, T>::value>;
  using DataView = XRLayerFrameDataDataView;
  using Data_ = internal::XRLayerFrameData_Data;

  template <typename... Args>
  static XRLayerFrameDataPtr New(Args&&... args) {
    return XRLayerFrameDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLayerFrameDataPtr From(const U& u) {
    return mojo::TypeConverter<XRLayerFrameDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLayerFrameData>::Convert(*this);
  }


  XRLayerFrameData();

  XRLayerFrameData(
      const ::device::LayerId& layer_id,
      ::gpu::ExportedSharedImage buffer_shared_image,
      const ::gpu::SyncToken& buffer_sync_token);

XRLayerFrameData(const XRLayerFrameData&) = delete;
XRLayerFrameData& operator=(const XRLayerFrameData&) = delete;

  ~XRLayerFrameData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLayerFrameDataPtr>
  XRLayerFrameDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLayerFrameData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLayerFrameData_UnserializedMessageContext<
            UserType, XRLayerFrameData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLayerFrameData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLayerFrameData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLayerFrameData_UnserializedMessageContext<
            UserType, XRLayerFrameData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLayerFrameData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::LayerId layer_id;
  
  ::gpu::ExportedSharedImage buffer_shared_image;
  
  ::gpu::SyncToken buffer_sync_token;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLayerFrameData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRRenderInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRRenderInfo, T>::value>;
  using DataView = XRRenderInfoDataView;
  using Data_ = internal::XRRenderInfo_Data;

  template <typename... Args>
  static XRRenderInfoPtr New(Args&&... args) {
    return XRRenderInfoPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRRenderInfoPtr From(const U& u) {
    return mojo::TypeConverter<XRRenderInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRRenderInfo>::Convert(*this);
  }


  XRRenderInfo();

  XRRenderInfo(
      int16_t frame_id,
      VRPosePtr mojo_from_viewer,
      std::vector<XRViewPtr> views);

XRRenderInfo(const XRRenderInfo&) = delete;
XRRenderInfo& operator=(const XRRenderInfo&) = delete;

  ~XRRenderInfo();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRRenderInfoPtr>
  XRRenderInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRRenderInfo::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRRenderInfo_UnserializedMessageContext<
            UserType, XRRenderInfo::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRRenderInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRRenderInfo::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRRenderInfo_UnserializedMessageContext<
            UserType, XRRenderInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRRenderInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  int16_t frame_id;
  
  VRPosePtr mojo_from_viewer;
  
  std::vector<XRViewPtr> views;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRRenderInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRFrameData {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRFrameData, T>::value>;
  using DataView = XRFrameDataDataView;
  using Data_ = internal::XRFrameData_Data;

  template <typename... Args>
  static XRFrameDataPtr New(Args&&... args) {
    return XRFrameDataPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRFrameDataPtr From(const U& u) {
    return mojo::TypeConverter<XRFrameDataPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRFrameData>::Convert(*this);
  }


  XRFrameData();

  XRFrameData(
      XRRenderInfoPtr render_info,
      ::base::TimeDelta time_delta,
      std::optional<::gpu::ExportedSharedImage> buffer_shared_image,
      const std::optional<::gpu::SyncToken>& buffer_sync_token,
      std::optional<::gpu::ExportedSharedImage> camera_image_buffer_shared_image,
      const std::optional<::gpu::SyncToken>& camera_image_buffer_sync_token,
      const std::optional<::gfx::Size>& camera_image_size,
      bool mojo_space_reset,
      const std::optional<::gfx::Transform>& mojo_from_floor,
      std::optional<std::vector<XRInputSourceStatePtr>> input_state,
      uint32_t stage_parameters_id,
      VRStageParametersPtr stage_parameters,
      XRPlaneDetectionDataPtr detected_planes_data,
      XRMeshDetectionDataPtr detected_meshes_data,
      XRAnchorsDataPtr anchors_data,
      std::optional<std::vector<XRLayerFrameDataPtr>> composition_layers_data,
      XRLightEstimationDataPtr light_estimation_data,
      XRHitTestSubscriptionResultsDataPtr hit_test_subscription_results,
      float rendering_time_ratio,
      XRTrackedImagesDataPtr tracked_images);

XRFrameData(const XRFrameData&) = delete;
XRFrameData& operator=(const XRFrameData&) = delete;

  ~XRFrameData();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRFrameDataPtr>
  XRFrameDataPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRFrameData::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRFrameData_UnserializedMessageContext<
            UserType, XRFrameData::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRFrameData::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRFrameData::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRFrameData_UnserializedMessageContext<
            UserType, XRFrameData::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRFrameData::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRRenderInfoPtr render_info;
  
  ::base::TimeDelta time_delta;
  
  std::optional<::gpu::ExportedSharedImage> buffer_shared_image;
  
  std::optional<::gpu::SyncToken> buffer_sync_token;
  
  std::optional<::gpu::ExportedSharedImage> camera_image_buffer_shared_image;
  
  std::optional<::gpu::SyncToken> camera_image_buffer_sync_token;
  
  std::optional<::gfx::Size> camera_image_size;
  
  bool mojo_space_reset;
  
  std::optional<::gfx::Transform> mojo_from_floor;
  
  std::optional<std::vector<XRInputSourceStatePtr>> input_state;
  
  uint32_t stage_parameters_id;
  
  VRStageParametersPtr stage_parameters;
  
  XRPlaneDetectionDataPtr detected_planes_data;
  
  XRMeshDetectionDataPtr detected_meshes_data;
  
  XRAnchorsDataPtr anchors_data;
  
  std::optional<std::vector<XRLayerFrameDataPtr>> composition_layers_data;
  
  XRLightEstimationDataPtr light_estimation_data;
  
  XRHitTestSubscriptionResultsDataPtr hit_test_subscription_results;
  
  float rendering_time_ratio;
  
  XRTrackedImagesDataPtr tracked_images;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRFrameData::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) RequestSessionSuccess {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<RequestSessionSuccess, T>::value>;
  using DataView = RequestSessionSuccessDataView;
  using Data_ = internal::RequestSessionSuccess_Data;

  template <typename... Args>
  static RequestSessionSuccessPtr New(Args&&... args) {
    return RequestSessionSuccessPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static RequestSessionSuccessPtr From(const U& u) {
    return mojo::TypeConverter<RequestSessionSuccessPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, RequestSessionSuccess>::Convert(*this);
  }


  RequestSessionSuccess();

  RequestSessionSuccess(
      XRSessionPtr session,
      uint64_t trace_id,
      ::mojo::PendingRemote<XRSessionMetricsRecorder> metrics_recorder,
      ::mojo::PendingRemote<WebXrInternalsRendererListener> xr_internals_listener);

RequestSessionSuccess(const RequestSessionSuccess&) = delete;
RequestSessionSuccess& operator=(const RequestSessionSuccess&) = delete;

  ~RequestSessionSuccess();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = RequestSessionSuccessPtr>
  RequestSessionSuccessPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        RequestSessionSuccess::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::RequestSessionSuccess_UnserializedMessageContext<
            UserType, RequestSessionSuccess::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<RequestSessionSuccess::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return RequestSessionSuccess::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::RequestSessionSuccess_UnserializedMessageContext<
            UserType, RequestSessionSuccess::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<RequestSessionSuccess::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  XRSessionPtr session;
  
  uint64_t trace_id;
  
  ::mojo::PendingRemote<XRSessionMetricsRecorder> metrics_recorder;
  
  ::mojo::PendingRemote<WebXrInternalsRendererListener> xr_internals_listener;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, RequestSessionSuccess::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) XRLayerUpdate {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<XRLayerUpdate, T>::value>;
  using DataView = XRLayerUpdateDataView;
  using Data_ = internal::XRLayerUpdate_Data;

  template <typename... Args>
  static XRLayerUpdatePtr New(Args&&... args) {
    return XRLayerUpdatePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static XRLayerUpdatePtr From(const U& u) {
    return mojo::TypeConverter<XRLayerUpdatePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, XRLayerUpdate>::Convert(*this);
  }


  XRLayerUpdate();

  XRLayerUpdate(
      const ::device::LayerId& layer_id,
      ::gpu::SharedImageExportResult shared_image_export_result);

XRLayerUpdate(const XRLayerUpdate&) = delete;
XRLayerUpdate& operator=(const XRLayerUpdate&) = delete;

  ~XRLayerUpdate();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = XRLayerUpdatePtr>
  XRLayerUpdatePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerUpdate::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        XRLayerUpdate::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        XRLayerUpdate::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::XRLayerUpdate_UnserializedMessageContext<
            UserType, XRLayerUpdate::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<XRLayerUpdate::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return XRLayerUpdate::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::XRLayerUpdate_UnserializedMessageContext<
            UserType, XRLayerUpdate::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<XRLayerUpdate::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::LayerId layer_id;
  
  ::gpu::SharedImageExportResult shared_image_export_result;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, XRLayerUpdate::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}

template <typename UnionPtrType>
XRNativeOriginInformationPtr XRNativeOriginInformation::Clone() const {
  switch (tag_) {
    case Tag::kInputSourceSpaceInfo:
      return NewInputSourceSpaceInfo(
          mojo::Clone(data_.input_source_space_info));
    case Tag::kPlaneId:
      return NewPlaneId(
          mojo::Clone(data_.plane_id));
    case Tag::kMeshId:
      return NewMeshId(
          mojo::Clone(data_.mesh_id));
    case Tag::kAnchorId:
      return NewAnchorId(
          mojo::Clone(data_.anchor_id));
    case Tag::kReferenceSpaceType:
      return NewReferenceSpaceType(
          mojo::Clone(data_.reference_space_type));
    case Tag::kHandJointSpaceInfo:
      return NewHandJointSpaceInfo(
          mojo::Clone(data_.hand_joint_space_info));
    case Tag::kImageIndex:
      return NewImageIndex(
          mojo::Clone(data_.image_index));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, XRNativeOriginInformation>::value>::type*>
bool XRNativeOriginInformation::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kInputSourceSpaceInfo:
      return mojo::Equals(data_.input_source_space_info, other.data_.input_source_space_info);
    case Tag::kPlaneId:
      return mojo::Equals(data_.plane_id, other.data_.plane_id);
    case Tag::kMeshId:
      return mojo::Equals(data_.mesh_id, other.data_.mesh_id);
    case Tag::kAnchorId:
      return mojo::Equals(data_.anchor_id, other.data_.anchor_id);
    case Tag::kReferenceSpaceType:
      return mojo::Equals(data_.reference_space_type, other.data_.reference_space_type);
    case Tag::kHandJointSpaceInfo:
      return mojo::Equals(data_.hand_joint_space_info, other.data_.hand_joint_space_info);
    case Tag::kImageIndex:
      return mojo::Equals(data_.image_index, other.data_.image_index);
  }

  return false;
}
template <typename UnionPtrType>
XRDepthDataPtr XRDepthData::Clone() const {
  switch (tag_) {
    case Tag::kDataStillValid:
      return NewDataStillValid(
          mojo::Clone(data_.data_still_valid));
    case Tag::kUpdatedDepthData:
      return NewUpdatedDepthData(
          mojo::Clone(data_.updated_depth_data));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, XRDepthData>::value>::type*>
bool XRDepthData::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kDataStillValid:
      return mojo::Equals(data_.data_still_valid, other.data_.data_still_valid);
    case Tag::kUpdatedDepthData:
      return mojo::Equals(data_.updated_depth_data, other.data_.updated_depth_data);
  }

  return false;
}
template <typename UnionPtrType>
XRLayerSpecificDataPtr XRLayerSpecificData::Clone() const {
  switch (tag_) {
    case Tag::kProjection:
      return NewProjection(
          mojo::Clone(data_.projection));
    case Tag::kQuad:
      return NewQuad(
          mojo::Clone(data_.quad));
    case Tag::kCylinder:
      return NewCylinder(
          mojo::Clone(data_.cylinder));
    case Tag::kEquirect:
      return NewEquirect(
          mojo::Clone(data_.equirect));
    case Tag::kCube:
      return NewCube(
          mojo::Clone(data_.cube));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, XRLayerSpecificData>::value>::type*>
bool XRLayerSpecificData::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kProjection:
      return mojo::Equals(data_.projection, other.data_.projection);
    case Tag::kQuad:
      return mojo::Equals(data_.quad, other.data_.quad);
    case Tag::kCylinder:
      return mojo::Equals(data_.cylinder, other.data_.cylinder);
    case Tag::kEquirect:
      return mojo::Equals(data_.equirect, other.data_.equirect);
    case Tag::kCube:
      return mojo::Equals(data_.cube, other.data_.cube);
  }

  return false;
}
template <typename UnionPtrType>
RequestSessionResultPtr RequestSessionResult::Clone() const {
  switch (tag_) {
    case Tag::kSuccess:
      return NewSuccess(
          mojo::Clone(data_.success));
    case Tag::kFailureReason:
      return NewFailureReason(
          mojo::Clone(data_.failure_reason));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, RequestSessionResult>::value>::type*>
bool RequestSessionResult::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kSuccess:
      return mojo::Equals(data_.success, other.data_.success);
    case Tag::kFailureReason:
      return mojo::Equals(data_.failure_reason, other.data_.failure_reason);
  }

  return false;
}
template <typename StructPtrType>
XRDepthConfigPtr XRDepthConfig::Clone() const {
  return New(
      mojo::Clone(depth_usage),
      mojo::Clone(depth_data_format),
      mojo::Clone(depth_type)
  );
}

template <typename T, XRDepthConfig::EnableIfSame<T>*>
bool XRDepthConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->depth_usage, other_struct.depth_usage))
    return false;
  if (!mojo::Equals(this->depth_data_format, other_struct.depth_data_format))
    return false;
  if (!mojo::Equals(this->depth_type, other_struct.depth_type))
    return false;
  return true;
}

template <typename T, XRDepthConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.depth_usage < rhs.depth_usage)
    return true;
  if (rhs.depth_usage < lhs.depth_usage)
    return false;
  if (lhs.depth_data_format < rhs.depth_data_format)
    return true;
  if (rhs.depth_data_format < lhs.depth_data_format)
    return false;
  if (lhs.depth_type < rhs.depth_type)
    return true;
  if (rhs.depth_type < lhs.depth_type)
    return false;
  return false;
}
template <typename StructPtrType>
XRSessionDeviceConfigPtr XRSessionDeviceConfig::Clone() const {
  return New(
      mojo::Clone(default_framebuffer_scale),
      mojo::Clone(views),
      mojo::Clone(supports_viewport_scaling),
      mojo::Clone(enable_anti_aliasing),
      mojo::Clone(depth_configuration),
      mojo::Clone(max_render_layers)
  );
}

template <typename T, XRSessionDeviceConfig::EnableIfSame<T>*>
bool XRSessionDeviceConfig::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->default_framebuffer_scale, other_struct.default_framebuffer_scale))
    return false;
  if (!mojo::Equals(this->views, other_struct.views))
    return false;
  if (!mojo::Equals(this->supports_viewport_scaling, other_struct.supports_viewport_scaling))
    return false;
  if (!mojo::Equals(this->enable_anti_aliasing, other_struct.enable_anti_aliasing))
    return false;
  if (!mojo::Equals(this->depth_configuration, other_struct.depth_configuration))
    return false;
  if (!mojo::Equals(this->max_render_layers, other_struct.max_render_layers))
    return false;
  return true;
}

template <typename T, XRSessionDeviceConfig::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.default_framebuffer_scale < rhs.default_framebuffer_scale)
    return true;
  if (rhs.default_framebuffer_scale < lhs.default_framebuffer_scale)
    return false;
  if (lhs.views < rhs.views)
    return true;
  if (rhs.views < lhs.views)
    return false;
  if (lhs.supports_viewport_scaling < rhs.supports_viewport_scaling)
    return true;
  if (rhs.supports_viewport_scaling < lhs.supports_viewport_scaling)
    return false;
  if (lhs.enable_anti_aliasing < rhs.enable_anti_aliasing)
    return true;
  if (rhs.enable_anti_aliasing < lhs.enable_anti_aliasing)
    return false;
  if (lhs.depth_configuration < rhs.depth_configuration)
    return true;
  if (rhs.depth_configuration < lhs.depth_configuration)
    return false;
  if (lhs.max_render_layers < rhs.max_render_layers)
    return true;
  if (rhs.max_render_layers < lhs.max_render_layers)
    return false;
  return false;
}
template <typename StructPtrType>
XRSessionPtr XRSession::Clone() const {
  return New(
      mojo::Clone(data_provider),
      mojo::Clone(layer_manager),
      mojo::Clone(client_receiver),
      mojo::Clone(submit_frame_sink),
      mojo::Clone(enabled_features),
      mojo::Clone(device_config),
      mojo::Clone(enviroment_blend_mode),
      mojo::Clone(interaction_mode),
      mojo::Clone(wants_fullscreen)
  );
}

template <typename T, XRSession::EnableIfSame<T>*>
bool XRSession::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->data_provider, other_struct.data_provider))
    return false;
  if (!mojo::Equals(this->layer_manager, other_struct.layer_manager))
    return false;
  if (!mojo::Equals(this->client_receiver, other_struct.client_receiver))
    return false;
  if (!mojo::Equals(this->submit_frame_sink, other_struct.submit_frame_sink))
    return false;
  if (!mojo::Equals(this->enabled_features, other_struct.enabled_features))
    return false;
  if (!mojo::Equals(this->device_config, other_struct.device_config))
    return false;
  if (!mojo::Equals(this->enviroment_blend_mode, other_struct.enviroment_blend_mode))
    return false;
  if (!mojo::Equals(this->interaction_mode, other_struct.interaction_mode))
    return false;
  if (!mojo::Equals(this->wants_fullscreen, other_struct.wants_fullscreen))
    return false;
  return true;
}

template <typename T, XRSession::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.data_provider < rhs.data_provider)
    return true;
  if (rhs.data_provider < lhs.data_provider)
    return false;
  if (lhs.layer_manager < rhs.layer_manager)
    return true;
  if (rhs.layer_manager < lhs.layer_manager)
    return false;
  if (lhs.client_receiver < rhs.client_receiver)
    return true;
  if (rhs.client_receiver < lhs.client_receiver)
    return false;
  if (lhs.submit_frame_sink < rhs.submit_frame_sink)
    return true;
  if (rhs.submit_frame_sink < lhs.submit_frame_sink)
    return false;
  if (lhs.enabled_features < rhs.enabled_features)
    return true;
  if (rhs.enabled_features < lhs.enabled_features)
    return false;
  if (lhs.device_config < rhs.device_config)
    return true;
  if (rhs.device_config < lhs.device_config)
    return false;
  if (lhs.enviroment_blend_mode < rhs.enviroment_blend_mode)
    return true;
  if (rhs.enviroment_blend_mode < lhs.enviroment_blend_mode)
    return false;
  if (lhs.interaction_mode < rhs.interaction_mode)
    return true;
  if (rhs.interaction_mode < lhs.interaction_mode)
    return false;
  if (lhs.wants_fullscreen < rhs.wants_fullscreen)
    return true;
  if (rhs.wants_fullscreen < lhs.wants_fullscreen)
    return false;
  return false;
}
template <typename StructPtrType>
XRPresentationConnectionPtr XRPresentationConnection::Clone() const {
  return New(
      mojo::Clone(provider),
      mojo::Clone(client_receiver),
      mojo::Clone(transport_options)
  );
}

template <typename T, XRPresentationConnection::EnableIfSame<T>*>
bool XRPresentationConnection::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->provider, other_struct.provider))
    return false;
  if (!mojo::Equals(this->client_receiver, other_struct.client_receiver))
    return false;
  if (!mojo::Equals(this->transport_options, other_struct.transport_options))
    return false;
  return true;
}

template <typename T, XRPresentationConnection::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.provider < rhs.provider)
    return true;
  if (rhs.provider < lhs.provider)
    return false;
  if (lhs.client_receiver < rhs.client_receiver)
    return true;
  if (rhs.client_receiver < lhs.client_receiver)
    return false;
  if (lhs.transport_options < rhs.transport_options)
    return true;
  if (rhs.transport_options < lhs.transport_options)
    return false;
  return false;
}
template <typename StructPtrType>
XRInputSourceDescriptionPtr XRInputSourceDescription::Clone() const {
  return New(
      mojo::Clone(target_ray_mode),
      mojo::Clone(handedness),
      mojo::Clone(input_from_pointer),
      mojo::Clone(profiles)
  );
}

template <typename T, XRInputSourceDescription::EnableIfSame<T>*>
bool XRInputSourceDescription::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->target_ray_mode, other_struct.target_ray_mode))
    return false;
  if (!mojo::Equals(this->handedness, other_struct.handedness))
    return false;
  if (!mojo::Equals(this->input_from_pointer, other_struct.input_from_pointer))
    return false;
  if (!mojo::Equals(this->profiles, other_struct.profiles))
    return false;
  return true;
}

template <typename T, XRInputSourceDescription::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.target_ray_mode < rhs.target_ray_mode)
    return true;
  if (rhs.target_ray_mode < lhs.target_ray_mode)
    return false;
  if (lhs.handedness < rhs.handedness)
    return true;
  if (rhs.handedness < lhs.handedness)
    return false;
  if (lhs.input_from_pointer < rhs.input_from_pointer)
    return true;
  if (rhs.input_from_pointer < lhs.input_from_pointer)
    return false;
  if (lhs.profiles < rhs.profiles)
    return true;
  if (rhs.profiles < lhs.profiles)
    return false;
  return false;
}
template <typename StructPtrType>
XRInputSourceStatePtr XRInputSourceState::Clone() const {
  return New(
      mojo::Clone(source_id),
      mojo::Clone(description),
      mojo::Clone(mojo_from_input),
      mojo::Clone(emulated_position),
      mojo::Clone(is_auxiliary),
      mojo::Clone(primary_input_pressed),
      mojo::Clone(primary_input_clicked),
      mojo::Clone(primary_squeeze_pressed),
      mojo::Clone(primary_squeeze_clicked),
      mojo::Clone(gamepad),
      mojo::Clone(overlay_pointer_position),
      mojo::Clone(hand_tracking_data)
  );
}

template <typename T, XRInputSourceState::EnableIfSame<T>*>
bool XRInputSourceState::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->source_id, other_struct.source_id))
    return false;
  if (!mojo::Equals(this->description, other_struct.description))
    return false;
  if (!mojo::Equals(this->mojo_from_input, other_struct.mojo_from_input))
    return false;
  if (!mojo::Equals(this->emulated_position, other_struct.emulated_position))
    return false;
  if (!mojo::Equals(this->is_auxiliary, other_struct.is_auxiliary))
    return false;
  if (!mojo::Equals(this->primary_input_pressed, other_struct.primary_input_pressed))
    return false;
  if (!mojo::Equals(this->primary_input_clicked, other_struct.primary_input_clicked))
    return false;
  if (!mojo::Equals(this->primary_squeeze_pressed, other_struct.primary_squeeze_pressed))
    return false;
  if (!mojo::Equals(this->primary_squeeze_clicked, other_struct.primary_squeeze_clicked))
    return false;
  if (!mojo::Equals(this->gamepad, other_struct.gamepad))
    return false;
  if (!mojo::Equals(this->overlay_pointer_position, other_struct.overlay_pointer_position))
    return false;
  if (!mojo::Equals(this->hand_tracking_data, other_struct.hand_tracking_data))
    return false;
  return true;
}

template <typename T, XRInputSourceState::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.source_id < rhs.source_id)
    return true;
  if (rhs.source_id < lhs.source_id)
    return false;
  if (lhs.description < rhs.description)
    return true;
  if (rhs.description < lhs.description)
    return false;
  if (lhs.mojo_from_input < rhs.mojo_from_input)
    return true;
  if (rhs.mojo_from_input < lhs.mojo_from_input)
    return false;
  if (lhs.emulated_position < rhs.emulated_position)
    return true;
  if (rhs.emulated_position < lhs.emulated_position)
    return false;
  if (lhs.is_auxiliary < rhs.is_auxiliary)
    return true;
  if (rhs.is_auxiliary < lhs.is_auxiliary)
    return false;
  if (lhs.primary_input_pressed < rhs.primary_input_pressed)
    return true;
  if (rhs.primary_input_pressed < lhs.primary_input_pressed)
    return false;
  if (lhs.primary_input_clicked < rhs.primary_input_clicked)
    return true;
  if (rhs.primary_input_clicked < lhs.primary_input_clicked)
    return false;
  if (lhs.primary_squeeze_pressed < rhs.primary_squeeze_pressed)
    return true;
  if (rhs.primary_squeeze_pressed < lhs.primary_squeeze_pressed)
    return false;
  if (lhs.primary_squeeze_clicked < rhs.primary_squeeze_clicked)
    return true;
  if (rhs.primary_squeeze_clicked < lhs.primary_squeeze_clicked)
    return false;
  if (lhs.gamepad < rhs.gamepad)
    return true;
  if (rhs.gamepad < lhs.gamepad)
    return false;
  if (lhs.overlay_pointer_position < rhs.overlay_pointer_position)
    return true;
  if (rhs.overlay_pointer_position < lhs.overlay_pointer_position)
    return false;
  if (lhs.hand_tracking_data < rhs.hand_tracking_data)
    return true;
  if (rhs.hand_tracking_data < lhs.hand_tracking_data)
    return false;
  return false;
}
template <typename StructPtrType>
VRFieldOfViewPtr VRFieldOfView::Clone() const {
  return New(
      mojo::Clone(up_degrees),
      mojo::Clone(down_degrees),
      mojo::Clone(left_degrees),
      mojo::Clone(right_degrees)
  );
}

template <typename T, VRFieldOfView::EnableIfSame<T>*>
bool VRFieldOfView::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->up_degrees, other_struct.up_degrees))
    return false;
  if (!mojo::Equals(this->down_degrees, other_struct.down_degrees))
    return false;
  if (!mojo::Equals(this->left_degrees, other_struct.left_degrees))
    return false;
  if (!mojo::Equals(this->right_degrees, other_struct.right_degrees))
    return false;
  return true;
}

template <typename T, VRFieldOfView::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.up_degrees < rhs.up_degrees)
    return true;
  if (rhs.up_degrees < lhs.up_degrees)
    return false;
  if (lhs.down_degrees < rhs.down_degrees)
    return true;
  if (rhs.down_degrees < lhs.down_degrees)
    return false;
  if (lhs.left_degrees < rhs.left_degrees)
    return true;
  if (rhs.left_degrees < lhs.left_degrees)
    return false;
  if (lhs.right_degrees < rhs.right_degrees)
    return true;
  if (rhs.right_degrees < lhs.right_degrees)
    return false;
  return false;
}
template <typename StructPtrType>
VRPosePtr VRPose::Clone() const {
  return New(
      mojo::Clone(orientation),
      mojo::Clone(position),
      mojo::Clone(emulated_position)
  );
}

template <typename T, VRPose::EnableIfSame<T>*>
bool VRPose::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->orientation, other_struct.orientation))
    return false;
  if (!mojo::Equals(this->position, other_struct.position))
    return false;
  if (!mojo::Equals(this->emulated_position, other_struct.emulated_position))
    return false;
  return true;
}

template <typename T, VRPose::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.orientation < rhs.orientation)
    return true;
  if (rhs.orientation < lhs.orientation)
    return false;
  if (lhs.position < rhs.position)
    return true;
  if (rhs.position < lhs.position)
    return false;
  if (lhs.emulated_position < rhs.emulated_position)
    return true;
  if (rhs.emulated_position < lhs.emulated_position)
    return false;
  return false;
}
template <typename StructPtrType>
PosePtr Pose::Clone() const {
  return New(
      mojo::Clone(orientation),
      mojo::Clone(position)
  );
}

template <typename T, Pose::EnableIfSame<T>*>
bool Pose::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->orientation, other_struct.orientation))
    return false;
  if (!mojo::Equals(this->position, other_struct.position))
    return false;
  return true;
}

template <typename T, Pose::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.orientation < rhs.orientation)
    return true;
  if (rhs.orientation < lhs.orientation)
    return false;
  if (lhs.position < rhs.position)
    return true;
  if (rhs.position < lhs.position)
    return false;
  return false;
}
template <typename StructPtrType>
AnchorIdPtr AnchorId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, AnchorId::EnableIfSame<T>*>
bool AnchorId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, AnchorId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
HitTestSubscriptionIdPtr HitTestSubscriptionId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, HitTestSubscriptionId::EnableIfSame<T>*>
bool HitTestSubscriptionId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, HitTestSubscriptionId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
PlaneIdPtr PlaneId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, PlaneId::EnableIfSame<T>*>
bool PlaneId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, PlaneId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
MeshIdPtr MeshId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, MeshId::EnableIfSame<T>*>
bool MeshId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, MeshId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
XrVisibilityMaskIdPtr XrVisibilityMaskId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, XrVisibilityMaskId::EnableIfSame<T>*>
bool XrVisibilityMaskId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, XrVisibilityMaskId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
XRRayPtr XRRay::Clone() const {
  return New(
      mojo::Clone(origin),
      mojo::Clone(direction)
  );
}

template <typename T, XRRay::EnableIfSame<T>*>
bool XRRay::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->origin, other_struct.origin))
    return false;
  if (!mojo::Equals(this->direction, other_struct.direction))
    return false;
  return true;
}

template <typename T, XRRay::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.origin < rhs.origin)
    return true;
  if (rhs.origin < lhs.origin)
    return false;
  if (lhs.direction < rhs.direction)
    return true;
  if (rhs.direction < lhs.direction)
    return false;
  return false;
}
template <typename StructPtrType>
XRHitResultPtr XRHitResult::Clone() const {
  return New(
      mojo::Clone(mojo_from_result),
      mojo::Clone(plane_id)
  );
}

template <typename T, XRHitResult::EnableIfSame<T>*>
bool XRHitResult::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->mojo_from_result, other_struct.mojo_from_result))
    return false;
  if (!mojo::Equals(this->plane_id, other_struct.plane_id))
    return false;
  return true;
}

template <typename T, XRHitResult::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.mojo_from_result < rhs.mojo_from_result)
    return true;
  if (rhs.mojo_from_result < lhs.mojo_from_result)
    return false;
  if (lhs.plane_id < rhs.plane_id)
    return true;
  if (rhs.plane_id < lhs.plane_id)
    return false;
  return false;
}
template <typename StructPtrType>
XRViewGeometryPtr XRViewGeometry::Clone() const {
  return New(
      mojo::Clone(field_of_view),
      mojo::Clone(mojo_from_view)
  );
}

template <typename T, XRViewGeometry::EnableIfSame<T>*>
bool XRViewGeometry::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->field_of_view, other_struct.field_of_view))
    return false;
  if (!mojo::Equals(this->mojo_from_view, other_struct.mojo_from_view))
    return false;
  return true;
}

template <typename T, XRViewGeometry::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.field_of_view < rhs.field_of_view)
    return true;
  if (rhs.field_of_view < lhs.field_of_view)
    return false;
  if (lhs.mojo_from_view < rhs.mojo_from_view)
    return true;
  if (rhs.mojo_from_view < lhs.mojo_from_view)
    return false;
  return false;
}
template <typename StructPtrType>
XRVisibilityMaskPtr XRVisibilityMask::Clone() const {
  return New(
      mojo::Clone(vertices),
      mojo::Clone(unvalidated_indices)
  );
}

template <typename T, XRVisibilityMask::EnableIfSame<T>*>
bool XRVisibilityMask::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->vertices, other_struct.vertices))
    return false;
  if (!mojo::Equals(this->unvalidated_indices, other_struct.unvalidated_indices))
    return false;
  return true;
}

template <typename T, XRVisibilityMask::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.vertices < rhs.vertices)
    return true;
  if (rhs.vertices < lhs.vertices)
    return false;
  if (lhs.unvalidated_indices < rhs.unvalidated_indices)
    return true;
  if (rhs.unvalidated_indices < lhs.unvalidated_indices)
    return false;
  return false;
}
template <typename StructPtrType>
XRViewPtr XRView::Clone() const {
  return New(
      mojo::Clone(eye),
      mojo::Clone(geometry),
      mojo::Clone(viewport),
      mojo::Clone(depth_data),
      mojo::Clone(is_first_person_observer),
      mojo::Clone(visibility_mask),
      mojo::Clone(visibility_mask_id)
  );
}

template <typename T, XRView::EnableIfSame<T>*>
bool XRView::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->eye, other_struct.eye))
    return false;
  if (!mojo::Equals(this->geometry, other_struct.geometry))
    return false;
  if (!mojo::Equals(this->viewport, other_struct.viewport))
    return false;
  if (!mojo::Equals(this->depth_data, other_struct.depth_data))
    return false;
  if (!mojo::Equals(this->is_first_person_observer, other_struct.is_first_person_observer))
    return false;
  if (!mojo::Equals(this->visibility_mask, other_struct.visibility_mask))
    return false;
  if (!mojo::Equals(this->visibility_mask_id, other_struct.visibility_mask_id))
    return false;
  return true;
}

template <typename T, XRView::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.eye < rhs.eye)
    return true;
  if (rhs.eye < lhs.eye)
    return false;
  if (lhs.geometry < rhs.geometry)
    return true;
  if (rhs.geometry < lhs.geometry)
    return false;
  if (lhs.viewport < rhs.viewport)
    return true;
  if (rhs.viewport < lhs.viewport)
    return false;
  if (lhs.depth_data < rhs.depth_data)
    return true;
  if (rhs.depth_data < lhs.depth_data)
    return false;
  if (lhs.is_first_person_observer < rhs.is_first_person_observer)
    return true;
  if (rhs.is_first_person_observer < lhs.is_first_person_observer)
    return false;
  if (lhs.visibility_mask < rhs.visibility_mask)
    return true;
  if (rhs.visibility_mask < lhs.visibility_mask)
    return false;
  if (lhs.visibility_mask_id < rhs.visibility_mask_id)
    return true;
  if (rhs.visibility_mask_id < lhs.visibility_mask_id)
    return false;
  return false;
}
template <typename StructPtrType>
VRStageParametersPtr VRStageParameters::Clone() const {
  return New(
      mojo::Clone(mojo_from_stage),
      mojo::Clone(bounds)
  );
}

template <typename T, VRStageParameters::EnableIfSame<T>*>
bool VRStageParameters::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->mojo_from_stage, other_struct.mojo_from_stage))
    return false;
  if (!mojo::Equals(this->bounds, other_struct.bounds))
    return false;
  return true;
}

template <typename T, VRStageParameters::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.mojo_from_stage < rhs.mojo_from_stage)
    return true;
  if (rhs.mojo_from_stage < lhs.mojo_from_stage)
    return false;
  if (lhs.bounds < rhs.bounds)
    return true;
  if (rhs.bounds < lhs.bounds)
    return false;
  return false;
}
template <typename StructPtrType>
XRPresentationTransportOptionsPtr XRPresentationTransportOptions::Clone() const {
  return New(
      mojo::Clone(transport_method),
      mojo::Clone(wait_for_transfer_notification),
      mojo::Clone(wait_for_render_notification),
      mojo::Clone(wait_for_gpu_fence)
  );
}

template <typename T, XRPresentationTransportOptions::EnableIfSame<T>*>
bool XRPresentationTransportOptions::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->transport_method, other_struct.transport_method))
    return false;
  if (!mojo::Equals(this->wait_for_transfer_notification, other_struct.wait_for_transfer_notification))
    return false;
  if (!mojo::Equals(this->wait_for_render_notification, other_struct.wait_for_render_notification))
    return false;
  if (!mojo::Equals(this->wait_for_gpu_fence, other_struct.wait_for_gpu_fence))
    return false;
  return true;
}

template <typename T, XRPresentationTransportOptions::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.transport_method < rhs.transport_method)
    return true;
  if (rhs.transport_method < lhs.transport_method)
    return false;
  if (lhs.wait_for_transfer_notification < rhs.wait_for_transfer_notification)
    return true;
  if (rhs.wait_for_transfer_notification < lhs.wait_for_transfer_notification)
    return false;
  if (lhs.wait_for_render_notification < rhs.wait_for_render_notification)
    return true;
  if (rhs.wait_for_render_notification < lhs.wait_for_render_notification)
    return false;
  if (lhs.wait_for_gpu_fence < rhs.wait_for_gpu_fence)
    return true;
  if (rhs.wait_for_gpu_fence < lhs.wait_for_gpu_fence)
    return false;
  return false;
}
template <typename StructPtrType>
XRInputSourceSpaceInfoPtr XRInputSourceSpaceInfo::Clone() const {
  return New(
      mojo::Clone(input_source_id),
      mojo::Clone(input_source_space_type)
  );
}

template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>*>
bool XRInputSourceSpaceInfo::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->input_source_id, other_struct.input_source_id))
    return false;
  if (!mojo::Equals(this->input_source_space_type, other_struct.input_source_space_type))
    return false;
  return true;
}

template <typename T, XRInputSourceSpaceInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.input_source_id < rhs.input_source_id)
    return true;
  if (rhs.input_source_id < lhs.input_source_id)
    return false;
  if (lhs.input_source_space_type < rhs.input_source_space_type)
    return true;
  if (rhs.input_source_space_type < lhs.input_source_space_type)
    return false;
  return false;
}
template <typename StructPtrType>
XRHandJointSpaceInfoPtr XRHandJointSpaceInfo::Clone() const {
  return New(
      mojo::Clone(handedness),
      mojo::Clone(joint)
  );
}

template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>*>
bool XRHandJointSpaceInfo::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->handedness, other_struct.handedness))
    return false;
  if (!mojo::Equals(this->joint, other_struct.joint))
    return false;
  return true;
}

template <typename T, XRHandJointSpaceInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.handedness < rhs.handedness)
    return true;
  if (rhs.handedness < lhs.handedness)
    return false;
  if (lhs.joint < rhs.joint)
    return true;
  if (rhs.joint < lhs.joint)
    return false;
  return false;
}
template <typename StructPtrType>
XRPlanePointDataPtr XRPlanePointData::Clone() const {
  return New(
      mojo::Clone(x),
      mojo::Clone(z)
  );
}

template <typename T, XRPlanePointData::EnableIfSame<T>*>
bool XRPlanePointData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->x, other_struct.x))
    return false;
  if (!mojo::Equals(this->z, other_struct.z))
    return false;
  return true;
}

template <typename T, XRPlanePointData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.x < rhs.x)
    return true;
  if (rhs.x < lhs.x)
    return false;
  if (lhs.z < rhs.z)
    return true;
  if (rhs.z < lhs.z)
    return false;
  return false;
}
template <typename StructPtrType>
XRPlaneDataPtr XRPlaneData::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(orientation),
      mojo::Clone(mojo_from_plane),
      mojo::Clone(semantic_label),
      mojo::Clone(polygon)
  );
}

template <typename T, XRPlaneData::EnableIfSame<T>*>
bool XRPlaneData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id, other_struct.id))
    return false;
  if (!mojo::Equals(this->orientation, other_struct.orientation))
    return false;
  if (!mojo::Equals(this->mojo_from_plane, other_struct.mojo_from_plane))
    return false;
  if (!mojo::Equals(this->semantic_label, other_struct.semantic_label))
    return false;
  if (!mojo::Equals(this->polygon, other_struct.polygon))
    return false;
  return true;
}

template <typename T, XRPlaneData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.orientation < rhs.orientation)
    return true;
  if (rhs.orientation < lhs.orientation)
    return false;
  if (lhs.mojo_from_plane < rhs.mojo_from_plane)
    return true;
  if (rhs.mojo_from_plane < lhs.mojo_from_plane)
    return false;
  if (lhs.semantic_label < rhs.semantic_label)
    return true;
  if (rhs.semantic_label < lhs.semantic_label)
    return false;
  if (lhs.polygon < rhs.polygon)
    return true;
  if (rhs.polygon < lhs.polygon)
    return false;
  return false;
}
template <typename StructPtrType>
XRPlaneDetectionDataPtr XRPlaneDetectionData::Clone() const {
  return New(
      mojo::Clone(all_planes_ids),
      mojo::Clone(updated_planes_data)
  );
}

template <typename T, XRPlaneDetectionData::EnableIfSame<T>*>
bool XRPlaneDetectionData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->all_planes_ids, other_struct.all_planes_ids))
    return false;
  if (!mojo::Equals(this->updated_planes_data, other_struct.updated_planes_data))
    return false;
  return true;
}

template <typename T, XRPlaneDetectionData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.all_planes_ids < rhs.all_planes_ids)
    return true;
  if (rhs.all_planes_ids < lhs.all_planes_ids)
    return false;
  if (lhs.updated_planes_data < rhs.updated_planes_data)
    return true;
  if (rhs.updated_planes_data < lhs.updated_planes_data)
    return false;
  return false;
}
template <typename StructPtrType>
XRMeshDataPtr XRMeshData::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(mojo_from_mesh),
      mojo::Clone(vertices),
      mojo::Clone(indices),
      mojo::Clone(semantic_label)
  );
}

template <typename T, XRMeshData::EnableIfSame<T>*>
bool XRMeshData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id, other_struct.id))
    return false;
  if (!mojo::Equals(this->mojo_from_mesh, other_struct.mojo_from_mesh))
    return false;
  if (!mojo::Equals(this->vertices, other_struct.vertices))
    return false;
  if (!mojo::Equals(this->indices, other_struct.indices))
    return false;
  if (!mojo::Equals(this->semantic_label, other_struct.semantic_label))
    return false;
  return true;
}

template <typename T, XRMeshData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.mojo_from_mesh < rhs.mojo_from_mesh)
    return true;
  if (rhs.mojo_from_mesh < lhs.mojo_from_mesh)
    return false;
  if (lhs.vertices < rhs.vertices)
    return true;
  if (rhs.vertices < lhs.vertices)
    return false;
  if (lhs.indices < rhs.indices)
    return true;
  if (rhs.indices < lhs.indices)
    return false;
  if (lhs.semantic_label < rhs.semantic_label)
    return true;
  if (rhs.semantic_label < lhs.semantic_label)
    return false;
  return false;
}
template <typename StructPtrType>
XRMeshDetectionDataPtr XRMeshDetectionData::Clone() const {
  return New(
      mojo::Clone(all_meshes_ids),
      mojo::Clone(updated_meshes_data)
  );
}

template <typename T, XRMeshDetectionData::EnableIfSame<T>*>
bool XRMeshDetectionData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->all_meshes_ids, other_struct.all_meshes_ids))
    return false;
  if (!mojo::Equals(this->updated_meshes_data, other_struct.updated_meshes_data))
    return false;
  return true;
}

template <typename T, XRMeshDetectionData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.all_meshes_ids < rhs.all_meshes_ids)
    return true;
  if (rhs.all_meshes_ids < lhs.all_meshes_ids)
    return false;
  if (lhs.updated_meshes_data < rhs.updated_meshes_data)
    return true;
  if (rhs.updated_meshes_data < lhs.updated_meshes_data)
    return false;
  return false;
}
template <typename StructPtrType>
XRAnchorDataPtr XRAnchorData::Clone() const {
  return New(
      mojo::Clone(id),
      mojo::Clone(mojo_from_anchor)
  );
}

template <typename T, XRAnchorData::EnableIfSame<T>*>
bool XRAnchorData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id, other_struct.id))
    return false;
  if (!mojo::Equals(this->mojo_from_anchor, other_struct.mojo_from_anchor))
    return false;
  return true;
}

template <typename T, XRAnchorData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id < rhs.id)
    return true;
  if (rhs.id < lhs.id)
    return false;
  if (lhs.mojo_from_anchor < rhs.mojo_from_anchor)
    return true;
  if (rhs.mojo_from_anchor < lhs.mojo_from_anchor)
    return false;
  return false;
}
template <typename StructPtrType>
XRAnchorsDataPtr XRAnchorsData::Clone() const {
  return New(
      mojo::Clone(all_anchors_ids),
      mojo::Clone(updated_anchors_data)
  );
}

template <typename T, XRAnchorsData::EnableIfSame<T>*>
bool XRAnchorsData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->all_anchors_ids, other_struct.all_anchors_ids))
    return false;
  if (!mojo::Equals(this->updated_anchors_data, other_struct.updated_anchors_data))
    return false;
  return true;
}

template <typename T, XRAnchorsData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.all_anchors_ids < rhs.all_anchors_ids)
    return true;
  if (rhs.all_anchors_ids < lhs.all_anchors_ids)
    return false;
  if (lhs.updated_anchors_data < rhs.updated_anchors_data)
    return true;
  if (rhs.updated_anchors_data < lhs.updated_anchors_data)
    return false;
  return false;
}
template <typename StructPtrType>
XRHitTestSubscriptionResultDataPtr XRHitTestSubscriptionResultData::Clone() const {
  return New(
      mojo::Clone(subscription_id),
      mojo::Clone(hit_test_results)
  );
}

template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>*>
bool XRHitTestSubscriptionResultData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->subscription_id, other_struct.subscription_id))
    return false;
  if (!mojo::Equals(this->hit_test_results, other_struct.hit_test_results))
    return false;
  return true;
}

template <typename T, XRHitTestSubscriptionResultData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.subscription_id < rhs.subscription_id)
    return true;
  if (rhs.subscription_id < lhs.subscription_id)
    return false;
  if (lhs.hit_test_results < rhs.hit_test_results)
    return true;
  if (rhs.hit_test_results < lhs.hit_test_results)
    return false;
  return false;
}
template <typename StructPtrType>
XRHitTestTransientInputSubscriptionResultDataPtr XRHitTestTransientInputSubscriptionResultData::Clone() const {
  return New(
      mojo::Clone(subscription_id),
      mojo::Clone(input_source_id_to_hit_test_results)
  );
}

template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>*>
bool XRHitTestTransientInputSubscriptionResultData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->subscription_id, other_struct.subscription_id))
    return false;
  if (!mojo::Equals(this->input_source_id_to_hit_test_results, other_struct.input_source_id_to_hit_test_results))
    return false;
  return true;
}

template <typename T, XRHitTestTransientInputSubscriptionResultData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.subscription_id < rhs.subscription_id)
    return true;
  if (rhs.subscription_id < lhs.subscription_id)
    return false;
  if (lhs.input_source_id_to_hit_test_results < rhs.input_source_id_to_hit_test_results)
    return true;
  if (rhs.input_source_id_to_hit_test_results < lhs.input_source_id_to_hit_test_results)
    return false;
  return false;
}
template <typename StructPtrType>
XRHitTestSubscriptionResultsDataPtr XRHitTestSubscriptionResultsData::Clone() const {
  return New(
      mojo::Clone(results),
      mojo::Clone(transient_input_results)
  );
}

template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>*>
bool XRHitTestSubscriptionResultsData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->results, other_struct.results))
    return false;
  if (!mojo::Equals(this->transient_input_results, other_struct.transient_input_results))
    return false;
  return true;
}

template <typename T, XRHitTestSubscriptionResultsData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.results < rhs.results)
    return true;
  if (rhs.results < lhs.results)
    return false;
  if (lhs.transient_input_results < rhs.transient_input_results)
    return true;
  if (rhs.transient_input_results < lhs.transient_input_results)
    return false;
  return false;
}
template <typename StructPtrType>
RgbTupleF32Ptr RgbTupleF32::Clone() const {
  return New(
      mojo::Clone(red),
      mojo::Clone(green),
      mojo::Clone(blue)
  );
}

template <typename T, RgbTupleF32::EnableIfSame<T>*>
bool RgbTupleF32::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->red, other_struct.red))
    return false;
  if (!mojo::Equals(this->green, other_struct.green))
    return false;
  if (!mojo::Equals(this->blue, other_struct.blue))
    return false;
  return true;
}

template <typename T, RgbTupleF32::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.red < rhs.red)
    return true;
  if (rhs.red < lhs.red)
    return false;
  if (lhs.green < rhs.green)
    return true;
  if (rhs.green < lhs.green)
    return false;
  if (lhs.blue < rhs.blue)
    return true;
  if (rhs.blue < lhs.blue)
    return false;
  return false;
}
template <typename StructPtrType>
XRSphericalHarmonicsPtr XRSphericalHarmonics::Clone() const {
  return New(
      mojo::Clone(coefficients)
  );
}

template <typename T, XRSphericalHarmonics::EnableIfSame<T>*>
bool XRSphericalHarmonics::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->coefficients, other_struct.coefficients))
    return false;
  return true;
}

template <typename T, XRSphericalHarmonics::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.coefficients < rhs.coefficients)
    return true;
  if (rhs.coefficients < lhs.coefficients)
    return false;
  return false;
}
template <typename StructPtrType>
XRCubeMapPtr XRCubeMap::Clone() const {
  return New(
      mojo::Clone(width_and_height),
      mojo::Clone(positive_x),
      mojo::Clone(negative_x),
      mojo::Clone(positive_y),
      mojo::Clone(negative_y),
      mojo::Clone(positive_z),
      mojo::Clone(negative_z)
  );
}

template <typename T, XRCubeMap::EnableIfSame<T>*>
bool XRCubeMap::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->width_and_height, other_struct.width_and_height))
    return false;
  if (!mojo::Equals(this->positive_x, other_struct.positive_x))
    return false;
  if (!mojo::Equals(this->negative_x, other_struct.negative_x))
    return false;
  if (!mojo::Equals(this->positive_y, other_struct.positive_y))
    return false;
  if (!mojo::Equals(this->negative_y, other_struct.negative_y))
    return false;
  if (!mojo::Equals(this->positive_z, other_struct.positive_z))
    return false;
  if (!mojo::Equals(this->negative_z, other_struct.negative_z))
    return false;
  return true;
}

template <typename T, XRCubeMap::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.width_and_height < rhs.width_and_height)
    return true;
  if (rhs.width_and_height < lhs.width_and_height)
    return false;
  if (lhs.positive_x < rhs.positive_x)
    return true;
  if (rhs.positive_x < lhs.positive_x)
    return false;
  if (lhs.negative_x < rhs.negative_x)
    return true;
  if (rhs.negative_x < lhs.negative_x)
    return false;
  if (lhs.positive_y < rhs.positive_y)
    return true;
  if (rhs.positive_y < lhs.positive_y)
    return false;
  if (lhs.negative_y < rhs.negative_y)
    return true;
  if (rhs.negative_y < lhs.negative_y)
    return false;
  if (lhs.positive_z < rhs.positive_z)
    return true;
  if (rhs.positive_z < lhs.positive_z)
    return false;
  if (lhs.negative_z < rhs.negative_z)
    return true;
  if (rhs.negative_z < lhs.negative_z)
    return false;
  return false;
}
template <typename StructPtrType>
XRLightProbePtr XRLightProbe::Clone() const {
  return New(
      mojo::Clone(spherical_harmonics),
      mojo::Clone(main_light_direction),
      mojo::Clone(main_light_intensity)
  );
}

template <typename T, XRLightProbe::EnableIfSame<T>*>
bool XRLightProbe::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->spherical_harmonics, other_struct.spherical_harmonics))
    return false;
  if (!mojo::Equals(this->main_light_direction, other_struct.main_light_direction))
    return false;
  if (!mojo::Equals(this->main_light_intensity, other_struct.main_light_intensity))
    return false;
  return true;
}

template <typename T, XRLightProbe::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.spherical_harmonics < rhs.spherical_harmonics)
    return true;
  if (rhs.spherical_harmonics < lhs.spherical_harmonics)
    return false;
  if (lhs.main_light_direction < rhs.main_light_direction)
    return true;
  if (rhs.main_light_direction < lhs.main_light_direction)
    return false;
  if (lhs.main_light_intensity < rhs.main_light_intensity)
    return true;
  if (rhs.main_light_intensity < lhs.main_light_intensity)
    return false;
  return false;
}
template <typename StructPtrType>
XRReflectionProbePtr XRReflectionProbe::Clone() const {
  return New(
      mojo::Clone(cube_map)
  );
}

template <typename T, XRReflectionProbe::EnableIfSame<T>*>
bool XRReflectionProbe::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->cube_map, other_struct.cube_map))
    return false;
  return true;
}

template <typename T, XRReflectionProbe::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.cube_map < rhs.cube_map)
    return true;
  if (rhs.cube_map < lhs.cube_map)
    return false;
  return false;
}
template <typename StructPtrType>
XRLightEstimationDataPtr XRLightEstimationData::Clone() const {
  return New(
      mojo::Clone(light_probe),
      mojo::Clone(reflection_probe)
  );
}

template <typename T, XRLightEstimationData::EnableIfSame<T>*>
bool XRLightEstimationData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->light_probe, other_struct.light_probe))
    return false;
  if (!mojo::Equals(this->reflection_probe, other_struct.reflection_probe))
    return false;
  return true;
}

template <typename T, XRLightEstimationData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.light_probe < rhs.light_probe)
    return true;
  if (rhs.light_probe < lhs.light_probe)
    return false;
  if (lhs.reflection_probe < rhs.reflection_probe)
    return true;
  if (rhs.reflection_probe < lhs.reflection_probe)
    return false;
  return false;
}
template <typename StructPtrType>
XRDepthDataStillValidPtr XRDepthDataStillValid::Clone() const {
  return New(
  );
}

template <typename T, XRDepthDataStillValid::EnableIfSame<T>*>
bool XRDepthDataStillValid::Equals(const T& other_struct) const {
  return true;
}

template <typename T, XRDepthDataStillValid::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  return false;
}
template <typename StructPtrType>
XRDepthDataUpdatedPtr XRDepthDataUpdated::Clone() const {
  return New(
      mojo::Clone(pixel_data),
      mojo::Clone(norm_texture_from_norm_view),
      mojo::Clone(size),
      mojo::Clone(raw_value_to_meters),
      mojo::Clone(view_geometry)
  );
}

template <typename T, XRDepthDataUpdated::EnableIfSame<T>*>
bool XRDepthDataUpdated::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->pixel_data, other_struct.pixel_data))
    return false;
  if (!mojo::Equals(this->norm_texture_from_norm_view, other_struct.norm_texture_from_norm_view))
    return false;
  if (!mojo::Equals(this->size, other_struct.size))
    return false;
  if (!mojo::Equals(this->raw_value_to_meters, other_struct.raw_value_to_meters))
    return false;
  if (!mojo::Equals(this->view_geometry, other_struct.view_geometry))
    return false;
  return true;
}

template <typename T, XRDepthDataUpdated::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.pixel_data < rhs.pixel_data)
    return true;
  if (rhs.pixel_data < lhs.pixel_data)
    return false;
  if (lhs.norm_texture_from_norm_view < rhs.norm_texture_from_norm_view)
    return true;
  if (rhs.norm_texture_from_norm_view < lhs.norm_texture_from_norm_view)
    return false;
  if (lhs.size < rhs.size)
    return true;
  if (rhs.size < lhs.size)
    return false;
  if (lhs.raw_value_to_meters < rhs.raw_value_to_meters)
    return true;
  if (rhs.raw_value_to_meters < lhs.raw_value_to_meters)
    return false;
  if (lhs.view_geometry < rhs.view_geometry)
    return true;
  if (rhs.view_geometry < lhs.view_geometry)
    return false;
  return false;
}
template <typename StructPtrType>
XRTrackedImageDataPtr XRTrackedImageData::Clone() const {
  return New(
      mojo::Clone(index),
      mojo::Clone(mojo_from_image),
      mojo::Clone(actively_tracked),
      mojo::Clone(width_in_meters)
  );
}

template <typename T, XRTrackedImageData::EnableIfSame<T>*>
bool XRTrackedImageData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->index, other_struct.index))
    return false;
  if (!mojo::Equals(this->mojo_from_image, other_struct.mojo_from_image))
    return false;
  if (!mojo::Equals(this->actively_tracked, other_struct.actively_tracked))
    return false;
  if (!mojo::Equals(this->width_in_meters, other_struct.width_in_meters))
    return false;
  return true;
}

template <typename T, XRTrackedImageData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.index < rhs.index)
    return true;
  if (rhs.index < lhs.index)
    return false;
  if (lhs.mojo_from_image < rhs.mojo_from_image)
    return true;
  if (rhs.mojo_from_image < lhs.mojo_from_image)
    return false;
  if (lhs.actively_tracked < rhs.actively_tracked)
    return true;
  if (rhs.actively_tracked < lhs.actively_tracked)
    return false;
  if (lhs.width_in_meters < rhs.width_in_meters)
    return true;
  if (rhs.width_in_meters < lhs.width_in_meters)
    return false;
  return false;
}
template <typename StructPtrType>
XRTrackedImagesDataPtr XRTrackedImagesData::Clone() const {
  return New(
      mojo::Clone(images_data),
      mojo::Clone(image_trackable_scores)
  );
}

template <typename T, XRTrackedImagesData::EnableIfSame<T>*>
bool XRTrackedImagesData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->images_data, other_struct.images_data))
    return false;
  if (!mojo::Equals(this->image_trackable_scores, other_struct.image_trackable_scores))
    return false;
  return true;
}

template <typename T, XRTrackedImagesData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.images_data < rhs.images_data)
    return true;
  if (rhs.images_data < lhs.images_data)
    return false;
  if (lhs.image_trackable_scores < rhs.image_trackable_scores)
    return true;
  if (rhs.image_trackable_scores < lhs.image_trackable_scores)
    return false;
  return false;
}
template <typename StructPtrType>
LayerIdPtr LayerId::Clone() const {
  return New(
      mojo::Clone(id_value)
  );
}

template <typename T, LayerId::EnableIfSame<T>*>
bool LayerId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->id_value, other_struct.id_value))
    return false;
  return true;
}

template <typename T, LayerId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.id_value < rhs.id_value)
    return true;
  if (rhs.id_value < lhs.id_value)
    return false;
  return false;
}
template <typename StructPtrType>
XRProjectionLayerDataPtr XRProjectionLayerData::Clone() const {
  return New(
  );
}

template <typename T, XRProjectionLayerData::EnableIfSame<T>*>
bool XRProjectionLayerData::Equals(const T& other_struct) const {
  return true;
}

template <typename T, XRProjectionLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  return false;
}
template <typename StructPtrType>
XRQuadLayerDataPtr XRQuadLayerData::Clone() const {
  return New(
      mojo::Clone(native_origin_from_layer),
      mojo::Clone(width),
      mojo::Clone(height)
  );
}

template <typename T, XRQuadLayerData::EnableIfSame<T>*>
bool XRQuadLayerData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->native_origin_from_layer, other_struct.native_origin_from_layer))
    return false;
  if (!mojo::Equals(this->width, other_struct.width))
    return false;
  if (!mojo::Equals(this->height, other_struct.height))
    return false;
  return true;
}

template <typename T, XRQuadLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.native_origin_from_layer < rhs.native_origin_from_layer)
    return true;
  if (rhs.native_origin_from_layer < lhs.native_origin_from_layer)
    return false;
  if (lhs.width < rhs.width)
    return true;
  if (rhs.width < lhs.width)
    return false;
  if (lhs.height < rhs.height)
    return true;
  if (rhs.height < lhs.height)
    return false;
  return false;
}
template <typename StructPtrType>
XRCylinderLayerDataPtr XRCylinderLayerData::Clone() const {
  return New(
      mojo::Clone(native_origin_from_layer),
      mojo::Clone(radius),
      mojo::Clone(central_angle),
      mojo::Clone(aspect_ratio)
  );
}

template <typename T, XRCylinderLayerData::EnableIfSame<T>*>
bool XRCylinderLayerData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->native_origin_from_layer, other_struct.native_origin_from_layer))
    return false;
  if (!mojo::Equals(this->radius, other_struct.radius))
    return false;
  if (!mojo::Equals(this->central_angle, other_struct.central_angle))
    return false;
  if (!mojo::Equals(this->aspect_ratio, other_struct.aspect_ratio))
    return false;
  return true;
}

template <typename T, XRCylinderLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.native_origin_from_layer < rhs.native_origin_from_layer)
    return true;
  if (rhs.native_origin_from_layer < lhs.native_origin_from_layer)
    return false;
  if (lhs.radius < rhs.radius)
    return true;
  if (rhs.radius < lhs.radius)
    return false;
  if (lhs.central_angle < rhs.central_angle)
    return true;
  if (rhs.central_angle < lhs.central_angle)
    return false;
  if (lhs.aspect_ratio < rhs.aspect_ratio)
    return true;
  if (rhs.aspect_ratio < lhs.aspect_ratio)
    return false;
  return false;
}
template <typename StructPtrType>
XREquirectLayerDataPtr XREquirectLayerData::Clone() const {
  return New(
      mojo::Clone(native_origin_from_layer),
      mojo::Clone(radius),
      mojo::Clone(central_horizontal_angle),
      mojo::Clone(upper_vertical_angle),
      mojo::Clone(lower_vertical_angle)
  );
}

template <typename T, XREquirectLayerData::EnableIfSame<T>*>
bool XREquirectLayerData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->native_origin_from_layer, other_struct.native_origin_from_layer))
    return false;
  if (!mojo::Equals(this->radius, other_struct.radius))
    return false;
  if (!mojo::Equals(this->central_horizontal_angle, other_struct.central_horizontal_angle))
    return false;
  if (!mojo::Equals(this->upper_vertical_angle, other_struct.upper_vertical_angle))
    return false;
  if (!mojo::Equals(this->lower_vertical_angle, other_struct.lower_vertical_angle))
    return false;
  return true;
}

template <typename T, XREquirectLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.native_origin_from_layer < rhs.native_origin_from_layer)
    return true;
  if (rhs.native_origin_from_layer < lhs.native_origin_from_layer)
    return false;
  if (lhs.radius < rhs.radius)
    return true;
  if (rhs.radius < lhs.radius)
    return false;
  if (lhs.central_horizontal_angle < rhs.central_horizontal_angle)
    return true;
  if (rhs.central_horizontal_angle < lhs.central_horizontal_angle)
    return false;
  if (lhs.upper_vertical_angle < rhs.upper_vertical_angle)
    return true;
  if (rhs.upper_vertical_angle < lhs.upper_vertical_angle)
    return false;
  if (lhs.lower_vertical_angle < rhs.lower_vertical_angle)
    return true;
  if (rhs.lower_vertical_angle < lhs.lower_vertical_angle)
    return false;
  return false;
}
template <typename StructPtrType>
XRCubeLayerDataPtr XRCubeLayerData::Clone() const {
  return New(
      mojo::Clone(orientation)
  );
}

template <typename T, XRCubeLayerData::EnableIfSame<T>*>
bool XRCubeLayerData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->orientation, other_struct.orientation))
    return false;
  return true;
}

template <typename T, XRCubeLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.orientation < rhs.orientation)
    return true;
  if (rhs.orientation < lhs.orientation)
    return false;
  return false;
}
template <typename StructPtrType>
XRLayerReadOnlyDataPtr XRLayerReadOnlyData::Clone() const {
  return New(
      mojo::Clone(layer_id),
      mojo::Clone(layout),
      mojo::Clone(texture_width),
      mojo::Clone(texture_height),
      mojo::Clone(is_static),
      mojo::Clone(flip_y),
      mojo::Clone(needs_raster_access)
  );
}

template <typename T, XRLayerReadOnlyData::EnableIfSame<T>*>
bool XRLayerReadOnlyData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->layer_id, other_struct.layer_id))
    return false;
  if (!mojo::Equals(this->layout, other_struct.layout))
    return false;
  if (!mojo::Equals(this->texture_width, other_struct.texture_width))
    return false;
  if (!mojo::Equals(this->texture_height, other_struct.texture_height))
    return false;
  if (!mojo::Equals(this->is_static, other_struct.is_static))
    return false;
  if (!mojo::Equals(this->flip_y, other_struct.flip_y))
    return false;
  if (!mojo::Equals(this->needs_raster_access, other_struct.needs_raster_access))
    return false;
  return true;
}

template <typename T, XRLayerReadOnlyData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.layer_id < rhs.layer_id)
    return true;
  if (rhs.layer_id < lhs.layer_id)
    return false;
  if (lhs.layout < rhs.layout)
    return true;
  if (rhs.layout < lhs.layout)
    return false;
  if (lhs.texture_width < rhs.texture_width)
    return true;
  if (rhs.texture_width < lhs.texture_width)
    return false;
  if (lhs.texture_height < rhs.texture_height)
    return true;
  if (rhs.texture_height < lhs.texture_height)
    return false;
  if (lhs.is_static < rhs.is_static)
    return true;
  if (rhs.is_static < lhs.is_static)
    return false;
  if (lhs.flip_y < rhs.flip_y)
    return true;
  if (rhs.flip_y < lhs.flip_y)
    return false;
  if (lhs.needs_raster_access < rhs.needs_raster_access)
    return true;
  if (rhs.needs_raster_access < lhs.needs_raster_access)
    return false;
  return false;
}
template <typename StructPtrType>
XRLayerMutableDataPtr XRLayerMutableData::Clone() const {
  return New(
      mojo::Clone(blend_texture_source_alpha),
      mojo::Clone(force_mono_presentation),
      mojo::Clone(opacity),
      mojo::Clone(native_origin_information),
      mojo::Clone(layer_data)
  );
}

template <typename T, XRLayerMutableData::EnableIfSame<T>*>
bool XRLayerMutableData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->blend_texture_source_alpha, other_struct.blend_texture_source_alpha))
    return false;
  if (!mojo::Equals(this->force_mono_presentation, other_struct.force_mono_presentation))
    return false;
  if (!mojo::Equals(this->opacity, other_struct.opacity))
    return false;
  if (!mojo::Equals(this->native_origin_information, other_struct.native_origin_information))
    return false;
  if (!mojo::Equals(this->layer_data, other_struct.layer_data))
    return false;
  return true;
}

template <typename T, XRLayerMutableData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.blend_texture_source_alpha < rhs.blend_texture_source_alpha)
    return true;
  if (rhs.blend_texture_source_alpha < lhs.blend_texture_source_alpha)
    return false;
  if (lhs.force_mono_presentation < rhs.force_mono_presentation)
    return true;
  if (rhs.force_mono_presentation < lhs.force_mono_presentation)
    return false;
  if (lhs.opacity < rhs.opacity)
    return true;
  if (rhs.opacity < lhs.opacity)
    return false;
  if (lhs.native_origin_information < rhs.native_origin_information)
    return true;
  if (rhs.native_origin_information < lhs.native_origin_information)
    return false;
  if (lhs.layer_data < rhs.layer_data)
    return true;
  if (rhs.layer_data < lhs.layer_data)
    return false;
  return false;
}
template <typename StructPtrType>
XRCompositionLayerDataPtr XRCompositionLayerData::Clone() const {
  return New(
      mojo::Clone(read_only_data),
      mojo::Clone(mutable_data)
  );
}

template <typename T, XRCompositionLayerData::EnableIfSame<T>*>
bool XRCompositionLayerData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->read_only_data, other_struct.read_only_data))
    return false;
  if (!mojo::Equals(this->mutable_data, other_struct.mutable_data))
    return false;
  return true;
}

template <typename T, XRCompositionLayerData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.read_only_data < rhs.read_only_data)
    return true;
  if (rhs.read_only_data < lhs.read_only_data)
    return false;
  if (lhs.mutable_data < rhs.mutable_data)
    return true;
  if (rhs.mutable_data < lhs.mutable_data)
    return false;
  return false;
}
template <typename StructPtrType>
XRLayerFrameDataPtr XRLayerFrameData::Clone() const {
  return New(
      mojo::Clone(layer_id),
      mojo::Clone(buffer_shared_image),
      mojo::Clone(buffer_sync_token)
  );
}

template <typename T, XRLayerFrameData::EnableIfSame<T>*>
bool XRLayerFrameData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->layer_id, other_struct.layer_id))
    return false;
  if (!mojo::Equals(this->buffer_shared_image, other_struct.buffer_shared_image))
    return false;
  if (!mojo::Equals(this->buffer_sync_token, other_struct.buffer_sync_token))
    return false;
  return true;
}

template <typename T, XRLayerFrameData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.layer_id < rhs.layer_id)
    return true;
  if (rhs.layer_id < lhs.layer_id)
    return false;
  if (lhs.buffer_shared_image < rhs.buffer_shared_image)
    return true;
  if (rhs.buffer_shared_image < lhs.buffer_shared_image)
    return false;
  if (lhs.buffer_sync_token < rhs.buffer_sync_token)
    return true;
  if (rhs.buffer_sync_token < lhs.buffer_sync_token)
    return false;
  return false;
}
template <typename StructPtrType>
XRRenderInfoPtr XRRenderInfo::Clone() const {
  return New(
      mojo::Clone(frame_id),
      mojo::Clone(mojo_from_viewer),
      mojo::Clone(views)
  );
}

template <typename T, XRRenderInfo::EnableIfSame<T>*>
bool XRRenderInfo::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->frame_id, other_struct.frame_id))
    return false;
  if (!mojo::Equals(this->mojo_from_viewer, other_struct.mojo_from_viewer))
    return false;
  if (!mojo::Equals(this->views, other_struct.views))
    return false;
  return true;
}

template <typename T, XRRenderInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.frame_id < rhs.frame_id)
    return true;
  if (rhs.frame_id < lhs.frame_id)
    return false;
  if (lhs.mojo_from_viewer < rhs.mojo_from_viewer)
    return true;
  if (rhs.mojo_from_viewer < lhs.mojo_from_viewer)
    return false;
  if (lhs.views < rhs.views)
    return true;
  if (rhs.views < lhs.views)
    return false;
  return false;
}
template <typename StructPtrType>
XRFrameDataPtr XRFrameData::Clone() const {
  return New(
      mojo::Clone(render_info),
      mojo::Clone(time_delta),
      mojo::Clone(buffer_shared_image),
      mojo::Clone(buffer_sync_token),
      mojo::Clone(camera_image_buffer_shared_image),
      mojo::Clone(camera_image_buffer_sync_token),
      mojo::Clone(camera_image_size),
      mojo::Clone(mojo_space_reset),
      mojo::Clone(mojo_from_floor),
      mojo::Clone(input_state),
      mojo::Clone(stage_parameters_id),
      mojo::Clone(stage_parameters),
      mojo::Clone(detected_planes_data),
      mojo::Clone(detected_meshes_data),
      mojo::Clone(anchors_data),
      mojo::Clone(composition_layers_data),
      mojo::Clone(light_estimation_data),
      mojo::Clone(hit_test_subscription_results),
      mojo::Clone(rendering_time_ratio),
      mojo::Clone(tracked_images)
  );
}

template <typename T, XRFrameData::EnableIfSame<T>*>
bool XRFrameData::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->render_info, other_struct.render_info))
    return false;
  if (!mojo::Equals(this->time_delta, other_struct.time_delta))
    return false;
  if (!mojo::Equals(this->buffer_shared_image, other_struct.buffer_shared_image))
    return false;
  if (!mojo::Equals(this->buffer_sync_token, other_struct.buffer_sync_token))
    return false;
  if (!mojo::Equals(this->camera_image_buffer_shared_image, other_struct.camera_image_buffer_shared_image))
    return false;
  if (!mojo::Equals(this->camera_image_buffer_sync_token, other_struct.camera_image_buffer_sync_token))
    return false;
  if (!mojo::Equals(this->camera_image_size, other_struct.camera_image_size))
    return false;
  if (!mojo::Equals(this->mojo_space_reset, other_struct.mojo_space_reset))
    return false;
  if (!mojo::Equals(this->mojo_from_floor, other_struct.mojo_from_floor))
    return false;
  if (!mojo::Equals(this->input_state, other_struct.input_state))
    return false;
  if (!mojo::Equals(this->stage_parameters_id, other_struct.stage_parameters_id))
    return false;
  if (!mojo::Equals(this->stage_parameters, other_struct.stage_parameters))
    return false;
  if (!mojo::Equals(this->detected_planes_data, other_struct.detected_planes_data))
    return false;
  if (!mojo::Equals(this->detected_meshes_data, other_struct.detected_meshes_data))
    return false;
  if (!mojo::Equals(this->anchors_data, other_struct.anchors_data))
    return false;
  if (!mojo::Equals(this->composition_layers_data, other_struct.composition_layers_data))
    return false;
  if (!mojo::Equals(this->light_estimation_data, other_struct.light_estimation_data))
    return false;
  if (!mojo::Equals(this->hit_test_subscription_results, other_struct.hit_test_subscription_results))
    return false;
  if (!mojo::Equals(this->rendering_time_ratio, other_struct.rendering_time_ratio))
    return false;
  if (!mojo::Equals(this->tracked_images, other_struct.tracked_images))
    return false;
  return true;
}

template <typename T, XRFrameData::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.render_info < rhs.render_info)
    return true;
  if (rhs.render_info < lhs.render_info)
    return false;
  if (lhs.time_delta < rhs.time_delta)
    return true;
  if (rhs.time_delta < lhs.time_delta)
    return false;
  if (lhs.buffer_shared_image < rhs.buffer_shared_image)
    return true;
  if (rhs.buffer_shared_image < lhs.buffer_shared_image)
    return false;
  if (lhs.buffer_sync_token < rhs.buffer_sync_token)
    return true;
  if (rhs.buffer_sync_token < lhs.buffer_sync_token)
    return false;
  if (lhs.camera_image_buffer_shared_image < rhs.camera_image_buffer_shared_image)
    return true;
  if (rhs.camera_image_buffer_shared_image < lhs.camera_image_buffer_shared_image)
    return false;
  if (lhs.camera_image_buffer_sync_token < rhs.camera_image_buffer_sync_token)
    return true;
  if (rhs.camera_image_buffer_sync_token < lhs.camera_image_buffer_sync_token)
    return false;
  if (lhs.camera_image_size < rhs.camera_image_size)
    return true;
  if (rhs.camera_image_size < lhs.camera_image_size)
    return false;
  if (lhs.mojo_space_reset < rhs.mojo_space_reset)
    return true;
  if (rhs.mojo_space_reset < lhs.mojo_space_reset)
    return false;
  if (lhs.mojo_from_floor < rhs.mojo_from_floor)
    return true;
  if (rhs.mojo_from_floor < lhs.mojo_from_floor)
    return false;
  if (lhs.input_state < rhs.input_state)
    return true;
  if (rhs.input_state < lhs.input_state)
    return false;
  if (lhs.stage_parameters_id < rhs.stage_parameters_id)
    return true;
  if (rhs.stage_parameters_id < lhs.stage_parameters_id)
    return false;
  if (lhs.stage_parameters < rhs.stage_parameters)
    return true;
  if (rhs.stage_parameters < lhs.stage_parameters)
    return false;
  if (lhs.detected_planes_data < rhs.detected_planes_data)
    return true;
  if (rhs.detected_planes_data < lhs.detected_planes_data)
    return false;
  if (lhs.detected_meshes_data < rhs.detected_meshes_data)
    return true;
  if (rhs.detected_meshes_data < lhs.detected_meshes_data)
    return false;
  if (lhs.anchors_data < rhs.anchors_data)
    return true;
  if (rhs.anchors_data < lhs.anchors_data)
    return false;
  if (lhs.composition_layers_data < rhs.composition_layers_data)
    return true;
  if (rhs.composition_layers_data < lhs.composition_layers_data)
    return false;
  if (lhs.light_estimation_data < rhs.light_estimation_data)
    return true;
  if (rhs.light_estimation_data < lhs.light_estimation_data)
    return false;
  if (lhs.hit_test_subscription_results < rhs.hit_test_subscription_results)
    return true;
  if (rhs.hit_test_subscription_results < lhs.hit_test_subscription_results)
    return false;
  if (lhs.rendering_time_ratio < rhs.rendering_time_ratio)
    return true;
  if (rhs.rendering_time_ratio < lhs.rendering_time_ratio)
    return false;
  if (lhs.tracked_images < rhs.tracked_images)
    return true;
  if (rhs.tracked_images < lhs.tracked_images)
    return false;
  return false;
}
template <typename StructPtrType>
RequestSessionSuccessPtr RequestSessionSuccess::Clone() const {
  return New(
      mojo::Clone(session),
      mojo::Clone(trace_id),
      mojo::Clone(metrics_recorder),
      mojo::Clone(xr_internals_listener)
  );
}

template <typename T, RequestSessionSuccess::EnableIfSame<T>*>
bool RequestSessionSuccess::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->session, other_struct.session))
    return false;
  if (!mojo::Equals(this->trace_id, other_struct.trace_id))
    return false;
  if (!mojo::Equals(this->metrics_recorder, other_struct.metrics_recorder))
    return false;
  if (!mojo::Equals(this->xr_internals_listener, other_struct.xr_internals_listener))
    return false;
  return true;
}

template <typename T, RequestSessionSuccess::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.session < rhs.session)
    return true;
  if (rhs.session < lhs.session)
    return false;
  if (lhs.trace_id < rhs.trace_id)
    return true;
  if (rhs.trace_id < lhs.trace_id)
    return false;
  if (lhs.metrics_recorder < rhs.metrics_recorder)
    return true;
  if (rhs.metrics_recorder < lhs.metrics_recorder)
    return false;
  if (lhs.xr_internals_listener < rhs.xr_internals_listener)
    return true;
  if (rhs.xr_internals_listener < lhs.xr_internals_listener)
    return false;
  return false;
}
template <typename StructPtrType>
XRFrameDataRequestOptionsPtr XRFrameDataRequestOptions::Clone() const {
  return New(
      mojo::Clone(include_lighting_estimation_data),
      mojo::Clone(depth_active),
      mojo::Clone(stage_parameters_id)
  );
}

template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>*>
bool XRFrameDataRequestOptions::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->include_lighting_estimation_data, other_struct.include_lighting_estimation_data))
    return false;
  if (!mojo::Equals(this->depth_active, other_struct.depth_active))
    return false;
  if (!mojo::Equals(this->stage_parameters_id, other_struct.stage_parameters_id))
    return false;
  return true;
}

template <typename T, XRFrameDataRequestOptions::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.include_lighting_estimation_data < rhs.include_lighting_estimation_data)
    return true;
  if (rhs.include_lighting_estimation_data < lhs.include_lighting_estimation_data)
    return false;
  if (lhs.depth_active < rhs.depth_active)
    return true;
  if (rhs.depth_active < lhs.depth_active)
    return false;
  if (lhs.stage_parameters_id < rhs.stage_parameters_id)
    return true;
  if (rhs.stage_parameters_id < lhs.stage_parameters_id)
    return false;
  return false;
}
template <typename StructPtrType>
XRLayerUpdatePtr XRLayerUpdate::Clone() const {
  return New(
      mojo::Clone(layer_id),
      mojo::Clone(shared_image_export_result)
  );
}

template <typename T, XRLayerUpdate::EnableIfSame<T>*>
bool XRLayerUpdate::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->layer_id, other_struct.layer_id))
    return false;
  if (!mojo::Equals(this->shared_image_export_result, other_struct.shared_image_export_result))
    return false;
  return true;
}

template <typename T, XRLayerUpdate::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.layer_id < rhs.layer_id)
    return true;
  if (rhs.layer_id < lhs.layer_id)
    return false;
  if (lhs.shared_image_export_result < rhs.shared_image_export_result)
    return true;
  if (rhs.shared_image_export_result < lhs.shared_image_export_result)
    return false;
  return false;
}


}  // device::mojom

namespace mojo {


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRDepthConfig::DataView,
                                         ::device::mojom::XRDepthConfigPtr> {
  static bool IsNull(const ::device::mojom::XRDepthConfigPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRDepthConfigPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRDepthConfig::depth_usage) depth_usage(
      const ::device::mojom::XRDepthConfigPtr& input) {
    return input->depth_usage;
  }

  static decltype(::device::mojom::XRDepthConfig::depth_data_format) depth_data_format(
      const ::device::mojom::XRDepthConfigPtr& input) {
    return input->depth_data_format;
  }

  static decltype(::device::mojom::XRDepthConfig::depth_type) depth_type(
      const ::device::mojom::XRDepthConfigPtr& input) {
    return input->depth_type;
  }

  static bool Read(::device::mojom::XRDepthConfig::DataView input, ::device::mojom::XRDepthConfigPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRSessionDeviceConfig::DataView,
                                         ::device::mojom::XRSessionDeviceConfigPtr> {
  static bool IsNull(const ::device::mojom::XRSessionDeviceConfigPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRSessionDeviceConfigPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRSessionDeviceConfig::default_framebuffer_scale) default_framebuffer_scale(
      const ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->default_framebuffer_scale;
  }

  static  decltype(::device::mojom::XRSessionDeviceConfig::views)& views(
       ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->views;
  }

  static decltype(::device::mojom::XRSessionDeviceConfig::supports_viewport_scaling) supports_viewport_scaling(
      const ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->supports_viewport_scaling;
  }

  static decltype(::device::mojom::XRSessionDeviceConfig::enable_anti_aliasing) enable_anti_aliasing(
      const ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->enable_anti_aliasing;
  }

  static const decltype(::device::mojom::XRSessionDeviceConfig::depth_configuration)& depth_configuration(
      const ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->depth_configuration;
  }

  static decltype(::device::mojom::XRSessionDeviceConfig::max_render_layers) max_render_layers(
      const ::device::mojom::XRSessionDeviceConfigPtr& input) {
    return input->max_render_layers;
  }

  static bool Read(::device::mojom::XRSessionDeviceConfig::DataView input, ::device::mojom::XRSessionDeviceConfigPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRSession::DataView,
                                         ::device::mojom::XRSessionPtr> {
  static bool IsNull(const ::device::mojom::XRSessionPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRSessionPtr* output) { output->reset(); }

  static  decltype(::device::mojom::XRSession::data_provider)& data_provider(
       ::device::mojom::XRSessionPtr& input) {
    return input->data_provider;
  }

  static  decltype(::device::mojom::XRSession::layer_manager)& layer_manager(
       ::device::mojom::XRSessionPtr& input) {
    return input->layer_manager;
  }

  static  decltype(::device::mojom::XRSession::client_receiver)& client_receiver(
       ::device::mojom::XRSessionPtr& input) {
    return input->client_receiver;
  }

  static  decltype(::device::mojom::XRSession::submit_frame_sink)& submit_frame_sink(
       ::device::mojom::XRSessionPtr& input) {
    return input->submit_frame_sink;
  }

  static const decltype(::device::mojom::XRSession::enabled_features)& enabled_features(
      const ::device::mojom::XRSessionPtr& input) {
    return input->enabled_features;
  }

  static  decltype(::device::mojom::XRSession::device_config)& device_config(
       ::device::mojom::XRSessionPtr& input) {
    return input->device_config;
  }

  static decltype(::device::mojom::XRSession::enviroment_blend_mode) enviroment_blend_mode(
      const ::device::mojom::XRSessionPtr& input) {
    return input->enviroment_blend_mode;
  }

  static decltype(::device::mojom::XRSession::interaction_mode) interaction_mode(
      const ::device::mojom::XRSessionPtr& input) {
    return input->interaction_mode;
  }

  static decltype(::device::mojom::XRSession::wants_fullscreen) wants_fullscreen(
      const ::device::mojom::XRSessionPtr& input) {
    return input->wants_fullscreen;
  }

  static bool Read(::device::mojom::XRSession::DataView input, ::device::mojom::XRSessionPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRPresentationConnection::DataView,
                                         ::device::mojom::XRPresentationConnectionPtr> {
  static bool IsNull(const ::device::mojom::XRPresentationConnectionPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRPresentationConnectionPtr* output) { output->reset(); }

  static  decltype(::device::mojom::XRPresentationConnection::provider)& provider(
       ::device::mojom::XRPresentationConnectionPtr& input) {
    return input->provider;
  }

  static  decltype(::device::mojom::XRPresentationConnection::client_receiver)& client_receiver(
       ::device::mojom::XRPresentationConnectionPtr& input) {
    return input->client_receiver;
  }

  static const decltype(::device::mojom::XRPresentationConnection::transport_options)& transport_options(
      const ::device::mojom::XRPresentationConnectionPtr& input) {
    return input->transport_options;
  }

  static bool Read(::device::mojom::XRPresentationConnection::DataView input, ::device::mojom::XRPresentationConnectionPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRInputSourceDescription::DataView,
                                         ::device::mojom::XRInputSourceDescriptionPtr> {
  static bool IsNull(const ::device::mojom::XRInputSourceDescriptionPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRInputSourceDescriptionPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRInputSourceDescription::target_ray_mode) target_ray_mode(
      const ::device::mojom::XRInputSourceDescriptionPtr& input) {
    return input->target_ray_mode;
  }

  static decltype(::device::mojom::XRInputSourceDescription::handedness) handedness(
      const ::device::mojom::XRInputSourceDescriptionPtr& input) {
    return input->handedness;
  }

  static const decltype(::device::mojom::XRInputSourceDescription::input_from_pointer)& input_from_pointer(
      const ::device::mojom::XRInputSourceDescriptionPtr& input) {
    return input->input_from_pointer;
  }

  static const decltype(::device::mojom::XRInputSourceDescription::profiles)& profiles(
      const ::device::mojom::XRInputSourceDescriptionPtr& input) {
    return input->profiles;
  }

  static bool Read(::device::mojom::XRInputSourceDescription::DataView input, ::device::mojom::XRInputSourceDescriptionPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRInputSourceState::DataView,
                                         ::device::mojom::XRInputSourceStatePtr> {
  static bool IsNull(const ::device::mojom::XRInputSourceStatePtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRInputSourceStatePtr* output) { output->reset(); }

  static decltype(::device::mojom::XRInputSourceState::source_id) source_id(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->source_id;
  }

  static const decltype(::device::mojom::XRInputSourceState::description)& description(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->description;
  }

  static const decltype(::device::mojom::XRInputSourceState::mojo_from_input)& mojo_from_input(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->mojo_from_input;
  }

  static decltype(::device::mojom::XRInputSourceState::emulated_position) emulated_position(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->emulated_position;
  }

  static decltype(::device::mojom::XRInputSourceState::is_auxiliary) is_auxiliary(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->is_auxiliary;
  }

  static decltype(::device::mojom::XRInputSourceState::primary_input_pressed) primary_input_pressed(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->primary_input_pressed;
  }

  static decltype(::device::mojom::XRInputSourceState::primary_input_clicked) primary_input_clicked(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->primary_input_clicked;
  }

  static decltype(::device::mojom::XRInputSourceState::primary_squeeze_pressed) primary_squeeze_pressed(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->primary_squeeze_pressed;
  }

  static decltype(::device::mojom::XRInputSourceState::primary_squeeze_clicked) primary_squeeze_clicked(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->primary_squeeze_clicked;
  }

  static const decltype(::device::mojom::XRInputSourceState::gamepad)& gamepad(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->gamepad;
  }

  static const decltype(::device::mojom::XRInputSourceState::overlay_pointer_position)& overlay_pointer_position(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->overlay_pointer_position;
  }

  static const decltype(::device::mojom::XRInputSourceState::hand_tracking_data)& hand_tracking_data(
      const ::device::mojom::XRInputSourceStatePtr& input) {
    return input->hand_tracking_data;
  }

  static bool Read(::device::mojom::XRInputSourceState::DataView input, ::device::mojom::XRInputSourceStatePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::VRFieldOfView::DataView,
                                         ::device::mojom::VRFieldOfViewPtr> {
  static bool IsNull(const ::device::mojom::VRFieldOfViewPtr& input) { return !input; }
  static void SetToNull(::device::mojom::VRFieldOfViewPtr* output) { output->reset(); }

  static decltype(::device::mojom::VRFieldOfView::up_degrees) up_degrees(
      const ::device::mojom::VRFieldOfViewPtr& input) {
    return input->up_degrees;
  }

  static decltype(::device::mojom::VRFieldOfView::down_degrees) down_degrees(
      const ::device::mojom::VRFieldOfViewPtr& input) {
    return input->down_degrees;
  }

  static decltype(::device::mojom::VRFieldOfView::left_degrees) left_degrees(
      const ::device::mojom::VRFieldOfViewPtr& input) {
    return input->left_degrees;
  }

  static decltype(::device::mojom::VRFieldOfView::right_degrees) right_degrees(
      const ::device::mojom::VRFieldOfViewPtr& input) {
    return input->right_degrees;
  }

  static bool Read(::device::mojom::VRFieldOfView::DataView input, ::device::mojom::VRFieldOfViewPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::VRPose::DataView,
                                         ::device::mojom::VRPosePtr> {
  static bool IsNull(const ::device::mojom::VRPosePtr& input) { return !input; }
  static void SetToNull(::device::mojom::VRPosePtr* output) { output->reset(); }

  static const decltype(::device::mojom::VRPose::orientation)& orientation(
      const ::device::mojom::VRPosePtr& input) {
    return input->orientation;
  }

  static const decltype(::device::mojom::VRPose::position)& position(
      const ::device::mojom::VRPosePtr& input) {
    return input->position;
  }

  static decltype(::device::mojom::VRPose::emulated_position) emulated_position(
      const ::device::mojom::VRPosePtr& input) {
    return input->emulated_position;
  }

  static bool Read(::device::mojom::VRPose::DataView input, ::device::mojom::VRPosePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::Pose::DataView,
                                         ::device::mojom::PosePtr> {
  static bool IsNull(const ::device::mojom::PosePtr& input) { return !input; }
  static void SetToNull(::device::mojom::PosePtr* output) { output->reset(); }

  static const decltype(::device::mojom::Pose::orientation)& orientation(
      const ::device::mojom::PosePtr& input) {
    return input->orientation;
  }

  static const decltype(::device::mojom::Pose::position)& position(
      const ::device::mojom::PosePtr& input) {
    return input->position;
  }

  static bool Read(::device::mojom::Pose::DataView input, ::device::mojom::PosePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::AnchorId::DataView,
                                         ::device::mojom::AnchorIdPtr> {
  static bool IsNull(const ::device::mojom::AnchorIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::AnchorIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::AnchorId::id_value) id_value(
      const ::device::mojom::AnchorIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::AnchorId::DataView input, ::device::mojom::AnchorIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::HitTestSubscriptionId::DataView,
                                         ::device::mojom::HitTestSubscriptionIdPtr> {
  static bool IsNull(const ::device::mojom::HitTestSubscriptionIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::HitTestSubscriptionIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::HitTestSubscriptionId::id_value) id_value(
      const ::device::mojom::HitTestSubscriptionIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::HitTestSubscriptionId::DataView input, ::device::mojom::HitTestSubscriptionIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::PlaneId::DataView,
                                         ::device::mojom::PlaneIdPtr> {
  static bool IsNull(const ::device::mojom::PlaneIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::PlaneIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::PlaneId::id_value) id_value(
      const ::device::mojom::PlaneIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::PlaneId::DataView input, ::device::mojom::PlaneIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::MeshId::DataView,
                                         ::device::mojom::MeshIdPtr> {
  static bool IsNull(const ::device::mojom::MeshIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::MeshIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::MeshId::id_value) id_value(
      const ::device::mojom::MeshIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::MeshId::DataView input, ::device::mojom::MeshIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XrVisibilityMaskId::DataView,
                                         ::device::mojom::XrVisibilityMaskIdPtr> {
  static bool IsNull(const ::device::mojom::XrVisibilityMaskIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XrVisibilityMaskIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::XrVisibilityMaskId::id_value) id_value(
      const ::device::mojom::XrVisibilityMaskIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::XrVisibilityMaskId::DataView input, ::device::mojom::XrVisibilityMaskIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRRay::DataView,
                                         ::device::mojom::XRRayPtr> {
  static bool IsNull(const ::device::mojom::XRRayPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRRayPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRRay::origin)& origin(
      const ::device::mojom::XRRayPtr& input) {
    return input->origin;
  }

  static const decltype(::device::mojom::XRRay::direction)& direction(
      const ::device::mojom::XRRayPtr& input) {
    return input->direction;
  }

  static bool Read(::device::mojom::XRRay::DataView input, ::device::mojom::XRRayPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRHitResult::DataView,
                                         ::device::mojom::XRHitResultPtr> {
  static bool IsNull(const ::device::mojom::XRHitResultPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRHitResultPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRHitResult::mojo_from_result)& mojo_from_result(
      const ::device::mojom::XRHitResultPtr& input) {
    return input->mojo_from_result;
  }

  static const decltype(::device::mojom::XRHitResult::plane_id)& plane_id(
      const ::device::mojom::XRHitResultPtr& input) {
    return input->plane_id;
  }

  static bool Read(::device::mojom::XRHitResult::DataView input, ::device::mojom::XRHitResultPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRViewGeometry::DataView,
                                         ::device::mojom::XRViewGeometryPtr> {
  static bool IsNull(const ::device::mojom::XRViewGeometryPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRViewGeometryPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRViewGeometry::field_of_view)& field_of_view(
      const ::device::mojom::XRViewGeometryPtr& input) {
    return input->field_of_view;
  }

  static const decltype(::device::mojom::XRViewGeometry::mojo_from_view)& mojo_from_view(
      const ::device::mojom::XRViewGeometryPtr& input) {
    return input->mojo_from_view;
  }

  static bool Read(::device::mojom::XRViewGeometry::DataView input, ::device::mojom::XRViewGeometryPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRVisibilityMask::DataView,
                                         ::device::mojom::XRVisibilityMaskPtr> {
  static bool IsNull(const ::device::mojom::XRVisibilityMaskPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRVisibilityMaskPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRVisibilityMask::vertices)& vertices(
      const ::device::mojom::XRVisibilityMaskPtr& input) {
    return input->vertices;
  }

  static const decltype(::device::mojom::XRVisibilityMask::unvalidated_indices)& unvalidated_indices(
      const ::device::mojom::XRVisibilityMaskPtr& input) {
    return input->unvalidated_indices;
  }

  static bool Read(::device::mojom::XRVisibilityMask::DataView input, ::device::mojom::XRVisibilityMaskPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRView::DataView,
                                         ::device::mojom::XRViewPtr> {
  static bool IsNull(const ::device::mojom::XRViewPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRViewPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRView::eye) eye(
      const ::device::mojom::XRViewPtr& input) {
    return input->eye;
  }

  static const decltype(::device::mojom::XRView::geometry)& geometry(
      const ::device::mojom::XRViewPtr& input) {
    return input->geometry;
  }

  static const decltype(::device::mojom::XRView::viewport)& viewport(
      const ::device::mojom::XRViewPtr& input) {
    return input->viewport;
  }

  static  decltype(::device::mojom::XRView::depth_data)& depth_data(
       ::device::mojom::XRViewPtr& input) {
    return input->depth_data;
  }

  static decltype(::device::mojom::XRView::is_first_person_observer) is_first_person_observer(
      const ::device::mojom::XRViewPtr& input) {
    return input->is_first_person_observer;
  }

  static const decltype(::device::mojom::XRView::visibility_mask)& visibility_mask(
      const ::device::mojom::XRViewPtr& input) {
    return input->visibility_mask;
  }

  static const decltype(::device::mojom::XRView::visibility_mask_id)& visibility_mask_id(
      const ::device::mojom::XRViewPtr& input) {
    return input->visibility_mask_id;
  }

  static bool Read(::device::mojom::XRView::DataView input, ::device::mojom::XRViewPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::VRStageParameters::DataView,
                                         ::device::mojom::VRStageParametersPtr> {
  static bool IsNull(const ::device::mojom::VRStageParametersPtr& input) { return !input; }
  static void SetToNull(::device::mojom::VRStageParametersPtr* output) { output->reset(); }

  static const decltype(::device::mojom::VRStageParameters::mojo_from_stage)& mojo_from_stage(
      const ::device::mojom::VRStageParametersPtr& input) {
    return input->mojo_from_stage;
  }

  static const decltype(::device::mojom::VRStageParameters::bounds)& bounds(
      const ::device::mojom::VRStageParametersPtr& input) {
    return input->bounds;
  }

  static bool Read(::device::mojom::VRStageParameters::DataView input, ::device::mojom::VRStageParametersPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRPresentationTransportOptions::DataView,
                                         ::device::mojom::XRPresentationTransportOptionsPtr> {
  static bool IsNull(const ::device::mojom::XRPresentationTransportOptionsPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRPresentationTransportOptionsPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRPresentationTransportOptions::transport_method) transport_method(
      const ::device::mojom::XRPresentationTransportOptionsPtr& input) {
    return input->transport_method;
  }

  static decltype(::device::mojom::XRPresentationTransportOptions::wait_for_transfer_notification) wait_for_transfer_notification(
      const ::device::mojom::XRPresentationTransportOptionsPtr& input) {
    return input->wait_for_transfer_notification;
  }

  static decltype(::device::mojom::XRPresentationTransportOptions::wait_for_render_notification) wait_for_render_notification(
      const ::device::mojom::XRPresentationTransportOptionsPtr& input) {
    return input->wait_for_render_notification;
  }

  static decltype(::device::mojom::XRPresentationTransportOptions::wait_for_gpu_fence) wait_for_gpu_fence(
      const ::device::mojom::XRPresentationTransportOptionsPtr& input) {
    return input->wait_for_gpu_fence;
  }

  static bool Read(::device::mojom::XRPresentationTransportOptions::DataView input, ::device::mojom::XRPresentationTransportOptionsPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRInputSourceSpaceInfo::DataView,
                                         ::device::mojom::XRInputSourceSpaceInfoPtr> {
  static bool IsNull(const ::device::mojom::XRInputSourceSpaceInfoPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRInputSourceSpaceInfoPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRInputSourceSpaceInfo::input_source_id) input_source_id(
      const ::device::mojom::XRInputSourceSpaceInfoPtr& input) {
    return input->input_source_id;
  }

  static decltype(::device::mojom::XRInputSourceSpaceInfo::input_source_space_type) input_source_space_type(
      const ::device::mojom::XRInputSourceSpaceInfoPtr& input) {
    return input->input_source_space_type;
  }

  static bool Read(::device::mojom::XRInputSourceSpaceInfo::DataView input, ::device::mojom::XRInputSourceSpaceInfoPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRHandJointSpaceInfo::DataView,
                                         ::device::mojom::XRHandJointSpaceInfoPtr> {
  static bool IsNull(const ::device::mojom::XRHandJointSpaceInfoPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRHandJointSpaceInfoPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRHandJointSpaceInfo::handedness) handedness(
      const ::device::mojom::XRHandJointSpaceInfoPtr& input) {
    return input->handedness;
  }

  static decltype(::device::mojom::XRHandJointSpaceInfo::joint) joint(
      const ::device::mojom::XRHandJointSpaceInfoPtr& input) {
    return input->joint;
  }

  static bool Read(::device::mojom::XRHandJointSpaceInfo::DataView input, ::device::mojom::XRHandJointSpaceInfoPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRPlanePointData::DataView,
                                         ::device::mojom::XRPlanePointDataPtr> {
  static bool IsNull(const ::device::mojom::XRPlanePointDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRPlanePointDataPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRPlanePointData::x) x(
      const ::device::mojom::XRPlanePointDataPtr& input) {
    return input->x;
  }

  static decltype(::device::mojom::XRPlanePointData::z) z(
      const ::device::mojom::XRPlanePointDataPtr& input) {
    return input->z;
  }

  static bool Read(::device::mojom::XRPlanePointData::DataView input, ::device::mojom::XRPlanePointDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRPlaneData::DataView,
                                         ::device::mojom::XRPlaneDataPtr> {
  static bool IsNull(const ::device::mojom::XRPlaneDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRPlaneDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRPlaneData::id)& id(
      const ::device::mojom::XRPlaneDataPtr& input) {
    return input->id;
  }

  static decltype(::device::mojom::XRPlaneData::orientation) orientation(
      const ::device::mojom::XRPlaneDataPtr& input) {
    return input->orientation;
  }

  static const decltype(::device::mojom::XRPlaneData::mojo_from_plane)& mojo_from_plane(
      const ::device::mojom::XRPlaneDataPtr& input) {
    return input->mojo_from_plane;
  }

  static decltype(::device::mojom::XRPlaneData::semantic_label) semantic_label(
      const ::device::mojom::XRPlaneDataPtr& input) {
    return input->semantic_label;
  }

  static const decltype(::device::mojom::XRPlaneData::polygon)& polygon(
      const ::device::mojom::XRPlaneDataPtr& input) {
    return input->polygon;
  }

  static bool Read(::device::mojom::XRPlaneData::DataView input, ::device::mojom::XRPlaneDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRPlaneDetectionData::DataView,
                                         ::device::mojom::XRPlaneDetectionDataPtr> {
  static bool IsNull(const ::device::mojom::XRPlaneDetectionDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRPlaneDetectionDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRPlaneDetectionData::all_planes_ids)& all_planes_ids(
      const ::device::mojom::XRPlaneDetectionDataPtr& input) {
    return input->all_planes_ids;
  }

  static const decltype(::device::mojom::XRPlaneDetectionData::updated_planes_data)& updated_planes_data(
      const ::device::mojom::XRPlaneDetectionDataPtr& input) {
    return input->updated_planes_data;
  }

  static bool Read(::device::mojom::XRPlaneDetectionData::DataView input, ::device::mojom::XRPlaneDetectionDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRMeshData::DataView,
                                         ::device::mojom::XRMeshDataPtr> {
  static bool IsNull(const ::device::mojom::XRMeshDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRMeshDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRMeshData::id)& id(
      const ::device::mojom::XRMeshDataPtr& input) {
    return input->id;
  }

  static const decltype(::device::mojom::XRMeshData::mojo_from_mesh)& mojo_from_mesh(
      const ::device::mojom::XRMeshDataPtr& input) {
    return input->mojo_from_mesh;
  }

  static const decltype(::device::mojom::XRMeshData::vertices)& vertices(
      const ::device::mojom::XRMeshDataPtr& input) {
    return input->vertices;
  }

  static const decltype(::device::mojom::XRMeshData::indices)& indices(
      const ::device::mojom::XRMeshDataPtr& input) {
    return input->indices;
  }

  static decltype(::device::mojom::XRMeshData::semantic_label) semantic_label(
      const ::device::mojom::XRMeshDataPtr& input) {
    return input->semantic_label;
  }

  static bool Read(::device::mojom::XRMeshData::DataView input, ::device::mojom::XRMeshDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRMeshDetectionData::DataView,
                                         ::device::mojom::XRMeshDetectionDataPtr> {
  static bool IsNull(const ::device::mojom::XRMeshDetectionDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRMeshDetectionDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRMeshDetectionData::all_meshes_ids)& all_meshes_ids(
      const ::device::mojom::XRMeshDetectionDataPtr& input) {
    return input->all_meshes_ids;
  }

  static const decltype(::device::mojom::XRMeshDetectionData::updated_meshes_data)& updated_meshes_data(
      const ::device::mojom::XRMeshDetectionDataPtr& input) {
    return input->updated_meshes_data;
  }

  static bool Read(::device::mojom::XRMeshDetectionData::DataView input, ::device::mojom::XRMeshDetectionDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRAnchorData::DataView,
                                         ::device::mojom::XRAnchorDataPtr> {
  static bool IsNull(const ::device::mojom::XRAnchorDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRAnchorDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRAnchorData::id)& id(
      const ::device::mojom::XRAnchorDataPtr& input) {
    return input->id;
  }

  static const decltype(::device::mojom::XRAnchorData::mojo_from_anchor)& mojo_from_anchor(
      const ::device::mojom::XRAnchorDataPtr& input) {
    return input->mojo_from_anchor;
  }

  static bool Read(::device::mojom::XRAnchorData::DataView input, ::device::mojom::XRAnchorDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRAnchorsData::DataView,
                                         ::device::mojom::XRAnchorsDataPtr> {
  static bool IsNull(const ::device::mojom::XRAnchorsDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRAnchorsDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRAnchorsData::all_anchors_ids)& all_anchors_ids(
      const ::device::mojom::XRAnchorsDataPtr& input) {
    return input->all_anchors_ids;
  }

  static const decltype(::device::mojom::XRAnchorsData::updated_anchors_data)& updated_anchors_data(
      const ::device::mojom::XRAnchorsDataPtr& input) {
    return input->updated_anchors_data;
  }

  static bool Read(::device::mojom::XRAnchorsData::DataView input, ::device::mojom::XRAnchorsDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRHitTestSubscriptionResultData::DataView,
                                         ::device::mojom::XRHitTestSubscriptionResultDataPtr> {
  static bool IsNull(const ::device::mojom::XRHitTestSubscriptionResultDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRHitTestSubscriptionResultDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRHitTestSubscriptionResultData::subscription_id)& subscription_id(
      const ::device::mojom::XRHitTestSubscriptionResultDataPtr& input) {
    return input->subscription_id;
  }

  static const decltype(::device::mojom::XRHitTestSubscriptionResultData::hit_test_results)& hit_test_results(
      const ::device::mojom::XRHitTestSubscriptionResultDataPtr& input) {
    return input->hit_test_results;
  }

  static bool Read(::device::mojom::XRHitTestSubscriptionResultData::DataView input, ::device::mojom::XRHitTestSubscriptionResultDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRHitTestTransientInputSubscriptionResultData::DataView,
                                         ::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr> {
  static bool IsNull(const ::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRHitTestTransientInputSubscriptionResultData::subscription_id)& subscription_id(
      const ::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr& input) {
    return input->subscription_id;
  }

  static const decltype(::device::mojom::XRHitTestTransientInputSubscriptionResultData::input_source_id_to_hit_test_results)& input_source_id_to_hit_test_results(
      const ::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr& input) {
    return input->input_source_id_to_hit_test_results;
  }

  static bool Read(::device::mojom::XRHitTestTransientInputSubscriptionResultData::DataView input, ::device::mojom::XRHitTestTransientInputSubscriptionResultDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRHitTestSubscriptionResultsData::DataView,
                                         ::device::mojom::XRHitTestSubscriptionResultsDataPtr> {
  static bool IsNull(const ::device::mojom::XRHitTestSubscriptionResultsDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRHitTestSubscriptionResultsDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRHitTestSubscriptionResultsData::results)& results(
      const ::device::mojom::XRHitTestSubscriptionResultsDataPtr& input) {
    return input->results;
  }

  static const decltype(::device::mojom::XRHitTestSubscriptionResultsData::transient_input_results)& transient_input_results(
      const ::device::mojom::XRHitTestSubscriptionResultsDataPtr& input) {
    return input->transient_input_results;
  }

  static bool Read(::device::mojom::XRHitTestSubscriptionResultsData::DataView input, ::device::mojom::XRHitTestSubscriptionResultsDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::RgbTupleF32::DataView,
                                         ::device::mojom::RgbTupleF32Ptr> {
  static bool IsNull(const ::device::mojom::RgbTupleF32Ptr& input) { return !input; }
  static void SetToNull(::device::mojom::RgbTupleF32Ptr* output) { output->reset(); }

  static decltype(::device::mojom::RgbTupleF32::red) red(
      const ::device::mojom::RgbTupleF32Ptr& input) {
    return input->red;
  }

  static decltype(::device::mojom::RgbTupleF32::green) green(
      const ::device::mojom::RgbTupleF32Ptr& input) {
    return input->green;
  }

  static decltype(::device::mojom::RgbTupleF32::blue) blue(
      const ::device::mojom::RgbTupleF32Ptr& input) {
    return input->blue;
  }

  static bool Read(::device::mojom::RgbTupleF32::DataView input, ::device::mojom::RgbTupleF32Ptr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRSphericalHarmonics::DataView,
                                         ::device::mojom::XRSphericalHarmonicsPtr> {
  static bool IsNull(const ::device::mojom::XRSphericalHarmonicsPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRSphericalHarmonicsPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRSphericalHarmonics::coefficients)& coefficients(
      const ::device::mojom::XRSphericalHarmonicsPtr& input) {
    return input->coefficients;
  }

  static bool Read(::device::mojom::XRSphericalHarmonics::DataView input, ::device::mojom::XRSphericalHarmonicsPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRCubeMap::DataView,
                                         ::device::mojom::XRCubeMapPtr> {
  static bool IsNull(const ::device::mojom::XRCubeMapPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRCubeMapPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRCubeMap::width_and_height) width_and_height(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->width_and_height;
  }

  static const decltype(::device::mojom::XRCubeMap::positive_x)& positive_x(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->positive_x;
  }

  static const decltype(::device::mojom::XRCubeMap::negative_x)& negative_x(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->negative_x;
  }

  static const decltype(::device::mojom::XRCubeMap::positive_y)& positive_y(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->positive_y;
  }

  static const decltype(::device::mojom::XRCubeMap::negative_y)& negative_y(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->negative_y;
  }

  static const decltype(::device::mojom::XRCubeMap::positive_z)& positive_z(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->positive_z;
  }

  static const decltype(::device::mojom::XRCubeMap::negative_z)& negative_z(
      const ::device::mojom::XRCubeMapPtr& input) {
    return input->negative_z;
  }

  static bool Read(::device::mojom::XRCubeMap::DataView input, ::device::mojom::XRCubeMapPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLightProbe::DataView,
                                         ::device::mojom::XRLightProbePtr> {
  static bool IsNull(const ::device::mojom::XRLightProbePtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLightProbePtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRLightProbe::spherical_harmonics)& spherical_harmonics(
      const ::device::mojom::XRLightProbePtr& input) {
    return input->spherical_harmonics;
  }

  static const decltype(::device::mojom::XRLightProbe::main_light_direction)& main_light_direction(
      const ::device::mojom::XRLightProbePtr& input) {
    return input->main_light_direction;
  }

  static const decltype(::device::mojom::XRLightProbe::main_light_intensity)& main_light_intensity(
      const ::device::mojom::XRLightProbePtr& input) {
    return input->main_light_intensity;
  }

  static bool Read(::device::mojom::XRLightProbe::DataView input, ::device::mojom::XRLightProbePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRReflectionProbe::DataView,
                                         ::device::mojom::XRReflectionProbePtr> {
  static bool IsNull(const ::device::mojom::XRReflectionProbePtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRReflectionProbePtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRReflectionProbe::cube_map)& cube_map(
      const ::device::mojom::XRReflectionProbePtr& input) {
    return input->cube_map;
  }

  static bool Read(::device::mojom::XRReflectionProbe::DataView input, ::device::mojom::XRReflectionProbePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLightEstimationData::DataView,
                                         ::device::mojom::XRLightEstimationDataPtr> {
  static bool IsNull(const ::device::mojom::XRLightEstimationDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLightEstimationDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRLightEstimationData::light_probe)& light_probe(
      const ::device::mojom::XRLightEstimationDataPtr& input) {
    return input->light_probe;
  }

  static const decltype(::device::mojom::XRLightEstimationData::reflection_probe)& reflection_probe(
      const ::device::mojom::XRLightEstimationDataPtr& input) {
    return input->reflection_probe;
  }

  static bool Read(::device::mojom::XRLightEstimationData::DataView input, ::device::mojom::XRLightEstimationDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRDepthDataStillValid::DataView,
                                         ::device::mojom::XRDepthDataStillValidPtr> {
  static bool IsNull(const ::device::mojom::XRDepthDataStillValidPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRDepthDataStillValidPtr* output) { output->reset(); }

  static bool Read(::device::mojom::XRDepthDataStillValid::DataView input, ::device::mojom::XRDepthDataStillValidPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRDepthDataUpdated::DataView,
                                         ::device::mojom::XRDepthDataUpdatedPtr> {
  static bool IsNull(const ::device::mojom::XRDepthDataUpdatedPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRDepthDataUpdatedPtr* output) { output->reset(); }

  static  decltype(::device::mojom::XRDepthDataUpdated::pixel_data)& pixel_data(
       ::device::mojom::XRDepthDataUpdatedPtr& input) {
    return input->pixel_data;
  }

  static const decltype(::device::mojom::XRDepthDataUpdated::norm_texture_from_norm_view)& norm_texture_from_norm_view(
      const ::device::mojom::XRDepthDataUpdatedPtr& input) {
    return input->norm_texture_from_norm_view;
  }

  static const decltype(::device::mojom::XRDepthDataUpdated::size)& size(
      const ::device::mojom::XRDepthDataUpdatedPtr& input) {
    return input->size;
  }

  static decltype(::device::mojom::XRDepthDataUpdated::raw_value_to_meters) raw_value_to_meters(
      const ::device::mojom::XRDepthDataUpdatedPtr& input) {
    return input->raw_value_to_meters;
  }

  static const decltype(::device::mojom::XRDepthDataUpdated::view_geometry)& view_geometry(
      const ::device::mojom::XRDepthDataUpdatedPtr& input) {
    return input->view_geometry;
  }

  static bool Read(::device::mojom::XRDepthDataUpdated::DataView input, ::device::mojom::XRDepthDataUpdatedPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRTrackedImageData::DataView,
                                         ::device::mojom::XRTrackedImageDataPtr> {
  static bool IsNull(const ::device::mojom::XRTrackedImageDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRTrackedImageDataPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRTrackedImageData::index) index(
      const ::device::mojom::XRTrackedImageDataPtr& input) {
    return input->index;
  }

  static const decltype(::device::mojom::XRTrackedImageData::mojo_from_image)& mojo_from_image(
      const ::device::mojom::XRTrackedImageDataPtr& input) {
    return input->mojo_from_image;
  }

  static decltype(::device::mojom::XRTrackedImageData::actively_tracked) actively_tracked(
      const ::device::mojom::XRTrackedImageDataPtr& input) {
    return input->actively_tracked;
  }

  static decltype(::device::mojom::XRTrackedImageData::width_in_meters) width_in_meters(
      const ::device::mojom::XRTrackedImageDataPtr& input) {
    return input->width_in_meters;
  }

  static bool Read(::device::mojom::XRTrackedImageData::DataView input, ::device::mojom::XRTrackedImageDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRTrackedImagesData::DataView,
                                         ::device::mojom::XRTrackedImagesDataPtr> {
  static bool IsNull(const ::device::mojom::XRTrackedImagesDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRTrackedImagesDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRTrackedImagesData::images_data)& images_data(
      const ::device::mojom::XRTrackedImagesDataPtr& input) {
    return input->images_data;
  }

  static const decltype(::device::mojom::XRTrackedImagesData::image_trackable_scores)& image_trackable_scores(
      const ::device::mojom::XRTrackedImagesDataPtr& input) {
    return input->image_trackable_scores;
  }

  static bool Read(::device::mojom::XRTrackedImagesData::DataView input, ::device::mojom::XRTrackedImagesDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::LayerId::DataView,
                                         ::device::mojom::LayerIdPtr> {
  static bool IsNull(const ::device::mojom::LayerIdPtr& input) { return !input; }
  static void SetToNull(::device::mojom::LayerIdPtr* output) { output->reset(); }

  static decltype(::device::mojom::LayerId::id_value) id_value(
      const ::device::mojom::LayerIdPtr& input) {
    return input->id_value;
  }

  static bool Read(::device::mojom::LayerId::DataView input, ::device::mojom::LayerIdPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRProjectionLayerData::DataView,
                                         ::device::mojom::XRProjectionLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XRProjectionLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRProjectionLayerDataPtr* output) { output->reset(); }

  static bool Read(::device::mojom::XRProjectionLayerData::DataView input, ::device::mojom::XRProjectionLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRQuadLayerData::DataView,
                                         ::device::mojom::XRQuadLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XRQuadLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRQuadLayerDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRQuadLayerData::native_origin_from_layer)& native_origin_from_layer(
      const ::device::mojom::XRQuadLayerDataPtr& input) {
    return input->native_origin_from_layer;
  }

  static decltype(::device::mojom::XRQuadLayerData::width) width(
      const ::device::mojom::XRQuadLayerDataPtr& input) {
    return input->width;
  }

  static decltype(::device::mojom::XRQuadLayerData::height) height(
      const ::device::mojom::XRQuadLayerDataPtr& input) {
    return input->height;
  }

  static bool Read(::device::mojom::XRQuadLayerData::DataView input, ::device::mojom::XRQuadLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRCylinderLayerData::DataView,
                                         ::device::mojom::XRCylinderLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XRCylinderLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRCylinderLayerDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRCylinderLayerData::native_origin_from_layer)& native_origin_from_layer(
      const ::device::mojom::XRCylinderLayerDataPtr& input) {
    return input->native_origin_from_layer;
  }

  static decltype(::device::mojom::XRCylinderLayerData::radius) radius(
      const ::device::mojom::XRCylinderLayerDataPtr& input) {
    return input->radius;
  }

  static decltype(::device::mojom::XRCylinderLayerData::central_angle) central_angle(
      const ::device::mojom::XRCylinderLayerDataPtr& input) {
    return input->central_angle;
  }

  static decltype(::device::mojom::XRCylinderLayerData::aspect_ratio) aspect_ratio(
      const ::device::mojom::XRCylinderLayerDataPtr& input) {
    return input->aspect_ratio;
  }

  static bool Read(::device::mojom::XRCylinderLayerData::DataView input, ::device::mojom::XRCylinderLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XREquirectLayerData::DataView,
                                         ::device::mojom::XREquirectLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XREquirectLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XREquirectLayerDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XREquirectLayerData::native_origin_from_layer)& native_origin_from_layer(
      const ::device::mojom::XREquirectLayerDataPtr& input) {
    return input->native_origin_from_layer;
  }

  static decltype(::device::mojom::XREquirectLayerData::radius) radius(
      const ::device::mojom::XREquirectLayerDataPtr& input) {
    return input->radius;
  }

  static decltype(::device::mojom::XREquirectLayerData::central_horizontal_angle) central_horizontal_angle(
      const ::device::mojom::XREquirectLayerDataPtr& input) {
    return input->central_horizontal_angle;
  }

  static decltype(::device::mojom::XREquirectLayerData::upper_vertical_angle) upper_vertical_angle(
      const ::device::mojom::XREquirectLayerDataPtr& input) {
    return input->upper_vertical_angle;
  }

  static decltype(::device::mojom::XREquirectLayerData::lower_vertical_angle) lower_vertical_angle(
      const ::device::mojom::XREquirectLayerDataPtr& input) {
    return input->lower_vertical_angle;
  }

  static bool Read(::device::mojom::XREquirectLayerData::DataView input, ::device::mojom::XREquirectLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRCubeLayerData::DataView,
                                         ::device::mojom::XRCubeLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XRCubeLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRCubeLayerDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRCubeLayerData::orientation)& orientation(
      const ::device::mojom::XRCubeLayerDataPtr& input) {
    return input->orientation;
  }

  static bool Read(::device::mojom::XRCubeLayerData::DataView input, ::device::mojom::XRCubeLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLayerReadOnlyData::DataView,
                                         ::device::mojom::XRLayerReadOnlyDataPtr> {
  static bool IsNull(const ::device::mojom::XRLayerReadOnlyDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLayerReadOnlyDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRLayerReadOnlyData::layer_id)& layer_id(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->layer_id;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::layout) layout(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->layout;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::texture_width) texture_width(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->texture_width;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::texture_height) texture_height(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->texture_height;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::is_static) is_static(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->is_static;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::flip_y) flip_y(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->flip_y;
  }

  static decltype(::device::mojom::XRLayerReadOnlyData::needs_raster_access) needs_raster_access(
      const ::device::mojom::XRLayerReadOnlyDataPtr& input) {
    return input->needs_raster_access;
  }

  static bool Read(::device::mojom::XRLayerReadOnlyData::DataView input, ::device::mojom::XRLayerReadOnlyDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLayerMutableData::DataView,
                                         ::device::mojom::XRLayerMutableDataPtr> {
  static bool IsNull(const ::device::mojom::XRLayerMutableDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLayerMutableDataPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRLayerMutableData::blend_texture_source_alpha) blend_texture_source_alpha(
      const ::device::mojom::XRLayerMutableDataPtr& input) {
    return input->blend_texture_source_alpha;
  }

  static decltype(::device::mojom::XRLayerMutableData::force_mono_presentation) force_mono_presentation(
      const ::device::mojom::XRLayerMutableDataPtr& input) {
    return input->force_mono_presentation;
  }

  static decltype(::device::mojom::XRLayerMutableData::opacity) opacity(
      const ::device::mojom::XRLayerMutableDataPtr& input) {
    return input->opacity;
  }

  static const decltype(::device::mojom::XRLayerMutableData::native_origin_information)& native_origin_information(
      const ::device::mojom::XRLayerMutableDataPtr& input) {
    return input->native_origin_information;
  }

  static const decltype(::device::mojom::XRLayerMutableData::layer_data)& layer_data(
      const ::device::mojom::XRLayerMutableDataPtr& input) {
    return input->layer_data;
  }

  static bool Read(::device::mojom::XRLayerMutableData::DataView input, ::device::mojom::XRLayerMutableDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRCompositionLayerData::DataView,
                                         ::device::mojom::XRCompositionLayerDataPtr> {
  static bool IsNull(const ::device::mojom::XRCompositionLayerDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRCompositionLayerDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRCompositionLayerData::read_only_data)& read_only_data(
      const ::device::mojom::XRCompositionLayerDataPtr& input) {
    return input->read_only_data;
  }

  static const decltype(::device::mojom::XRCompositionLayerData::mutable_data)& mutable_data(
      const ::device::mojom::XRCompositionLayerDataPtr& input) {
    return input->mutable_data;
  }

  static bool Read(::device::mojom::XRCompositionLayerData::DataView input, ::device::mojom::XRCompositionLayerDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLayerFrameData::DataView,
                                         ::device::mojom::XRLayerFrameDataPtr> {
  static bool IsNull(const ::device::mojom::XRLayerFrameDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLayerFrameDataPtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRLayerFrameData::layer_id)& layer_id(
      const ::device::mojom::XRLayerFrameDataPtr& input) {
    return input->layer_id;
  }

  static  decltype(::device::mojom::XRLayerFrameData::buffer_shared_image)& buffer_shared_image(
       ::device::mojom::XRLayerFrameDataPtr& input) {
    return input->buffer_shared_image;
  }

  static const decltype(::device::mojom::XRLayerFrameData::buffer_sync_token)& buffer_sync_token(
      const ::device::mojom::XRLayerFrameDataPtr& input) {
    return input->buffer_sync_token;
  }

  static bool Read(::device::mojom::XRLayerFrameData::DataView input, ::device::mojom::XRLayerFrameDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRRenderInfo::DataView,
                                         ::device::mojom::XRRenderInfoPtr> {
  static bool IsNull(const ::device::mojom::XRRenderInfoPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRRenderInfoPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRRenderInfo::frame_id) frame_id(
      const ::device::mojom::XRRenderInfoPtr& input) {
    return input->frame_id;
  }

  static const decltype(::device::mojom::XRRenderInfo::mojo_from_viewer)& mojo_from_viewer(
      const ::device::mojom::XRRenderInfoPtr& input) {
    return input->mojo_from_viewer;
  }

  static  decltype(::device::mojom::XRRenderInfo::views)& views(
       ::device::mojom::XRRenderInfoPtr& input) {
    return input->views;
  }

  static bool Read(::device::mojom::XRRenderInfo::DataView input, ::device::mojom::XRRenderInfoPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRFrameData::DataView,
                                         ::device::mojom::XRFrameDataPtr> {
  static bool IsNull(const ::device::mojom::XRFrameDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRFrameDataPtr* output) { output->reset(); }

  static  decltype(::device::mojom::XRFrameData::render_info)& render_info(
       ::device::mojom::XRFrameDataPtr& input) {
    return input->render_info;
  }

  static const decltype(::device::mojom::XRFrameData::time_delta)& time_delta(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->time_delta;
  }

  static  decltype(::device::mojom::XRFrameData::buffer_shared_image)& buffer_shared_image(
       ::device::mojom::XRFrameDataPtr& input) {
    return input->buffer_shared_image;
  }

  static const decltype(::device::mojom::XRFrameData::buffer_sync_token)& buffer_sync_token(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->buffer_sync_token;
  }

  static  decltype(::device::mojom::XRFrameData::camera_image_buffer_shared_image)& camera_image_buffer_shared_image(
       ::device::mojom::XRFrameDataPtr& input) {
    return input->camera_image_buffer_shared_image;
  }

  static const decltype(::device::mojom::XRFrameData::camera_image_buffer_sync_token)& camera_image_buffer_sync_token(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->camera_image_buffer_sync_token;
  }

  static const decltype(::device::mojom::XRFrameData::camera_image_size)& camera_image_size(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->camera_image_size;
  }

  static decltype(::device::mojom::XRFrameData::mojo_space_reset) mojo_space_reset(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->mojo_space_reset;
  }

  static const decltype(::device::mojom::XRFrameData::mojo_from_floor)& mojo_from_floor(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->mojo_from_floor;
  }

  static const decltype(::device::mojom::XRFrameData::input_state)& input_state(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->input_state;
  }

  static decltype(::device::mojom::XRFrameData::stage_parameters_id) stage_parameters_id(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->stage_parameters_id;
  }

  static const decltype(::device::mojom::XRFrameData::stage_parameters)& stage_parameters(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->stage_parameters;
  }

  static const decltype(::device::mojom::XRFrameData::detected_planes_data)& detected_planes_data(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->detected_planes_data;
  }

  static const decltype(::device::mojom::XRFrameData::detected_meshes_data)& detected_meshes_data(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->detected_meshes_data;
  }

  static const decltype(::device::mojom::XRFrameData::anchors_data)& anchors_data(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->anchors_data;
  }

  static  decltype(::device::mojom::XRFrameData::composition_layers_data)& composition_layers_data(
       ::device::mojom::XRFrameDataPtr& input) {
    return input->composition_layers_data;
  }

  static const decltype(::device::mojom::XRFrameData::light_estimation_data)& light_estimation_data(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->light_estimation_data;
  }

  static const decltype(::device::mojom::XRFrameData::hit_test_subscription_results)& hit_test_subscription_results(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->hit_test_subscription_results;
  }

  static decltype(::device::mojom::XRFrameData::rendering_time_ratio) rendering_time_ratio(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->rendering_time_ratio;
  }

  static const decltype(::device::mojom::XRFrameData::tracked_images)& tracked_images(
      const ::device::mojom::XRFrameDataPtr& input) {
    return input->tracked_images;
  }

  static bool Read(::device::mojom::XRFrameData::DataView input, ::device::mojom::XRFrameDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::RequestSessionSuccess::DataView,
                                         ::device::mojom::RequestSessionSuccessPtr> {
  static bool IsNull(const ::device::mojom::RequestSessionSuccessPtr& input) { return !input; }
  static void SetToNull(::device::mojom::RequestSessionSuccessPtr* output) { output->reset(); }

  static  decltype(::device::mojom::RequestSessionSuccess::session)& session(
       ::device::mojom::RequestSessionSuccessPtr& input) {
    return input->session;
  }

  static decltype(::device::mojom::RequestSessionSuccess::trace_id) trace_id(
      const ::device::mojom::RequestSessionSuccessPtr& input) {
    return input->trace_id;
  }

  static  decltype(::device::mojom::RequestSessionSuccess::metrics_recorder)& metrics_recorder(
       ::device::mojom::RequestSessionSuccessPtr& input) {
    return input->metrics_recorder;
  }

  static  decltype(::device::mojom::RequestSessionSuccess::xr_internals_listener)& xr_internals_listener(
       ::device::mojom::RequestSessionSuccessPtr& input) {
    return input->xr_internals_listener;
  }

  static bool Read(::device::mojom::RequestSessionSuccess::DataView input, ::device::mojom::RequestSessionSuccessPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRFrameDataRequestOptions::DataView,
                                         ::device::mojom::XRFrameDataRequestOptionsPtr> {
  static bool IsNull(const ::device::mojom::XRFrameDataRequestOptionsPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRFrameDataRequestOptionsPtr* output) { output->reset(); }

  static decltype(::device::mojom::XRFrameDataRequestOptions::include_lighting_estimation_data) include_lighting_estimation_data(
      const ::device::mojom::XRFrameDataRequestOptionsPtr& input) {
    return input->include_lighting_estimation_data;
  }

  static decltype(::device::mojom::XRFrameDataRequestOptions::depth_active) depth_active(
      const ::device::mojom::XRFrameDataRequestOptionsPtr& input) {
    return input->depth_active;
  }

  static decltype(::device::mojom::XRFrameDataRequestOptions::stage_parameters_id) stage_parameters_id(
      const ::device::mojom::XRFrameDataRequestOptionsPtr& input) {
    return input->stage_parameters_id;
  }

  static bool Read(::device::mojom::XRFrameDataRequestOptions::DataView input, ::device::mojom::XRFrameDataRequestOptionsPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) StructTraits<::device::mojom::XRLayerUpdate::DataView,
                                         ::device::mojom::XRLayerUpdatePtr> {
  static bool IsNull(const ::device::mojom::XRLayerUpdatePtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLayerUpdatePtr* output) { output->reset(); }

  static const decltype(::device::mojom::XRLayerUpdate::layer_id)& layer_id(
      const ::device::mojom::XRLayerUpdatePtr& input) {
    return input->layer_id;
  }

  static const decltype(::device::mojom::XRLayerUpdate::shared_image_export_result)& shared_image_export_result(
      const ::device::mojom::XRLayerUpdatePtr& input) {
    return input->shared_image_export_result;
  }

  static bool Read(::device::mojom::XRLayerUpdate::DataView input, ::device::mojom::XRLayerUpdatePtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) UnionTraits<::device::mojom::XRNativeOriginInformation::DataView,
                                        ::device::mojom::XRNativeOriginInformationPtr> {
  static bool IsNull(const ::device::mojom::XRNativeOriginInformationPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRNativeOriginInformationPtr* output) { output->reset(); }

  static ::device::mojom::XRNativeOriginInformation::Tag GetTag(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->which();
  }

  static const ::device::mojom::XRInputSourceSpaceInfoPtr& input_source_space_info(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_input_source_space_info();
  }

  static const ::device::PlaneId& plane_id(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_plane_id();
  }

  static const ::device::MeshId& mesh_id(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_mesh_id();
  }

  static const ::device::AnchorId& anchor_id(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_anchor_id();
  }

  static  ::device::mojom::XRReferenceSpaceType reference_space_type(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_reference_space_type();
  }

  static const ::device::mojom::XRHandJointSpaceInfoPtr& hand_joint_space_info(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_hand_joint_space_info();
  }

  static  uint32_t image_index(const ::device::mojom::XRNativeOriginInformationPtr& input) {
    return input->get_image_index();
  }

  static bool Read(::device::mojom::XRNativeOriginInformation::DataView input, ::device::mojom::XRNativeOriginInformationPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) UnionTraits<::device::mojom::XRDepthData::DataView,
                                        ::device::mojom::XRDepthDataPtr> {
  static bool IsNull(const ::device::mojom::XRDepthDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRDepthDataPtr* output) { output->reset(); }

  static ::device::mojom::XRDepthData::Tag GetTag(const ::device::mojom::XRDepthDataPtr& input) {
    return input->which();
  }

  static const ::device::mojom::XRDepthDataStillValidPtr& data_still_valid(const ::device::mojom::XRDepthDataPtr& input) {
    return input->get_data_still_valid();
  }

  static  ::device::mojom::XRDepthDataUpdatedPtr& updated_depth_data( ::device::mojom::XRDepthDataPtr& input) {
    return input->get_updated_depth_data();
  }

  static bool Read(::device::mojom::XRDepthData::DataView input, ::device::mojom::XRDepthDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) UnionTraits<::device::mojom::XRLayerSpecificData::DataView,
                                        ::device::mojom::XRLayerSpecificDataPtr> {
  static bool IsNull(const ::device::mojom::XRLayerSpecificDataPtr& input) { return !input; }
  static void SetToNull(::device::mojom::XRLayerSpecificDataPtr* output) { output->reset(); }

  static ::device::mojom::XRLayerSpecificData::Tag GetTag(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->which();
  }

  static const ::device::mojom::XRProjectionLayerDataPtr& projection(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->get_projection();
  }

  static const ::device::mojom::XRQuadLayerDataPtr& quad(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->get_quad();
  }

  static const ::device::mojom::XRCylinderLayerDataPtr& cylinder(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->get_cylinder();
  }

  static const ::device::mojom::XREquirectLayerDataPtr& equirect(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->get_equirect();
  }

  static const ::device::mojom::XRCubeLayerDataPtr& cube(const ::device::mojom::XRLayerSpecificDataPtr& input) {
    return input->get_cube();
  }

  static bool Read(::device::mojom::XRLayerSpecificData::DataView input, ::device::mojom::XRLayerSpecificDataPtr* output);
};


template <>
struct COMPONENT_EXPORT(DEVICE_VR_SERVICE_MOJO_BINDINGS) UnionTraits<::device::mojom::RequestSessionResult::DataView,
                                        ::device::mojom::RequestSessionResultPtr> {
  static bool IsNull(const ::device::mojom::RequestSessionResultPtr& input) { return !input; }
  static void SetToNull(::device::mojom::RequestSessionResultPtr* output) { output->reset(); }

  static ::device::mojom::RequestSessionResult::Tag GetTag(const ::device::mojom::RequestSessionResultPtr& input) {
    return input->which();
  }

  static  ::device::mojom::RequestSessionSuccessPtr& success( ::device::mojom::RequestSessionResultPtr& input) {
    return input->get_success();
  }

  static  ::device::mojom::RequestSessionError failure_reason(const ::device::mojom::RequestSessionResultPtr& input) {
    return input->get_failure_reason();
  }

  static bool Read(::device::mojom::RequestSessionResult::DataView input, ::device::mojom::RequestSessionResultPtr* output);
};

}  // namespace mojo

#endif  // DEVICE_VR_PUBLIC_MOJOM_VR_SERVICE_MOJOM_H_