// optional_primitives.test-mojom-webui.ts is auto generated by mojom_bindings_generator.py, do not edit

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

import {mojo} from '//resources/mojo/mojo/public/js/bindings.js';







export const OptionalPrimitivesSpec: { $: mojo.internal.MojomType } =
    { $: {} as unknown as mojo.internal.MojomType };




export interface OptionalPrimitivesMojoType {
  int: (number | null);
  long: (bigint | null);
  intWithDefault: (number | null);
  longWithDefault: (bigint | null);
  boolWithDefault: (boolean | null);
  uints: Array<(number | null)>;
  boolarray: Array<(boolean | null)>;
  bitmap: {[key: boolean]: (boolean | null)};
}


export type OptionalPrimitives = OptionalPrimitivesMojoType;
mojo.internal.Struct<OptionalPrimitivesMojoType>(
    OptionalPrimitivesSpec.$,
    'OptionalPrimitives',
    [
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'int_$flag', 0,
        0,
        mojo.internal.Bool,
        false,
        false /* nullable */,
        0,
        {
          isPrimary: true,
          linkedValueFieldName: "int_$value",
          originalFieldName: "int",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, number>(
        'int_$value', 4,
        0,
        mojo.internal.Int32,
        0,
        false /* nullable */,
        0,
        {
          isPrimary: false,
          originalFieldName: "int",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'long_$flag', 0,
        1,
        mojo.internal.Bool,
        false,
        false /* nullable */,
        0,
        {
          isPrimary: true,
          linkedValueFieldName: "long_$value",
          originalFieldName: "long",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, bigint>(
        'long_$value', 8,
        0,
        mojo.internal.Int64,
        BigInt(0),
        false /* nullable */,
        0,
        {
          isPrimary: false,
          originalFieldName: "long",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, Array<(number | null)>>(
        'uints', 16,
        0,
        mojo.internal.Array(mojo.internal.Uint32, true),
        null,
        false /* nullable */,
        0,
        undefined,
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, Array<(boolean | null)>>(
        'boolarray', 24,
        0,
        mojo.internal.Array(mojo.internal.Bool, true),
        null,
        false /* nullable */,
        0,
        undefined,
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, {[key: boolean]: (boolean | null)}>(
        'bitmap', 32,
        0,
        mojo.internal.Map(mojo.internal.Bool, mojo.internal.Bool, true),
        null,
        false /* nullable */,
        0,
        undefined,
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'int_with_default_$flag', 0,
        2,
        mojo.internal.Bool,
        true,
        false /* nullable */,
        0,
        {
          isPrimary: true,
          linkedValueFieldName: "int_with_default_$value",
          originalFieldName: "intWithDefault",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, number>(
        'int_with_default_$value', 40,
        0,
        mojo.internal.Int32,
        1,
        false /* nullable */,
        0,
        {
          isPrimary: false,
          originalFieldName: "intWithDefault",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'long_with_default_$flag', 0,
        3,
        mojo.internal.Bool,
        true,
        false /* nullable */,
        0,
        {
          isPrimary: true,
          linkedValueFieldName: "long_with_default_$value",
          originalFieldName: "longWithDefault",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, bigint>(
        'long_with_default_$value', 48,
        0,
        mojo.internal.Int64,
        BigInt('2'),
        false /* nullable */,
        0,
        {
          isPrimary: false,
          originalFieldName: "longWithDefault",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'bool_with_default_$flag', 0,
        4,
        mojo.internal.Bool,
        true,
        false /* nullable */,
        0,
        {
          isPrimary: true,
          linkedValueFieldName: "bool_with_default_$value",
          originalFieldName: "boolWithDefault",
        },
        undefined,
    ),
      mojo.internal.StructField<OptionalPrimitivesMojoType, boolean>(
        'bool_with_default_$value', 0,
        5,
        mojo.internal.Bool,
        true,
        false /* nullable */,
        0,
        {
          isPrimary: false,
          originalFieldName: "boolWithDefault",
        },
        undefined,
    ),
    ],
    [[0, 64],]);



