// third_party/blink/public/mojom/device/device.mojom-shared.cc 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.

#include "third_party/blink/public/mojom/device/device.mojom-shared.h"
#include <utility>
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/lib/validation_util.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"

#include "third_party/blink/public/mojom/device/device.mojom-params-data.h"
namespace blink {
namespace mojom {

namespace internal {
// static
bool DeviceAPIService_GetDirectoryId_ResponseParam_Result_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context,
    bool inlined) {
  if (!data) {
    DCHECK(!inlined);
    return true;
  }

  // If it is inlined, the alignment is already enforced by its enclosing
  // object. We don't have to validate that.
  DCHECK(!inlined || mojo::internal::IsAligned(data));

  if (!inlined &&
      !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory(
          data, validation_context)) {
    return false;
  }

  const DeviceAPIService_GetDirectoryId_ResponseParam_Result_Data* object = static_cast<const DeviceAPIService_GetDirectoryId_ResponseParam_Result_Data*>(data);

  if (inlined && object->is_null())
    return true;

  switch (object->tag) {

    case DeviceAPIService_GetDirectoryId_ResponseParam_Result_Tag::kSuccess: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_success, 1, validation_context)) {
        return false;
      }
      if (!mojo::internal::ValidateStruct(object->data.f_success, validation_context))
        return false;
      return true;
    }
    case DeviceAPIService_GetDirectoryId_ResponseParam_Result_Tag::kFailure: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_failure, 2, validation_context)) {
        return false;
      }
      constexpr const mojo::internal::ContainerValidateParams& failure_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      if (!mojo::internal::ValidateContainer(object->data.f_failure, validation_context,
                                             &failure_validate_params)) {
        return false;
      }
      return true;
    }
    default: {

      ReportValidationError(
          validation_context,
          mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG,
          "unknown tag in DeviceAPIService_GetDirectoryId_ResponseParam_Result");
      return false;
    }
  }
}
// static
bool DeviceAPIService_GetHostname_ResponseParam_Result_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context,
    bool inlined) {
  if (!data) {
    DCHECK(!inlined);
    return true;
  }

  // If it is inlined, the alignment is already enforced by its enclosing
  // object. We don't have to validate that.
  DCHECK(!inlined || mojo::internal::IsAligned(data));

  if (!inlined &&
      !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory(
          data, validation_context)) {
    return false;
  }

  const DeviceAPIService_GetHostname_ResponseParam_Result_Data* object = static_cast<const DeviceAPIService_GetHostname_ResponseParam_Result_Data*>(data);

  if (inlined && object->is_null())
    return true;

  switch (object->tag) {

    case DeviceAPIService_GetHostname_ResponseParam_Result_Tag::kSuccess: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_success, 1, validation_context)) {
        return false;
      }
      if (!mojo::internal::ValidateStruct(object->data.f_success, validation_context))
        return false;
      return true;
    }
    case DeviceAPIService_GetHostname_ResponseParam_Result_Tag::kFailure: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_failure, 2, validation_context)) {
        return false;
      }
      constexpr const mojo::internal::ContainerValidateParams& failure_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      if (!mojo::internal::ValidateContainer(object->data.f_failure, validation_context,
                                             &failure_validate_params)) {
        return false;
      }
      return true;
    }
    default: {

      ReportValidationError(
          validation_context,
          mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG,
          "unknown tag in DeviceAPIService_GetHostname_ResponseParam_Result");
      return false;
    }
  }
}
// static
bool DeviceAPIService_GetSerialNumber_ResponseParam_Result_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context,
    bool inlined) {
  if (!data) {
    DCHECK(!inlined);
    return true;
  }

  // If it is inlined, the alignment is already enforced by its enclosing
  // object. We don't have to validate that.
  DCHECK(!inlined || mojo::internal::IsAligned(data));

  if (!inlined &&
      !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory(
          data, validation_context)) {
    return false;
  }

  const DeviceAPIService_GetSerialNumber_ResponseParam_Result_Data* object = static_cast<const DeviceAPIService_GetSerialNumber_ResponseParam_Result_Data*>(data);

  if (inlined && object->is_null())
    return true;

  switch (object->tag) {

    case DeviceAPIService_GetSerialNumber_ResponseParam_Result_Tag::kSuccess: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_success, 1, validation_context)) {
        return false;
      }
      if (!mojo::internal::ValidateStruct(object->data.f_success, validation_context))
        return false;
      return true;
    }
    case DeviceAPIService_GetSerialNumber_ResponseParam_Result_Tag::kFailure: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_failure, 2, validation_context)) {
        return false;
      }
      constexpr const mojo::internal::ContainerValidateParams& failure_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      if (!mojo::internal::ValidateContainer(object->data.f_failure, validation_context,
                                             &failure_validate_params)) {
        return false;
      }
      return true;
    }
    default: {

      ReportValidationError(
          validation_context,
          mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG,
          "unknown tag in DeviceAPIService_GetSerialNumber_ResponseParam_Result");
      return false;
    }
  }
}
// static
bool DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context,
    bool inlined) {
  if (!data) {
    DCHECK(!inlined);
    return true;
  }

  // If it is inlined, the alignment is already enforced by its enclosing
  // object. We don't have to validate that.
  DCHECK(!inlined || mojo::internal::IsAligned(data));

  if (!inlined &&
      !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory(
          data, validation_context)) {
    return false;
  }

  const DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result_Data* object = static_cast<const DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result_Data*>(data);

  if (inlined && object->is_null())
    return true;

  switch (object->tag) {

    case DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result_Tag::kSuccess: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_success, 1, validation_context)) {
        return false;
      }
      if (!mojo::internal::ValidateStruct(object->data.f_success, validation_context))
        return false;
      return true;
    }
    case DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result_Tag::kFailure: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_failure, 2, validation_context)) {
        return false;
      }
      constexpr const mojo::internal::ContainerValidateParams& failure_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      if (!mojo::internal::ValidateContainer(object->data.f_failure, validation_context,
                                             &failure_validate_params)) {
        return false;
      }
      return true;
    }
    default: {

      ReportValidationError(
          validation_context,
          mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG,
          "unknown tag in DeviceAPIService_GetAnnotatedAssetId_ResponseParam_Result");
      return false;
    }
  }
}
// static
bool DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context,
    bool inlined) {
  if (!data) {
    DCHECK(!inlined);
    return true;
  }

  // If it is inlined, the alignment is already enforced by its enclosing
  // object. We don't have to validate that.
  DCHECK(!inlined || mojo::internal::IsAligned(data));

  if (!inlined &&
      !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory(
          data, validation_context)) {
    return false;
  }

  const DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result_Data* object = static_cast<const DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result_Data*>(data);

  if (inlined && object->is_null())
    return true;

  switch (object->tag) {

    case DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result_Tag::kSuccess: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_success, 1, validation_context)) {
        return false;
      }
      if (!mojo::internal::ValidateStruct(object->data.f_success, validation_context))
        return false;
      return true;
    }
    case DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result_Tag::kFailure: {

      if (!mojo::internal::ValidatePointerNonNullable(
              object->data.f_failure, 2, validation_context)) {
        return false;
      }
      constexpr const mojo::internal::ContainerValidateParams& failure_validate_params =
          mojo::internal::GetArrayValidator<0, false, nullptr>();
      if (!mojo::internal::ValidateContainer(object->data.f_failure, validation_context,
                                             &failure_validate_params)) {
        return false;
      }
      return true;
    }
    default: {

      ReportValidationError(
          validation_context,
          mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG,
          "unknown tag in DeviceAPIService_GetAnnotatedLocation_ResponseParam_Result");
      return false;
    }
  }
}


