// components/page_load_metrics/common/page_load_metrics.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit

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

#ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_METRICS_MOJOM_SHARED_H_
#define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_METRICS_MOJOM_SHARED_H_

#include <stdint.h>

#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "mojo/public/cpp/system/message_pipe.h"

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

#include "components/page_load_metrics/common/page_load_metrics.mojom-shared-internal.h"
#include "mojo/public/mojom/base/byte_size.mojom-shared.h"
#include "mojo/public/mojom/base/shared_memory.mojom-shared.h"
#include "mojo/public/mojom/base/time.mojom-shared.h"
#include "mojo/public/mojom/base/unguessable_token.mojom-shared.h"
#include "services/network/public/mojom/request_priority.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/javascript_framework_detection.mojom-shared.h"
#include "third_party/blink/public/mojom/navigation/navigation_type_for_navigation_api.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom-shared.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization.h"
#include "mojo/public/cpp/system/data_pipe.h"



#include "components/page_load_metrics/common/page_load_metrics.mojom-data-view.h"  // IWYU pragma: export




namespace std {

template <>
struct hash<::page_load_metrics::mojom::ScriptType>
    : public mojo::internal::EnumHashImpl<::page_load_metrics::mojom::ScriptType> {};

template <>
struct hash<::page_load_metrics::mojom::CacheType>
    : public mojo::internal::EnumHashImpl<::page_load_metrics::mojom::CacheType> {};

}  // namespace std

namespace mojo {


namespace internal {

template <typename MaybeConstUserType>
struct Serializer<::page_load_metrics::mojom::ScriptType, MaybeConstUserType> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = EnumTraits<::page_load_metrics::mojom::ScriptType, UserType>;

  static void Serialize(UserType input, int32_t* output) {
    *output = static_cast<int32_t>(Traits::ToMojom(input));
  }

  static bool Deserialize(int32_t input, UserType* output) {
    auto known_value = ::mojo::internal::ToKnownEnumValueHelper(
        static_cast<::page_load_metrics::mojom::ScriptType>(input));
    if constexpr (requires {
                    {
                      Traits::FromMojom(known_value)
                    } -> std::same_as<UserType>;
                  }) {
      static_assert(std::same_as<::page_load_metrics::mojom::ScriptType, UserType> ||
                        HasInfallibleConversion(::page_load_metrics::mojom::ScriptType()),
                    "::page_load_metrics::mojom::ScriptType does not have an infallible conversion, "
                    "use an optional return type.");
      *output = Traits::FromMojom(known_value);
      return true;
    } else {
      static_assert(
          requires {
            {
              Traits::FromMojom(known_value)
            } -> std::same_as<std::optional<UserType>>;
          }, "FromMojom must return by value or optional.");
      std::optional<UserType> from_mojom = Traits::FromMojom(known_value);
      if (from_mojom) {
        *output = *from_mojom;
      }
      return from_mojom.has_value();
    }
  }
};

}  // namespace internal


namespace internal {

template <typename MaybeConstUserType>
struct Serializer<::page_load_metrics::mojom::CacheType, MaybeConstUserType> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = EnumTraits<::page_load_metrics::mojom::CacheType, UserType>;

  static void Serialize(UserType input, int32_t* output) {
    *output = static_cast<int32_t>(Traits::ToMojom(input));
  }

