// services/viz/privileged/mojom/gl/gpu_service.mojom-shared-internal.h 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.

#ifndef SERVICES_VIZ_PRIVILEGED_MOJOM_GL_GPU_SERVICE_MOJOM_SHARED_INTERNAL_H_
#define SERVICES_VIZ_PRIVILEGED_MOJOM_GL_GPU_SERVICE_MOJOM_SHARED_INTERNAL_H_
#include "mojo/public/cpp/bindings/lib/array_internal.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "components/persistent_cache/mojom/persistent_cache.mojom-shared-internal.h"
#include "gpu/ipc/common/device_perf_info.mojom-shared-internal.h"
#include "gpu/ipc/common/gpu_disk_cache_type.mojom-shared-internal.h"
#include "gpu/ipc/common/gpu_feature_info.mojom-shared-internal.h"
#include "gpu/ipc/common/gpu_info.mojom-shared-internal.h"
#include "gpu/ipc/common/gpu_peak_memory.mojom-shared-internal.h"
#include "gpu/ipc/common/memory_stats.mojom-shared-internal.h"
#include "gpu/ipc/common/shared_image_capabilities.mojom-shared-internal.h"
#include "gpu/ipc/common/surface_handle.mojom-shared-internal.h"
#include "gpu/ipc/common/sync_token.mojom-shared-internal.h"
#include "media/mojo/mojom/video_encode_accelerator.mojom-shared-internal.h"
#include "mojo/public/mojom/base/byte_string.mojom-shared-internal.h"
#include "mojo/public/mojom/base/process_id.mojom-shared-internal.h"
#include "services/webnn/public/mojom/features.mojom-shared-internal.h"
#include "services/webnn/public/mojom/webnn_context_provider.mojom-shared-internal.h"
#include "services/webnn/public/mojom/webnn_service_introspection.mojom-shared-internal.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared-internal.h"
#include "ui/gfx/mojom/buffer_types.mojom-shared-internal.h"
#include "ui/gl/mojom/gpu_preference.mojom-shared-internal.h"
#include "mojo/public/cpp/bindings/lib/native_enum_data.h"
#include "mojo/public/interfaces/bindings/native_struct.mojom-shared-internal.h"



namespace mojo {
namespace internal {
class ValidationContext;
}
}


namespace viz::mojom {
namespace internal {

struct MemoryInvalidAccessType_Data {
 public:
  static bool constexpr kIsExtensible = false;

  static bool IsKnownValue(int32_t value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
      case 3:
        return true;
    }
    return false;
  }

  static bool Validate(int32_t value,
                       mojo::internal::ValidationContext* validation_context) {
    if (kIsExtensible || IsKnownValue(value))
      return true;

    ReportValidationError(validation_context,
                          mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
    return false;
  }
};

#pragma pack(push, 1)

#pragma pack(pop)

}  // namespace internal

}  // viz::mojom

#endif  // SERVICES_VIZ_PRIVILEGED_MOJOM_GL_GPU_SERVICE_MOJOM_SHARED_INTERNAL_H_