// static
bool DeviceAttributeValue_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 16, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAttributeValue_Data* object =
      static_cast<const DeviceAttributeValue_Data*>(data);

  constexpr const mojo::internal::ContainerValidateParams& value_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  if (!mojo::internal::ValidateContainer(object->value, validation_context,
                                         &value_validate_params)) {
    return false;
  }

  return true;
}

DeviceAttributeValue_Data::DeviceAttributeValue_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool ManagedConfigurationObserver_OnConfigurationChanged_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const ManagedConfigurationObserver_OnConfigurationChanged_Params_Data* object =
      static_cast<const ManagedConfigurationObserver_OnConfigurationChanged_Params_Data*>(data);

  return true;
}

ManagedConfigurationObserver_OnConfigurationChanged_Params_Data::ManagedConfigurationObserver_OnConfigurationChanged_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetDirectoryId_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetDirectoryId_Params_Data* object =
      static_cast<const DeviceAPIService_GetDirectoryId_Params_Data*>(data);

  return true;
}

DeviceAPIService_GetDirectoryId_Params_Data::DeviceAPIService_GetDirectoryId_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetDirectoryId_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 24, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetDirectoryId_ResponseParams_Data* object =
      static_cast<const DeviceAPIService_GetDirectoryId_ResponseParams_Data*>(data);

  if (!mojo::internal::ValidateInlinedUnionNonNullable(
          object->result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateInlinedUnion(object->result, validation_context))
    return false;

  return true;
}

DeviceAPIService_GetDirectoryId_ResponseParams_Data::DeviceAPIService_GetDirectoryId_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetHostname_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetHostname_Params_Data* object =
      static_cast<const DeviceAPIService_GetHostname_Params_Data*>(data);

  return true;
}

DeviceAPIService_GetHostname_Params_Data::DeviceAPIService_GetHostname_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetHostname_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 24, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetHostname_ResponseParams_Data* object =
      static_cast<const DeviceAPIService_GetHostname_ResponseParams_Data*>(data);

  if (!mojo::internal::ValidateInlinedUnionNonNullable(
          object->result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateInlinedUnion(object->result, validation_context))
    return false;

  return true;
}

DeviceAPIService_GetHostname_ResponseParams_Data::DeviceAPIService_GetHostname_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetSerialNumber_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetSerialNumber_Params_Data* object =
      static_cast<const DeviceAPIService_GetSerialNumber_Params_Data*>(data);

  return true;
}