  static bool Deserialize(int32_t input, UserType* output) {
    auto known_value = ::mojo::internal::ToKnownEnumValueHelper(
        static_cast<::page_load_metrics::mojom::CacheType>(input));
    if constexpr (requires {
                    {
                      Traits::FromMojom(known_value)
                    } -> std::same_as<UserType>;
                  }) {
      static_assert(std::same_as<::page_load_metrics::mojom::CacheType, UserType> ||
                        HasInfallibleConversion(::page_load_metrics::mojom::CacheType()),
                    "::page_load_metrics::mojom::CacheType does not have an infallible conversion, "
                    "use an optional return type.");
      *output = Traits::FromMojom(known_value);
      return true;
    } else {
      static_assert(
          requires {
            {
              Traits::FromMojom(known_value)
            } -> std::same_as<std::optional<UserType>>;
          }, "FromMojom must return by value or optional.");
      std::optional<UserType> from_mojom = Traits::FromMojom(known_value);
      if (from_mojom) {
        *output = *from_mojom;
      }
      return from_mojom.has_value();
    }
  }
};

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::dom_content_loaded_event_start(input)) in_dom_content_loaded_event_start = Traits::dom_content_loaded_event_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->dom_content_loaded_event_start)::BaseType> dom_content_loaded_event_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_dom_content_loaded_event_start,
      dom_content_loaded_event_start_fragment);

    fragment->dom_content_loaded_event_start.Set(
        dom_content_loaded_event_start_fragment.is_null() ? nullptr : dom_content_loaded_event_start_fragment.data());

    decltype(Traits::load_event_start(input)) in_load_event_start = Traits::load_event_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->load_event_start)::BaseType> load_event_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_load_event_start,
      load_event_start_fragment);

    fragment->load_event_start.Set(
        load_event_start_fragment.is_null() ? nullptr : load_event_start_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::discovery_time(input)) in_discovery_time = Traits::discovery_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->discovery_time)::BaseType> discovery_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_discovery_time,
      discovery_time_fragment);

    fragment->discovery_time.Set(
        discovery_time_fragment.is_null() ? nullptr : discovery_time_fragment.data());

    decltype(Traits::load_start(input)) in_load_start = Traits::load_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->load_start)::BaseType> load_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_load_start,
      load_start_fragment);

    fragment->load_start.Set(
        load_start_fragment.is_null() ? nullptr : load_start_fragment.data());

    decltype(Traits::load_end(input)) in_load_end = Traits::load_end(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->load_end)::BaseType> load_end_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_load_end,
      load_end_fragment);

    fragment->load_end.Set(
        load_end_fragment.is_null() ? nullptr : load_end_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::largest_image_paint(input)) in_largest_image_paint = Traits::largest_image_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->largest_image_paint)::BaseType> largest_image_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_largest_image_paint,
      largest_image_paint_fragment);

    fragment->largest_image_paint.Set(
        largest_image_paint_fragment.is_null() ? nullptr : largest_image_paint_fragment.data());

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

    decltype(Traits::largest_text_paint(input)) in_largest_text_paint = Traits::largest_text_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->largest_text_paint)::BaseType> largest_text_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_largest_text_paint,
      largest_text_paint_fragment);

    fragment->largest_text_paint.Set(
        largest_text_paint_fragment.is_null() ? nullptr : largest_text_paint_fragment.data());

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

    decltype(Traits::resource_load_timings(input)) in_resource_load_timings = Traits::resource_load_timings(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->resource_load_timings)::BaseType> resource_load_timings_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::LcpResourceLoadTimingsDataView>(
      in_resource_load_timings,
      resource_load_timings_fragment);

    fragment->resource_load_timings.Set(
        resource_load_timings_fragment.is_null() ? nullptr : resource_load_timings_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->resource_load_timings.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null resource_load_timings in LargestContentfulPaintTiming struct");

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

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

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

    
    mojo::internal::Serialize<::network::mojom::RequestPriority>(
      Traits::image_request_priority_value(input),
      &fragment->image_request_priority_value);

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

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::first_paint(input)) in_first_paint = Traits::first_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_paint)::BaseType> first_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_paint,
      first_paint_fragment);

    fragment->first_paint.Set(
        first_paint_fragment.is_null() ? nullptr : first_paint_fragment.data());

    decltype(Traits::first_image_paint(input)) in_first_image_paint = Traits::first_image_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_image_paint)::BaseType> first_image_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_image_paint,
      first_image_paint_fragment);

    fragment->first_image_paint.Set(
        first_image_paint_fragment.is_null() ? nullptr : first_image_paint_fragment.data());

    decltype(Traits::first_contentful_paint(input)) in_first_contentful_paint = Traits::first_contentful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_contentful_paint)::BaseType> first_contentful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_contentful_paint,
      first_contentful_paint_fragment);

    fragment->first_contentful_paint.Set(
        first_contentful_paint_fragment.is_null() ? nullptr : first_contentful_paint_fragment.data());

    decltype(Traits::first_meaningful_paint(input)) in_first_meaningful_paint = Traits::first_meaningful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_meaningful_paint)::BaseType> first_meaningful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_meaningful_paint,
      first_meaningful_paint_fragment);

    fragment->first_meaningful_paint.Set(
        first_meaningful_paint_fragment.is_null() ? nullptr : first_meaningful_paint_fragment.data());

    decltype(Traits::largest_contentful_paint(input)) in_largest_contentful_paint = Traits::largest_contentful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->largest_contentful_paint)::BaseType> largest_contentful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::LargestContentfulPaintTimingDataView>(
      in_largest_contentful_paint,
      largest_contentful_paint_fragment);

    fragment->largest_contentful_paint.Set(
        largest_contentful_paint_fragment.is_null() ? nullptr : largest_contentful_paint_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->largest_contentful_paint.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null largest_contentful_paint in PaintTiming struct");

    decltype(Traits::experimental_largest_contentful_paint(input)) in_experimental_largest_contentful_paint = Traits::experimental_largest_contentful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->experimental_largest_contentful_paint)::BaseType> experimental_largest_contentful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::LargestContentfulPaintTimingDataView>(
      in_experimental_largest_contentful_paint,
      experimental_largest_contentful_paint_fragment);

    fragment->experimental_largest_contentful_paint.Set(
        experimental_largest_contentful_paint_fragment.is_null() ? nullptr : experimental_largest_contentful_paint_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->experimental_largest_contentful_paint.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null experimental_largest_contentful_paint in PaintTiming struct");

    decltype(Traits::first_eligible_to_paint(input)) in_first_eligible_to_paint = Traits::first_eligible_to_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_eligible_to_paint)::BaseType> first_eligible_to_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_eligible_to_paint,
      first_eligible_to_paint_fragment);

    fragment->first_eligible_to_paint.Set(
        first_eligible_to_paint_fragment.is_null() ? nullptr : first_eligible_to_paint_fragment.data());

    decltype(Traits::first_input_or_scroll_notified_timestamp(input)) in_first_input_or_scroll_notified_timestamp = Traits::first_input_or_scroll_notified_timestamp(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_input_or_scroll_notified_timestamp)::BaseType> first_input_or_scroll_notified_timestamp_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_input_or_scroll_notified_timestamp,
      first_input_or_scroll_notified_timestamp_fragment);

    fragment->first_input_or_scroll_notified_timestamp.Set(
        first_input_or_scroll_notified_timestamp_fragment.is_null() ? nullptr : first_input_or_scroll_notified_timestamp_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::first_paint(input)) in_first_paint = Traits::first_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_paint)::BaseType> first_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_first_paint,
      first_paint_fragment);

    fragment->first_paint.Set(
        first_paint_fragment.is_null() ? nullptr : first_paint_fragment.data());

    decltype(Traits::first_contentful_paint(input)) in_first_contentful_paint = Traits::first_contentful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_contentful_paint)::BaseType> first_contentful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_first_contentful_paint,
      first_contentful_paint_fragment);

    fragment->first_contentful_paint.Set(
        first_contentful_paint_fragment.is_null() ? nullptr : first_contentful_paint_fragment.data());

    decltype(Traits::first_contentful_paint_submitted(input)) in_first_contentful_paint_submitted = Traits::first_contentful_paint_submitted(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_contentful_paint_submitted)::BaseType> first_contentful_paint_submitted_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_first_contentful_paint_submitted,
      first_contentful_paint_submitted_fragment);

    fragment->first_contentful_paint_submitted.Set(
        first_contentful_paint_submitted_fragment.is_null() ? nullptr : first_contentful_paint_submitted_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::parse_start(input)) in_parse_start = Traits::parse_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_start)::BaseType> parse_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_start,
      parse_start_fragment);

    fragment->parse_start.Set(
        parse_start_fragment.is_null() ? nullptr : parse_start_fragment.data());

    decltype(Traits::parse_stop(input)) in_parse_stop = Traits::parse_stop(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_stop)::BaseType> parse_stop_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_stop,
      parse_stop_fragment);

    fragment->parse_stop.Set(
        parse_stop_fragment.is_null() ? nullptr : parse_stop_fragment.data());

    decltype(Traits::parse_blocked_on_script_load_duration(input)) in_parse_blocked_on_script_load_duration = Traits::parse_blocked_on_script_load_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_blocked_on_script_load_duration)::BaseType> parse_blocked_on_script_load_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_blocked_on_script_load_duration,
      parse_blocked_on_script_load_duration_fragment);

    fragment->parse_blocked_on_script_load_duration.Set(
        parse_blocked_on_script_load_duration_fragment.is_null() ? nullptr : parse_blocked_on_script_load_duration_fragment.data());

    decltype(Traits::parse_blocked_on_script_load_from_document_write_duration(input)) in_parse_blocked_on_script_load_from_document_write_duration = Traits::parse_blocked_on_script_load_from_document_write_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_blocked_on_script_load_from_document_write_duration)::BaseType> parse_blocked_on_script_load_from_document_write_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_blocked_on_script_load_from_document_write_duration,
      parse_blocked_on_script_load_from_document_write_duration_fragment);

    fragment->parse_blocked_on_script_load_from_document_write_duration.Set(
        parse_blocked_on_script_load_from_document_write_duration_fragment.is_null() ? nullptr : parse_blocked_on_script_load_from_document_write_duration_fragment.data());

    decltype(Traits::parse_blocked_on_script_execution_duration(input)) in_parse_blocked_on_script_execution_duration = Traits::parse_blocked_on_script_execution_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_blocked_on_script_execution_duration)::BaseType> parse_blocked_on_script_execution_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_blocked_on_script_execution_duration,
      parse_blocked_on_script_execution_duration_fragment);

    fragment->parse_blocked_on_script_execution_duration.Set(
        parse_blocked_on_script_execution_duration_fragment.is_null() ? nullptr : parse_blocked_on_script_execution_duration_fragment.data());

    decltype(Traits::parse_blocked_on_script_execution_from_document_write_duration(input)) in_parse_blocked_on_script_execution_from_document_write_duration = Traits::parse_blocked_on_script_execution_from_document_write_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_blocked_on_script_execution_from_document_write_duration)::BaseType> parse_blocked_on_script_execution_from_document_write_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_parse_blocked_on_script_execution_from_document_write_duration,
      parse_blocked_on_script_execution_from_document_write_duration_fragment);

    fragment->parse_blocked_on_script_execution_from_document_write_duration.Set(
        parse_blocked_on_script_execution_from_document_write_duration_fragment.is_null() ? nullptr : parse_blocked_on_script_execution_from_document_write_duration_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::first_input_delay(input)) in_first_input_delay = Traits::first_input_delay(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_input_delay)::BaseType> first_input_delay_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_input_delay,
      first_input_delay_fragment);

    fragment->first_input_delay.Set(
        first_input_delay_fragment.is_null() ? nullptr : first_input_delay_fragment.data());

    decltype(Traits::first_input_timestamp(input)) in_first_input_timestamp = Traits::first_input_timestamp(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_input_timestamp)::BaseType> first_input_timestamp_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_input_timestamp,
      first_input_timestamp_fragment);

    fragment->first_input_timestamp.Set(
        first_input_timestamp_fragment.is_null() ? nullptr : first_input_timestamp_fragment.data());

    decltype(Traits::first_scroll_delay(input)) in_first_scroll_delay = Traits::first_scroll_delay(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_scroll_delay)::BaseType> first_scroll_delay_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_scroll_delay,
      first_scroll_delay_fragment);

    fragment->first_scroll_delay.Set(
        first_scroll_delay_fragment.is_null() ? nullptr : first_scroll_delay_fragment.data());

    decltype(Traits::first_scroll_timestamp(input)) in_first_scroll_timestamp = Traits::first_scroll_timestamp(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_scroll_timestamp)::BaseType> first_scroll_timestamp_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_scroll_timestamp,
      first_scroll_timestamp_fragment);

    fragment->first_scroll_timestamp.Set(
        first_scroll_timestamp_fragment.is_null() ? nullptr : first_scroll_timestamp_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::mark_name(input)) in_mark_name = Traits::mark_name(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->mark_name)::BaseType> mark_name_fragment(
            fragment.message());
    
    mojo::internal::Serialize<mojo::StringDataView>(
      in_mark_name,
      mark_name_fragment);

    fragment->mark_name.Set(
        mark_name_fragment.is_null() ? nullptr : mark_name_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->mark_name.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null mark_name in CustomUserTimingMark struct");

    decltype(Traits::start_time(input)) in_start_time = Traits::start_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->start_time)::BaseType> start_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_start_time,
      start_time_fragment);

    fragment->start_time.Set(
        start_time_fragment.is_null() ? nullptr : start_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->start_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null start_time in CustomUserTimingMark struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::domain_lookup_start(input)) in_domain_lookup_start = Traits::domain_lookup_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->domain_lookup_start)::BaseType> domain_lookup_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_domain_lookup_start,
      domain_lookup_start_fragment);

    fragment->domain_lookup_start.Set(
        domain_lookup_start_fragment.is_null() ? nullptr : domain_lookup_start_fragment.data());

    decltype(Traits::domain_lookup_end(input)) in_domain_lookup_end = Traits::domain_lookup_end(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->domain_lookup_end)::BaseType> domain_lookup_end_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_domain_lookup_end,
      domain_lookup_end_fragment);

    fragment->domain_lookup_end.Set(
        domain_lookup_end_fragment.is_null() ? nullptr : domain_lookup_end_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    
    mojo::internal::Serialize<::page_load_metrics::mojom::ScriptType>(
      Traits::script_type(input),
      &fragment->script_type);

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

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::fallback_duration(input)) in_fallback_duration = Traits::fallback_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->fallback_duration)::BaseType> fallback_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_fallback_duration,
      fallback_duration_fragment);

    fragment->fallback_duration.Set(
        fallback_duration_fragment.is_null() ? nullptr : fallback_duration_fragment.data());

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

    decltype(Traits::fallback_initial_duration(input)) in_fallback_initial_duration = Traits::fallback_initial_duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->fallback_initial_duration)::BaseType> fallback_initial_duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_fallback_initial_duration,
      fallback_initial_duration_fragment);

    fragment->fallback_initial_duration.Set(
        fallback_initial_duration_fragment.is_null() ? nullptr : fallback_initial_duration_fragment.data());

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

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

    decltype(Traits::script_fallback_metrics(input)) in_script_fallback_metrics = Traits::script_fallback_metrics(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->script_fallback_metrics)::BaseType>
        script_fallback_metrics_fragment(fragment.message());
    constexpr const mojo::internal::ContainerValidateParams& script_fallback_metrics_validate_params =
        mojo::internal::GetArrayValidator<0, false, nullptr>();
    
    mojo::internal::Serialize<mojo::ArrayDataView<::page_load_metrics::mojom::ScriptFallbackInfoDataView>>(
      in_script_fallback_metrics,
      script_fallback_metrics_fragment,
      &script_fallback_metrics_validate_params);

    fragment->script_fallback_metrics.Set(
        script_fallback_metrics_fragment.is_null() ? nullptr : script_fallback_metrics_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->script_fallback_metrics.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null script_fallback_metrics in FontLoadingMetrics struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::navigation_start(input)) in_navigation_start = Traits::navigation_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->navigation_start)::BaseType> navigation_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDataView>(
      in_navigation_start,
      navigation_start_fragment);

    fragment->navigation_start.Set(
        navigation_start_fragment.is_null() ? nullptr : navigation_start_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->navigation_start.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null navigation_start in PageLoadTiming struct");

    decltype(Traits::connect_start(input)) in_connect_start = Traits::connect_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->connect_start)::BaseType> connect_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_connect_start,
      connect_start_fragment);

    fragment->connect_start.Set(
        connect_start_fragment.is_null() ? nullptr : connect_start_fragment.data());

    decltype(Traits::connect_end(input)) in_connect_end = Traits::connect_end(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->connect_end)::BaseType> connect_end_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_connect_end,
      connect_end_fragment);

    fragment->connect_end.Set(
        connect_end_fragment.is_null() ? nullptr : connect_end_fragment.data());

    decltype(Traits::response_start(input)) in_response_start = Traits::response_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->response_start)::BaseType> response_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_response_start,
      response_start_fragment);

    fragment->response_start.Set(
        response_start_fragment.is_null() ? nullptr : response_start_fragment.data());

    decltype(Traits::document_timing(input)) in_document_timing = Traits::document_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->document_timing)::BaseType> document_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::DocumentTimingDataView>(
      in_document_timing,
      document_timing_fragment);

    fragment->document_timing.Set(
        document_timing_fragment.is_null() ? nullptr : document_timing_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->document_timing.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null document_timing in PageLoadTiming struct");

    decltype(Traits::interactive_timing(input)) in_interactive_timing = Traits::interactive_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->interactive_timing)::BaseType> interactive_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::InteractiveTimingDataView>(
      in_interactive_timing,
      interactive_timing_fragment);

    fragment->interactive_timing.Set(
        interactive_timing_fragment.is_null() ? nullptr : interactive_timing_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->interactive_timing.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null interactive_timing in PageLoadTiming struct");

    decltype(Traits::paint_timing(input)) in_paint_timing = Traits::paint_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->paint_timing)::BaseType> paint_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::PaintTimingDataView>(
      in_paint_timing,
      paint_timing_fragment);

    fragment->paint_timing.Set(
        paint_timing_fragment.is_null() ? nullptr : paint_timing_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->paint_timing.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null paint_timing in PageLoadTiming struct");

    decltype(Traits::parse_timing(input)) in_parse_timing = Traits::parse_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->parse_timing)::BaseType> parse_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::ParseTimingDataView>(
      in_parse_timing,
      parse_timing_fragment);

    fragment->parse_timing.Set(
        parse_timing_fragment.is_null() ? nullptr : parse_timing_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->parse_timing.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null parse_timing in PageLoadTiming struct");

    decltype(Traits::domain_lookup_timing(input)) in_domain_lookup_timing = Traits::domain_lookup_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->domain_lookup_timing)::BaseType> domain_lookup_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::DomainLookupTimingDataView>(
      in_domain_lookup_timing,
      domain_lookup_timing_fragment);

    fragment->domain_lookup_timing.Set(
        domain_lookup_timing_fragment.is_null() ? nullptr : domain_lookup_timing_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->domain_lookup_timing.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null domain_lookup_timing in PageLoadTiming struct");

    decltype(Traits::back_forward_cache_timings(input)) in_back_forward_cache_timings = Traits::back_forward_cache_timings(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->back_forward_cache_timings)::BaseType>
        back_forward_cache_timings_fragment(fragment.message());
    constexpr const mojo::internal::ContainerValidateParams& back_forward_cache_timings_validate_params =
        mojo::internal::GetArrayValidator<0, false, nullptr>();
    
    mojo::internal::Serialize<mojo::ArrayDataView<::page_load_metrics::mojom::BackForwardCacheTimingDataView>>(
      in_back_forward_cache_timings,
      back_forward_cache_timings_fragment,
      &back_forward_cache_timings_validate_params);

    fragment->back_forward_cache_timings.Set(
        back_forward_cache_timings_fragment.is_null() ? nullptr : back_forward_cache_timings_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->back_forward_cache_timings.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null back_forward_cache_timings in PageLoadTiming struct");

    decltype(Traits::activation_start(input)) in_activation_start = Traits::activation_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->activation_start)::BaseType> activation_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_activation_start,
      activation_start_fragment);

    fragment->activation_start.Set(
        activation_start_fragment.is_null() ? nullptr : activation_start_fragment.data());

    decltype(Traits::input_to_navigation_start(input)) in_input_to_navigation_start = Traits::input_to_navigation_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->input_to_navigation_start)::BaseType> input_to_navigation_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_input_to_navigation_start,
      input_to_navigation_start_fragment);

    fragment->input_to_navigation_start.Set(
        input_to_navigation_start_fragment.is_null() ? nullptr : input_to_navigation_start_fragment.data());

    decltype(Traits::user_timing_mark_fully_loaded(input)) in_user_timing_mark_fully_loaded = Traits::user_timing_mark_fully_loaded(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->user_timing_mark_fully_loaded)::BaseType> user_timing_mark_fully_loaded_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_user_timing_mark_fully_loaded,
      user_timing_mark_fully_loaded_fragment);

    fragment->user_timing_mark_fully_loaded.Set(
        user_timing_mark_fully_loaded_fragment.is_null() ? nullptr : user_timing_mark_fully_loaded_fragment.data());

    decltype(Traits::user_timing_mark_fully_visible(input)) in_user_timing_mark_fully_visible = Traits::user_timing_mark_fully_visible(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->user_timing_mark_fully_visible)::BaseType> user_timing_mark_fully_visible_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_user_timing_mark_fully_visible,
      user_timing_mark_fully_visible_fragment);

    fragment->user_timing_mark_fully_visible.Set(
        user_timing_mark_fully_visible_fragment.is_null() ? nullptr : user_timing_mark_fully_visible_fragment.data());

    decltype(Traits::user_timing_mark_interactive(input)) in_user_timing_mark_interactive = Traits::user_timing_mark_interactive(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->user_timing_mark_interactive)::BaseType> user_timing_mark_interactive_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_user_timing_mark_interactive,
      user_timing_mark_interactive_fragment);

    fragment->user_timing_mark_interactive.Set(
        user_timing_mark_interactive_fragment.is_null() ? nullptr : user_timing_mark_interactive_fragment.data());

    decltype(Traits::monotonic_paint_timing(input)) in_monotonic_paint_timing = Traits::monotonic_paint_timing(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->monotonic_paint_timing)::BaseType> monotonic_paint_timing_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::MonotonicPaintTimingDataView>(
      in_monotonic_paint_timing,
      monotonic_paint_timing_fragment);

    fragment->monotonic_paint_timing.Set(
        monotonic_paint_timing_fragment.is_null() ? nullptr : monotonic_paint_timing_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

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

    decltype(Traits::main_frame_rect(input)) in_main_frame_rect = Traits::main_frame_rect(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->main_frame_rect)::BaseType> main_frame_rect_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::gfx::mojom::RectDataView>(
      in_main_frame_rect,
      main_frame_rect_fragment);

    fragment->main_frame_rect.Set(
        main_frame_rect_fragment.is_null() ? nullptr : main_frame_rect_fragment.data());

    decltype(Traits::main_frame_viewport_rect(input)) in_main_frame_viewport_rect = Traits::main_frame_viewport_rect(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->main_frame_viewport_rect)::BaseType> main_frame_viewport_rect_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::gfx::mojom::RectDataView>(
      in_main_frame_viewport_rect,
      main_frame_viewport_rect_fragment);

    fragment->main_frame_viewport_rect.Set(
        main_frame_viewport_rect_fragment.is_null() ? nullptr : main_frame_viewport_rect_fragment.data());

    decltype(Traits::main_frame_ad_rects(input)) in_main_frame_ad_rects = Traits::main_frame_ad_rects(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->main_frame_ad_rects)::BaseType>
        main_frame_ad_rects_fragment(fragment.message());
    constexpr const mojo::internal::ContainerValidateParams& main_frame_ad_rects_validate_params =
        mojo::internal::GetMapValidator<*&mojo::internal::GetArrayValidator<0, false, nullptr>(), *&mojo::internal::GetArrayValidator<0, false, nullptr>()>();
    
    mojo::internal::Serialize<mojo::MapDataView<int32_t, ::gfx::mojom::RectDataView>>(
      in_main_frame_ad_rects,
      main_frame_ad_rects_fragment,
      &main_frame_ad_rects_validate_params);

    fragment->main_frame_ad_rects.Set(
        main_frame_ad_rects_fragment.is_null() ? nullptr : main_frame_ad_rects_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->main_frame_ad_rects.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null main_frame_ad_rects in FrameMetadata struct");

    decltype(Traits::framework_detection_result(input)) in_framework_detection_result = Traits::framework_detection_result(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->framework_detection_result)::BaseType> framework_detection_result_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::blink::mojom::JavaScriptFrameworkDetectionResultDataView>(
      in_framework_detection_result,
      framework_detection_result_fragment);

    fragment->framework_detection_result.Set(
        framework_detection_result_fragment.is_null() ? nullptr : framework_detection_result_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->framework_detection_result.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null framework_detection_result in FrameMetadata struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

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

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

    decltype(Traits::service_worker_subresource_load_metrics(input)) in_service_worker_subresource_load_metrics = Traits::service_worker_subresource_load_metrics(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->service_worker_subresource_load_metrics)::BaseType> service_worker_subresource_load_metrics_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::ServiceWorkerSubresourceLoadMetricsDataView>(
      in_service_worker_subresource_load_metrics,
      service_worker_subresource_load_metrics_fragment);

    fragment->service_worker_subresource_load_metrics.Set(
        service_worker_subresource_load_metrics_fragment.is_null() ? nullptr : service_worker_subresource_load_metrics_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    decltype(Traits::total_router_evaluation_time_for_subresources(input)) in_total_router_evaluation_time_for_subresources = Traits::total_router_evaluation_time_for_subresources(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->total_router_evaluation_time_for_subresources)::BaseType> total_router_evaluation_time_for_subresources_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_total_router_evaluation_time_for_subresources,
      total_router_evaluation_time_for_subresources_fragment);

    fragment->total_router_evaluation_time_for_subresources.Set(
        total_router_evaluation_time_for_subresources_fragment.is_null() ? nullptr : total_router_evaluation_time_for_subresources_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->total_router_evaluation_time_for_subresources.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null total_router_evaluation_time_for_subresources in ServiceWorkerSubresourceLoadMetrics struct");

    decltype(Traits::total_cache_lookup_time_for_subresources(input)) in_total_cache_lookup_time_for_subresources = Traits::total_cache_lookup_time_for_subresources(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->total_cache_lookup_time_for_subresources)::BaseType> total_cache_lookup_time_for_subresources_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_total_cache_lookup_time_for_subresources,
      total_cache_lookup_time_for_subresources_fragment);

    fragment->total_cache_lookup_time_for_subresources.Set(
        total_cache_lookup_time_for_subresources_fragment.is_null() ? nullptr : total_cache_lookup_time_for_subresources_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->total_cache_lookup_time_for_subresources.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null total_cache_lookup_time_for_subresources in ServiceWorkerSubresourceLoadMetrics struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

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

    decltype(Traits::delta_bytes(input)) in_delta_bytes = Traits::delta_bytes(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->delta_bytes)::BaseType> delta_bytes_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::ByteSizeDataView>(
      in_delta_bytes,
      delta_bytes_fragment);

    fragment->delta_bytes.Set(
        delta_bytes_fragment.is_null() ? nullptr : delta_bytes_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->delta_bytes.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null delta_bytes in ResourceDataUpdate struct");

    decltype(Traits::received_data_length(input)) in_received_data_length = Traits::received_data_length(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->received_data_length)::BaseType> received_data_length_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::ByteSizeDataView>(
      in_received_data_length,
      received_data_length_fragment);

    fragment->received_data_length.Set(
        received_data_length_fragment.is_null() ? nullptr : received_data_length_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->received_data_length.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null received_data_length in ResourceDataUpdate struct");

    decltype(Traits::encoded_body_length(input)) in_encoded_body_length = Traits::encoded_body_length(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->encoded_body_length)::BaseType> encoded_body_length_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::ByteSizeDataView>(
      in_encoded_body_length,
      encoded_body_length_fragment);

    fragment->encoded_body_length.Set(
        encoded_body_length_fragment.is_null() ? nullptr : encoded_body_length_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->encoded_body_length.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null encoded_body_length in ResourceDataUpdate struct");

    decltype(Traits::decoded_body_length(input)) in_decoded_body_length = Traits::decoded_body_length(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->decoded_body_length)::BaseType> decoded_body_length_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::ByteSizeDataView>(
      in_decoded_body_length,
      decoded_body_length_fragment);

    fragment->decoded_body_length.Set(
        decoded_body_length_fragment.is_null() ? nullptr : decoded_body_length_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->decoded_body_length.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null decoded_body_length in ResourceDataUpdate struct");

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

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

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

    
    mojo::internal::Serialize<::page_load_metrics::mojom::CacheType>(
      Traits::cache_type(input),
      &fragment->cache_type);

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

    decltype(Traits::mime_type(input)) in_mime_type = Traits::mime_type(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->mime_type)::BaseType> mime_type_fragment(
            fragment.message());
    
    mojo::internal::Serialize<mojo::StringDataView>(
      in_mime_type,
      mime_type_fragment);

    fragment->mime_type.Set(
        mime_type_fragment.is_null() ? nullptr : mime_type_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->mime_type.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null mime_type in ResourceDataUpdate struct");

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

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

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::layout_shift_time(input)) in_layout_shift_time = Traits::layout_shift_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->layout_shift_time)::BaseType> layout_shift_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_layout_shift_time,
      layout_shift_time_fragment);

    fragment->layout_shift_time.Set(
        layout_shift_time_fragment.is_null() ? nullptr : layout_shift_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->layout_shift_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null layout_shift_time in LayoutShift struct");

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

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

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

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::new_layout_shifts(input)) in_new_layout_shifts = Traits::new_layout_shifts(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->new_layout_shifts)::BaseType>
        new_layout_shifts_fragment(fragment.message());
    constexpr const mojo::internal::ContainerValidateParams& new_layout_shifts_validate_params =
        mojo::internal::GetArrayValidator<0, false, nullptr>();
    
    mojo::internal::Serialize<mojo::ArrayDataView<::page_load_metrics::mojom::LayoutShiftDataView>>(
      in_new_layout_shifts,
      new_layout_shifts_fragment,
      &new_layout_shifts_validate_params);

    fragment->new_layout_shifts.Set(
        new_layout_shifts_fragment.is_null() ? nullptr : new_layout_shifts_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->new_layout_shifts.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null new_layout_shifts in FrameRenderDataUpdate struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::task_time(input)) in_task_time = Traits::task_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->task_time)::BaseType> task_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_task_time,
      task_time_fragment);

    fragment->task_time.Set(
        task_time_fragment.is_null() ? nullptr : task_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->task_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null task_time in CpuTiming struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::duration(input)) in_duration = Traits::duration(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->duration)::BaseType> duration_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_duration,
      duration_fragment);

    fragment->duration.Set(
        duration_fragment.is_null() ? nullptr : duration_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->duration.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null duration in EventTiming struct");

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

    decltype(Traits::start_time(input)) in_start_time = Traits::start_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->start_time)::BaseType> start_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_start_time,
      start_time_fragment);

    fragment->start_time.Set(
        start_time_fragment.is_null() ? nullptr : start_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->start_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null start_time in EventTiming struct");

    decltype(Traits::processing_start(input)) in_processing_start = Traits::processing_start(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->processing_start)::BaseType> processing_start_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_processing_start,
      processing_start_fragment);

    fragment->processing_start.Set(
        processing_start_fragment.is_null() ? nullptr : processing_start_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->processing_start.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null processing_start in EventTiming struct");

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

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::first_paint_after_back_forward_cache_restore(input)) in_first_paint_after_back_forward_cache_restore = Traits::first_paint_after_back_forward_cache_restore(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_paint_after_back_forward_cache_restore)::BaseType> first_paint_after_back_forward_cache_restore_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_paint_after_back_forward_cache_restore,
      first_paint_after_back_forward_cache_restore_fragment);

    fragment->first_paint_after_back_forward_cache_restore.Set(
        first_paint_after_back_forward_cache_restore_fragment.is_null() ? nullptr : first_paint_after_back_forward_cache_restore_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->first_paint_after_back_forward_cache_restore.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null first_paint_after_back_forward_cache_restore in BackForwardCacheTiming struct");

    decltype(Traits::request_animation_frames_after_back_forward_cache_restore(input)) in_request_animation_frames_after_back_forward_cache_restore = Traits::request_animation_frames_after_back_forward_cache_restore(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->request_animation_frames_after_back_forward_cache_restore)::BaseType>
        request_animation_frames_after_back_forward_cache_restore_fragment(fragment.message());
    constexpr const mojo::internal::ContainerValidateParams& request_animation_frames_after_back_forward_cache_restore_validate_params =
        mojo::internal::GetArrayValidator<0, false, nullptr>();
    
    mojo::internal::Serialize<mojo::ArrayDataView<::mojo_base::mojom::TimeDeltaDataView>>(
      in_request_animation_frames_after_back_forward_cache_restore,
      request_animation_frames_after_back_forward_cache_restore_fragment,
      &request_animation_frames_after_back_forward_cache_restore_validate_params);

    fragment->request_animation_frames_after_back_forward_cache_restore.Set(
        request_animation_frames_after_back_forward_cache_restore_fragment.is_null() ? nullptr : request_animation_frames_after_back_forward_cache_restore_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->request_animation_frames_after_back_forward_cache_restore.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null request_animation_frames_after_back_forward_cache_restore in BackForwardCacheTiming struct");

    decltype(Traits::first_input_delay_after_back_forward_cache_restore(input)) in_first_input_delay_after_back_forward_cache_restore = Traits::first_input_delay_after_back_forward_cache_restore(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_input_delay_after_back_forward_cache_restore)::BaseType> first_input_delay_after_back_forward_cache_restore_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_input_delay_after_back_forward_cache_restore,
      first_input_delay_after_back_forward_cache_restore_fragment);

    fragment->first_input_delay_after_back_forward_cache_restore.Set(
        first_input_delay_after_back_forward_cache_restore_fragment.is_null() ? nullptr : first_input_delay_after_back_forward_cache_restore_fragment.data());
  }

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

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

}  // namespace internal


