// media/mojo/mojom/audio_decoder.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 MEDIA_MOJO_MOJOM_AUDIO_DECODER_MOJOM_SEND_VALIDATION_H_
#define MEDIA_MOJO_MOJOM_AUDIO_DECODER_MOJOM_SEND_VALIDATION_H_

#include "media/mojo/mojom/audio_decoder.mojom-shared-internal.h"
#include "media/mojo/mojom/media_log.mojom-shared.h"
#include "media/mojo/mojom/media_types.mojom-shared.h"
#include "mojo/public/mojom/base/unguessable_token.mojom-shared.h"

#include "media/mojo/mojom/audio_decoder.mojom-data-view.h"

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

namespace mojo::internal {

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

      
      mojo::internal::Serialize<::media::mojom::AudioCodec>(
        Traits::codec(input),
        &fragment->codec);

      
      mojo::internal::Serialize<::media::mojom::AudioCodecProfile>(
        Traits::profile(input),
        &fragment->profile);
  }
};

}  // namespace mojo::internal

#endif  // MEDIA_MOJO_MOJOM_AUDIO_DECODER_MOJOM_SEND_VALIDATION_H_