// services/on_device_model/android/downloader_params.mojom-send-validation.h is auto generated by mojom_bindings_generator.py, do not edit

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

#ifndef SERVICES_ON_DEVICE_MODEL_ANDROID_DOWNLOADER_PARAMS_MOJOM_SEND_VALIDATION_H_
#define SERVICES_ON_DEVICE_MODEL_ANDROID_DOWNLOADER_PARAMS_MOJOM_SEND_VALIDATION_H_

#include "services/on_device_model/android/downloader_params.mojom-shared-internal.h"

#include "services/on_device_model/android/downloader_params.mojom-data-view.h"

#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"

namespace mojo::internal {

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::on_device_model::mojom::DownloaderParamsDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::on_device_model::mojom::DownloaderParamsDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::on_device_model::mojom::internal::DownloaderParams_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

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

}  // namespace mojo::internal

#endif  // SERVICES_ON_DEVICE_MODEL_ANDROID_DOWNLOADER_PARAMS_MOJOM_SEND_VALIDATION_H_