namespace internal {

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

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

    decltype(Traits::start_time(input)) in_start_time = Traits::start_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->start_time)::BaseType> start_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_start_time,
      start_time_fragment);

    fragment->start_time.Set(
        start_time_fragment.is_null() ? nullptr : start_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->start_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null start_time in SoftNavigationCommit struct");

    decltype(Traits::soft_navigation_slicing_time(input)) in_soft_navigation_slicing_time = Traits::soft_navigation_slicing_time(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->soft_navigation_slicing_time)::BaseType> soft_navigation_slicing_time_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
      in_soft_navigation_slicing_time,
      soft_navigation_slicing_time_fragment);

    fragment->soft_navigation_slicing_time.Set(
        soft_navigation_slicing_time_fragment.is_null() ? nullptr : soft_navigation_slicing_time_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->soft_navigation_slicing_time.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null soft_navigation_slicing_time in SoftNavigationCommit struct");

    
    mojo::internal::Serialize<::blink::mojom::NavigationTypeForNavigationApi>(
      Traits::navigation_type(input),
      &fragment->navigation_type);

    decltype(Traits::same_document_metrics_token(input)) in_same_document_metrics_token = Traits::same_document_metrics_token(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->same_document_metrics_token)::BaseType> same_document_metrics_token_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
      in_same_document_metrics_token,
      same_document_metrics_token_fragment);

    fragment->same_document_metrics_token.Set(
        same_document_metrics_token_fragment.is_null() ? nullptr : same_document_metrics_token_fragment.data());

    
    MOJO_INTERNAL_CHECK_SERIALIZATION(
      mojo::internal::SendValidation::kDefault,
      !(fragment->same_document_metrics_token.is_null()),
      mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
      "null same_document_metrics_token in SoftNavigationCommit struct");
  }

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

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

}  // namespace internal


