// components/autofill/content/common/mojom/autofill_agent.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 "components/autofill/content/common/mojom/autofill_agent.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 "components/autofill/content/common/mojom/autofill_agent.mojom-params-data.h"
namespace autofill {
namespace mojom {

namespace internal {


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


// static
bool AutofillAgent_ApplyFieldsAction_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 40, 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 AutofillAgent_ApplyFieldsAction_Params_Data* object =
      static_cast<const AutofillAgent_ApplyFieldsAction_Params_Data*>(data);


  if (!::autofill::mojom::internal::FormActionType_Data
        ::Validate(object->action_type, validation_context))
    return false;


  if (!::autofill::mojom::internal::ActionPersistence_Data
        ::Validate(object->action_persistence, validation_context))
    return false;

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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->fill_id, 4, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->fill_id, validation_context))
    return false;

  return true;
}

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


// static
bool AutofillAgent_ApplyFieldAction_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 32, 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 AutofillAgent_ApplyFieldAction_Params_Data* object =
      static_cast<const AutofillAgent_ApplyFieldAction_Params_Data*>(data);


  if (!::autofill::mojom::internal::FieldActionType_Data
        ::Validate(object->action_type, validation_context))
    return false;


  if (!::autofill::mojom::internal::ActionPersistence_Data
        ::Validate(object->action_persistence, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field, 3, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value, 4, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->value, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidateStruct(object->form, validation_context))
    return false;

  return true;
}

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


// static
bool AutofillAgent_ExtractLabeledTextNodeValue_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 32, 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 AutofillAgent_ExtractLabeledTextNodeValue_Params_Data* object =
      static_cast<const AutofillAgent_ExtractLabeledTextNodeValue_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value_regex, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->value_regex, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->label_regex, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->label_regex, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value, 1, validation_context)) {
    return false;
  }
  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;
}

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


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

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

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field, validation_context))
    return false;


  if (!::autofill::mojom::internal::AutofillSuggestionTriggerSource_Data
        ::Validate(object->trigger_source, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field, validation_context))
    return false;


  if (!::autofill::mojom::internal::AutofillSuggestionAvailability_Data
        ::Validate(object->suggestion_availability, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->value, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->email_field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->email_field_id, validation_context))
    return false;

  return true;
}

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


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

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

  return true;
}

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


// static
bool AutofillAgent_SendEmailVerificationToken_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 32, 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 AutofillAgent_SendEmailVerificationToken_Params_Data* object =
      static_cast<const AutofillAgent_SendEmailVerificationToken_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->email_field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->email_field_id, validation_context))
    return false;

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

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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->email_field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->email_field_id, validation_context))
    return false;


  if (!::autofill::mojom::internal::EmailVerificationState_Data
        ::Validate(object->state, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->form_data, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->form_data, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


// static
bool PasswordAutofillAgent_FillPasswordSuggestionById_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 48, 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 PasswordAutofillAgent_FillPasswordSuggestionById_Params_Data* object =
      static_cast<const PasswordAutofillAgent_FillPasswordSuggestionById_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username_element_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password_element_id, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username, 3, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password, 4, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password, validation_context))
    return false;


  if (!::autofill::mojom::internal::AutofillSuggestionTriggerSource_Data
        ::Validate(object->suggestion_source, validation_context))
    return false;

  return true;
}

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


// static
bool PasswordAutofillAgent_PreviewPasswordSuggestionById_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 40, 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 PasswordAutofillAgent_PreviewPasswordSuggestionById_Params_Data* object =
      static_cast<const PasswordAutofillAgent_PreviewPasswordSuggestionById_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username_element_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password_element_id, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->username, 3, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->username, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password, 4, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->credential, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->credential, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->value, validation_context))
    return false;

  return true;
}

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


// static
bool PasswordAutofillAgent_FillField_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 32, 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 PasswordAutofillAgent_FillField_Params_Data* object =
      static_cast<const PasswordAutofillAgent_FillField_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->value, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->value, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


// static
bool PasswordAutofillAgent_FillChangePasswordForm_Params_Data::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  if (!data)
    return true;
  if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory(
          data, 48, 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 PasswordAutofillAgent_FillChangePasswordForm_Params_Data* object =
      static_cast<const PasswordAutofillAgent_FillChangePasswordForm_Params_Data*>(data);

  if (!mojo::internal::ValidatePointerNonNullable(
          object->password_element_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->password_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->new_password_element_id, 2, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->new_password_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->confirm_password_element_id, 3, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->confirm_password_element_id, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->old_password, 4, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->old_password, validation_context))
    return false;

  if (!mojo::internal::ValidatePointerNonNullable(
          object->new_password, 5, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->new_password, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidateStruct(object->form_data, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->parsing_result, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->parsing_result, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->field_id, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->field_id, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->generated_password, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->generated_password, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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


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

  return true;
}

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


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

  if (!mojo::internal::ValidateStruct(object->data, validation_context))
    return false;

  return true;
}

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


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

  if (!mojo::internal::ValidatePointerNonNullable(
          object->form, 1, validation_context)) {
    return false;
  }
  if (!mojo::internal::ValidateStruct(object->form, validation_context))
    return false;

  return true;
}

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


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

  return true;
}

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

}  // namespace internal
}  // namespace mojom
}  // namespace autofill