// chrome/common/supervised_user_commands.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 "chrome/common/supervised_user_commands.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 "chrome/common/supervised_user_commands.mojom-params-data.h"
namespace supervised_user {
namespace mojom {

namespace internal {


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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

}  // namespace internal
}  // namespace mojom
}  // namespace supervised_user