namespace internal {

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

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

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

    decltype(Traits::commit(input)) in_commit = Traits::commit(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->commit)::BaseType> commit_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::page_load_metrics::mojom::SoftNavigationCommitDataView>(
      in_commit,
      commit_fragment);

    fragment->commit.Set(
        commit_fragment.is_null() ? nullptr : commit_fragment.data());

    decltype(Traits::first_contentful_paint(input)) in_first_contentful_paint = Traits::first_contentful_paint(input);
    mojo::internal::MessageFragment<
        typename decltype(fragment->first_contentful_paint)::BaseType> first_contentful_paint_fragment(
            fragment.message());
    
    mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
      in_first_contentful_paint,
      first_contentful_paint_fragment);

    fragment->first_contentful_paint.Set(
        first_contentful_paint_fragment.is_null() ? nullptr : first_contentful_paint_fragment.data());
  }

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

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

}  // namespace internal

}  // namespace mojo


namespace page_load_metrics::mojom {

inline void DocumentTimingDataView::GetDomContentLoadedEventStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->dom_content_loaded_event_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void DocumentTimingDataView::GetLoadEventStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->load_event_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void LcpResourceLoadTimingsDataView::GetDiscoveryTimeDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->discovery_time.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void LcpResourceLoadTimingsDataView::GetLoadStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->load_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void LcpResourceLoadTimingsDataView::GetLoadEndDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->load_end.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void LargestContentfulPaintTimingDataView::GetLargestImagePaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->largest_image_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void LargestContentfulPaintTimingDataView::GetLargestTextPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->largest_text_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void LargestContentfulPaintTimingDataView::GetResourceLoadTimingsDataView(
    LcpResourceLoadTimingsDataView* output) {
  auto pointer = data_->resource_load_timings.Get();
  *output = LcpResourceLoadTimingsDataView(pointer, message_);
}


inline void PaintTimingDataView::GetFirstPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PaintTimingDataView::GetFirstImagePaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_image_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PaintTimingDataView::GetFirstContentfulPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_contentful_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PaintTimingDataView::GetFirstMeaningfulPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_meaningful_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PaintTimingDataView::GetLargestContentfulPaintDataView(
    LargestContentfulPaintTimingDataView* output) {
  auto pointer = data_->largest_contentful_paint.Get();
  *output = LargestContentfulPaintTimingDataView(pointer, message_);
}
inline void PaintTimingDataView::GetExperimentalLargestContentfulPaintDataView(
    LargestContentfulPaintTimingDataView* output) {
  auto pointer = data_->experimental_largest_contentful_paint.Get();
  *output = LargestContentfulPaintTimingDataView(pointer, message_);
}
inline void PaintTimingDataView::GetFirstEligibleToPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_eligible_to_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PaintTimingDataView::GetFirstInputOrScrollNotifiedTimestampDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_input_or_scroll_notified_timestamp.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void MonotonicPaintTimingDataView::GetFirstPaintDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->first_paint.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}
inline void MonotonicPaintTimingDataView::GetFirstContentfulPaintDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->first_contentful_paint.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}
inline void MonotonicPaintTimingDataView::GetFirstContentfulPaintSubmittedDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->first_contentful_paint_submitted.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}


