chromium/mojo/public/interfaces/bindings/tests/containers_of_nullable_types.mojom

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module mojo.test.containers_of_nullable_types.mojom;

// Enumerator values intentionally selected to avoid overlap.
[Extensible]
enum RegularEnum {
  [Default] kUnknown = -1,
  kThisValue = 1,
  kThatValue = 2,
  kZeroValue = 0,
};

// Testing error condition with no default.
enum NonExtensibleEnum {};

struct StructWithContainersOfOptionals {
  array<int32?> i32_values;
  array<uint64?> u64_values;
  array<RegularEnum?> enum_values;
  array<bool?> bool_values;
  array<bool> bool_values2;

  map<int32, int32?> i32_map;
  map<int32, bool?> bool_map;
  map<int32, RegularEnum?> enum_map;

  array<NonExtensibleEnum?> non_extensible_enum_values;
};

struct TypemappedContainer {
  array<RegularEnum?> enum_values;
};