blob: 75bc6e606af8e1d47541b3d99544f8571721ec2e [file] [log] [blame]
// chromeos/services/machine_learning/public/mojom/graph_executor.mojom-shared-internal.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_MOJOM_SHARED_INTERNAL_H_
#define CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_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/buffer.h"
#include "chromeos/services/machine_learning/public/mojom/tensor.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"
#include "base/component_export.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace mojo {
namespace internal {
class ValidationContext;
}
}
namespace chromeos {
namespace machine_learning {
namespace mojom {
namespace internal {
struct ExecuteResult_Data {
public:
static bool constexpr kIsExtensible = true;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
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
} // namespace mojom
} // namespace machine_learning
} // namespace chromeos
#endif // CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_MOJOM_SHARED_INTERNAL_H_
/* Metadata comment
eyJtZXRhIjogW10sICJ0eXBlIjogImt5dGhlMCJ9
*/