inline void ParseTimingDataView::GetParseStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ParseTimingDataView::GetParseStopDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_stop.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ParseTimingDataView::GetParseBlockedOnScriptLoadDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_blocked_on_script_load_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ParseTimingDataView::GetParseBlockedOnScriptLoadFromDocumentWriteDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_blocked_on_script_load_from_document_write_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ParseTimingDataView::GetParseBlockedOnScriptExecutionDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_blocked_on_script_execution_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ParseTimingDataView::GetParseBlockedOnScriptExecutionFromDocumentWriteDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->parse_blocked_on_script_execution_from_document_write_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void InteractiveTimingDataView::GetFirstInputDelayDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_input_delay.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void InteractiveTimingDataView::GetFirstInputTimestampDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_input_timestamp.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void InteractiveTimingDataView::GetFirstScrollDelayDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_scroll_delay.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void InteractiveTimingDataView::GetFirstScrollTimestampDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_scroll_timestamp.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void CustomUserTimingMarkDataView::GetMarkNameDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->mark_name.Get();
  *output = mojo::StringDataView(pointer, message_);
}
inline void CustomUserTimingMarkDataView::GetStartTimeDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->start_time.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void DomainLookupTimingDataView::GetDomainLookupStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->domain_lookup_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void DomainLookupTimingDataView::GetDomainLookupEndDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->domain_lookup_end.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}




