// ui/accessibility/mojom/ax_event_intent.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 "ui/accessibility/mojom/ax_event_intent.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 "ui/accessibility/mojom/ax_event_intent.mojom-params-data.h"
namespace ax {
namespace mojom {

namespace internal {


// static
bool EventIntent_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 EventIntent_Data* object =
      static_cast<const EventIntent_Data*>(data);


  if (!::ax::mojom::internal::Command_Data
        ::Validate(object->command, validation_context))
    return false;


  if (!::ax::mojom::internal::InputEventType_Data
        ::Validate(object->input_event_type, validation_context))
    return false;


  if (!::ax::mojom::internal::TextBoundary_Data
        ::Validate(object->text_boundary, validation_context))
    return false;


  if (!::ax::mojom::internal::MoveDirection_Data
        ::Validate(object->move_direction, validation_context))
    return false;

  return true;
}

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

}  // namespace internal
}  // namespace mojom
}  // namespace ax