DeviceAPIService_GetSerialNumber_Params_Data::DeviceAPIService_GetSerialNumber_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetSerialNumber_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 24, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetSerialNumber_ResponseParams_Data* object =
      static_cast<const DeviceAPIService_GetSerialNumber_ResponseParams_Data*>(data);

  if (!mojo::internal::ValidateInlinedUnionNonNullable(
          object->result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateInlinedUnion(object->result, validation_context))
    return false;

  return true;
}

DeviceAPIService_GetSerialNumber_ResponseParams_Data::DeviceAPIService_GetSerialNumber_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetAnnotatedAssetId_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetAnnotatedAssetId_Params_Data* object =
      static_cast<const DeviceAPIService_GetAnnotatedAssetId_Params_Data*>(data);

  return true;
}

DeviceAPIService_GetAnnotatedAssetId_Params_Data::DeviceAPIService_GetAnnotatedAssetId_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetAnnotatedAssetId_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 24, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetAnnotatedAssetId_ResponseParams_Data* object =
      static_cast<const DeviceAPIService_GetAnnotatedAssetId_ResponseParams_Data*>(data);

  if (!mojo::internal::ValidateInlinedUnionNonNullable(
          object->result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateInlinedUnion(object->result, validation_context))
    return false;

  return true;
}

DeviceAPIService_GetAnnotatedAssetId_ResponseParams_Data::DeviceAPIService_GetAnnotatedAssetId_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetAnnotatedLocation_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 8, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetAnnotatedLocation_Params_Data* object =
      static_cast<const DeviceAPIService_GetAnnotatedLocation_Params_Data*>(data);

  return true;
}

DeviceAPIService_GetAnnotatedLocation_Params_Data::DeviceAPIService_GetAnnotatedLocation_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool DeviceAPIService_GetAnnotatedLocation_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 24, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const DeviceAPIService_GetAnnotatedLocation_ResponseParams_Data* object =
      static_cast<const DeviceAPIService_GetAnnotatedLocation_ResponseParams_Data*>(data);

  if (!mojo::internal::ValidateInlinedUnionNonNullable(
          object->result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateInlinedUnion(object->result, validation_context))
    return false;

  return true;
}

DeviceAPIService_GetAnnotatedLocation_ResponseParams_Data::DeviceAPIService_GetAnnotatedLocation_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool ManagedConfigurationService_GetManagedConfiguration_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 16, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const ManagedConfigurationService_GetManagedConfiguration_Params_Data* object =
      static_cast<const ManagedConfigurationService_GetManagedConfiguration_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->keys, 1, validation_context)) {
    return false;
  }
  constexpr const mojo::internal::ContainerValidateParams& keys_validate_params =
      mojo::internal::GetArrayValidator<0, false, &mojo::internal::GetArrayValidator<0, false, nullptr>()>();
  if (!mojo::internal::ValidateContainer(object->keys, validation_context,
                                         &keys_validate_params)) {
    return false;
  }

  return true;
}

ManagedConfigurationService_GetManagedConfiguration_Params_Data::ManagedConfigurationService_GetManagedConfiguration_Params_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool ManagedConfigurationService_GetManagedConfiguration_ResponseParams_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 16, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const ManagedConfigurationService_GetManagedConfiguration_ResponseParams_Data* object =
      static_cast<const ManagedConfigurationService_GetManagedConfiguration_ResponseParams_Data*>(data);

  constexpr const mojo::internal::ContainerValidateParams& configurations_validate_params =
      mojo::internal::GetMapValidator<*&mojo::internal::GetArrayValidator<0, false, &mojo::internal::GetArrayValidator<0, false, nullptr>()>(), *&mojo::internal::GetArrayValidator<0, false, &mojo::internal::GetArrayValidator<0, false, nullptr>()>()>();
  if (!mojo::internal::ValidateContainer(object->configurations, validation_context,
                                         &configurations_validate_params)) {
    return false;
  }

  return true;
}

ManagedConfigurationService_GetManagedConfiguration_ResponseParams_Data::ManagedConfigurationService_GetManagedConfiguration_ResponseParams_Data()
    : header_({sizeof(*this), 0}) {}


// static
bool ManagedConfigurationService_SubscribeToManagedConfiguration_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 16, validation_context)) {
    return false;
  }

  // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if
  // the message comes from an older version.
  [[maybe_unused]] const ManagedConfigurationService_SubscribeToManagedConfiguration_Params_Data* object =
      static_cast<const ManagedConfigurationService_SubscribeToManagedConfiguration_Params_Data*>(data);

  if (!mojo::internal::ValidateHandleOrInterfaceNonNullable(
          object->observer, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateHandleOrInterface(object->observer,
                                                 validation_context)) {
    return false;
  }

  return true;
}

ManagedConfigurationService_SubscribeToManagedConfiguration_Params_Data::ManagedConfigurationService_SubscribeToManagedConfiguration_Params_Data()
    : header_({sizeof(*this), 0}) {}

}  // namespace internal
}  // namespace mojom
}  // namespace blink