inline void FontLoadingMetricsDataView::GetFallbackDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->fallback_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void FontLoadingMetricsDataView::GetFallbackInitialDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->fallback_initial_duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void FontLoadingMetricsDataView::GetScriptFallbackMetricsDataView(
    mojo::ArrayDataView<ScriptFallbackInfoDataView>* output) {
  auto pointer = data_->script_fallback_metrics.Get();
  *output = mojo::ArrayDataView<ScriptFallbackInfoDataView>(pointer, message_);
}


inline void PageLoadTimingDataView::GetNavigationStartDataView(
    ::mojo_base::mojom::TimeDataView* output) {
  auto pointer = data_->navigation_start.Get();
  *output = ::mojo_base::mojom::TimeDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetConnectStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->connect_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetConnectEndDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->connect_end.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetResponseStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->response_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetDocumentTimingDataView(
    DocumentTimingDataView* output) {
  auto pointer = data_->document_timing.Get();
  *output = DocumentTimingDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetInteractiveTimingDataView(
    InteractiveTimingDataView* output) {
  auto pointer = data_->interactive_timing.Get();
  *output = InteractiveTimingDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetPaintTimingDataView(
    PaintTimingDataView* output) {
  auto pointer = data_->paint_timing.Get();
  *output = PaintTimingDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetParseTimingDataView(
    ParseTimingDataView* output) {
  auto pointer = data_->parse_timing.Get();
  *output = ParseTimingDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetDomainLookupTimingDataView(
    DomainLookupTimingDataView* output) {
  auto pointer = data_->domain_lookup_timing.Get();
  *output = DomainLookupTimingDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetBackForwardCacheTimingsDataView(
    mojo::ArrayDataView<BackForwardCacheTimingDataView>* output) {
  auto pointer = data_->back_forward_cache_timings.Get();
  *output = mojo::ArrayDataView<BackForwardCacheTimingDataView>(pointer, message_);
}
inline void PageLoadTimingDataView::GetActivationStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->activation_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetInputToNavigationStartDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->input_to_navigation_start.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetUserTimingMarkFullyLoadedDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->user_timing_mark_fully_loaded.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetUserTimingMarkFullyVisibleDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->user_timing_mark_fully_visible.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetUserTimingMarkInteractiveDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->user_timing_mark_interactive.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void PageLoadTimingDataView::GetMonotonicPaintTimingDataView(
    MonotonicPaintTimingDataView* output) {
  auto pointer = data_->monotonic_paint_timing.Get();
  *output = MonotonicPaintTimingDataView(pointer, message_);
}


inline void FrameMetadataDataView::GetMainFrameRectDataView(
    ::gfx::mojom::RectDataView* output) {
  auto pointer = data_->main_frame_rect.Get();
  *output = ::gfx::mojom::RectDataView(pointer, message_);
}
inline void FrameMetadataDataView::GetMainFrameViewportRectDataView(
    ::gfx::mojom::RectDataView* output) {
  auto pointer = data_->main_frame_viewport_rect.Get();
  *output = ::gfx::mojom::RectDataView(pointer, message_);
}
inline void FrameMetadataDataView::GetMainFrameAdRectsDataView(
    mojo::MapDataView<int32_t, ::gfx::mojom::RectDataView>* output) {
  auto pointer = data_->main_frame_ad_rects.Get();
  *output = mojo::MapDataView<int32_t, ::gfx::mojom::RectDataView>(pointer, message_);
}
inline void FrameMetadataDataView::GetFrameworkDetectionResultDataView(
    ::blink::mojom::JavaScriptFrameworkDetectionResultDataView* output) {
  auto pointer = data_->framework_detection_result.Get();
  *output = ::blink::mojom::JavaScriptFrameworkDetectionResultDataView(pointer, message_);
}


inline void SubresourceLoadMetricsDataView::GetServiceWorkerSubresourceLoadMetricsDataView(
    ServiceWorkerSubresourceLoadMetricsDataView* output) {
  auto pointer = data_->service_worker_subresource_load_metrics.Get();
  *output = ServiceWorkerSubresourceLoadMetricsDataView(pointer, message_);
}


inline void ServiceWorkerSubresourceLoadMetricsDataView::GetTotalRouterEvaluationTimeForSubresourcesDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->total_router_evaluation_time_for_subresources.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void ServiceWorkerSubresourceLoadMetricsDataView::GetTotalCacheLookupTimeForSubresourcesDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->total_cache_lookup_time_for_subresources.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void ResourceDataUpdateDataView::GetDeltaBytesDataView(
    ::mojo_base::mojom::ByteSizeDataView* output) {
  auto pointer = data_->delta_bytes.Get();
  *output = ::mojo_base::mojom::ByteSizeDataView(pointer, message_);
}
inline void ResourceDataUpdateDataView::GetReceivedDataLengthDataView(
    ::mojo_base::mojom::ByteSizeDataView* output) {
  auto pointer = data_->received_data_length.Get();
  *output = ::mojo_base::mojom::ByteSizeDataView(pointer, message_);
}
inline void ResourceDataUpdateDataView::GetEncodedBodyLengthDataView(
    ::mojo_base::mojom::ByteSizeDataView* output) {
  auto pointer = data_->encoded_body_length.Get();
  *output = ::mojo_base::mojom::ByteSizeDataView(pointer, message_);
}
inline void ResourceDataUpdateDataView::GetDecodedBodyLengthDataView(
    ::mojo_base::mojom::ByteSizeDataView* output) {
  auto pointer = data_->decoded_body_length.Get();
  *output = ::mojo_base::mojom::ByteSizeDataView(pointer, message_);
}
inline void ResourceDataUpdateDataView::GetMimeTypeDataView(
    mojo::StringDataView* output) {
  auto pointer = data_->mime_type.Get();
  *output = mojo::StringDataView(pointer, message_);
}


inline void LayoutShiftDataView::GetLayoutShiftTimeDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->layout_shift_time.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}


inline void FrameRenderDataUpdateDataView::GetNewLayoutShiftsDataView(
    mojo::ArrayDataView<LayoutShiftDataView>* output) {
  auto pointer = data_->new_layout_shifts.Get();
  *output = mojo::ArrayDataView<LayoutShiftDataView>(pointer, message_);
}


inline void CpuTimingDataView::GetTaskTimeDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->task_time.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void EventTimingDataView::GetDurationDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->duration.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void EventTimingDataView::GetStartTimeDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->start_time.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}
inline void EventTimingDataView::GetProcessingStartDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->processing_start.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}


inline void BackForwardCacheTimingDataView::GetFirstPaintAfterBackForwardCacheRestoreDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_paint_after_back_forward_cache_restore.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void BackForwardCacheTimingDataView::GetRequestAnimationFramesAfterBackForwardCacheRestoreDataView(
    mojo::ArrayDataView<::mojo_base::mojom::TimeDeltaDataView>* output) {
  auto pointer = data_->request_animation_frames_after_back_forward_cache_restore.Get();
  *output = mojo::ArrayDataView<::mojo_base::mojom::TimeDeltaDataView>(pointer, message_);
}
inline void BackForwardCacheTimingDataView::GetFirstInputDelayAfterBackForwardCacheRestoreDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_input_delay_after_back_forward_cache_restore.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}


inline void SoftNavigationCommitDataView::GetStartTimeDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->start_time.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}
inline void SoftNavigationCommitDataView::GetSoftNavigationSlicingTimeDataView(
    ::mojo_base::mojom::TimeTicksDataView* output) {
  auto pointer = data_->soft_navigation_slicing_time.Get();
  *output = ::mojo_base::mojom::TimeTicksDataView(pointer, message_);
}
inline void SoftNavigationCommitDataView::GetSameDocumentMetricsTokenDataView(
    ::mojo_base::mojom::UnguessableTokenDataView* output) {
  auto pointer = data_->same_document_metrics_token.Get();
  *output = ::mojo_base::mojom::UnguessableTokenDataView(pointer, message_);
}


inline void SoftNavigationMetricsDataView::GetCommitDataView(
    SoftNavigationCommitDataView* output) {
  auto pointer = data_->commit.Get();
  *output = SoftNavigationCommitDataView(pointer, message_);
}
inline void SoftNavigationMetricsDataView::GetFirstContentfulPaintDataView(
    ::mojo_base::mojom::TimeDeltaDataView* output) {
  auto pointer = data_->first_contentful_paint.Get();
  *output = ::mojo_base::mojom::TimeDeltaDataView(pointer, message_);
}



}  // page_load_metrics::mojom

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

namespace perfetto {

template <>
struct  TraceFormatTraits<::page_load_metrics::mojom::ScriptType> {
 static void WriteIntoTrace(perfetto::TracedValue context, ::page_load_metrics::mojom::ScriptType value);
};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::page_load_metrics::mojom::CacheType> {
 static void WriteIntoTrace(perfetto::TracedValue context, ::page_load_metrics::mojom::CacheType value);
};

} // namespace perfetto

#endif  // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_METRICS_MOJOM_SHARED_H_