Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Field

import type { Field } from "https://googleapis.deno.dev/v1/serviceconsumermanagement:v1.ts";

A single field of a message type.

interface Field {
cardinality?:
| "CARDINALITY_UNKNOWN"
| "CARDINALITY_OPTIONAL"
| "CARDINALITY_REQUIRED"
| "CARDINALITY_REPEATED";
defaultValue?: string;
jsonName?: string;
kind?:
| "TYPE_UNKNOWN"
| "TYPE_DOUBLE"
| "TYPE_FLOAT"
| "TYPE_INT64"
| "TYPE_UINT64"
| "TYPE_INT32"
| "TYPE_FIXED64"
| "TYPE_FIXED32"
| "TYPE_BOOL"
| "TYPE_STRING"
| "TYPE_GROUP"
| "TYPE_MESSAGE"
| "TYPE_BYTES"
| "TYPE_UINT32"
| "TYPE_ENUM"
| "TYPE_SFIXED32"
| "TYPE_SFIXED64"
| "TYPE_SINT32"
| "TYPE_SINT64";
name?: string;
number?: number;
oneofIndex?: number;
options?: Option[];
packed?: boolean;
typeUrl?: string;
}

§Properties

§
cardinality?: "CARDINALITY_UNKNOWN" | "CARDINALITY_OPTIONAL" | "CARDINALITY_REQUIRED" | "CARDINALITY_REPEATED"
[src]

The field cardinality.

§
defaultValue?: string
[src]

The string value of the default value of this field. Proto2 syntax only.

§
jsonName?: string
[src]

The field JSON name.

§
kind?: "TYPE_UNKNOWN" | "TYPE_DOUBLE" | "TYPE_FLOAT" | "TYPE_INT64" | "TYPE_UINT64" | "TYPE_INT32" | "TYPE_FIXED64" | "TYPE_FIXED32" | "TYPE_BOOL" | "TYPE_STRING" | "TYPE_GROUP" | "TYPE_MESSAGE" | "TYPE_BYTES" | "TYPE_UINT32" | "TYPE_ENUM" | "TYPE_SFIXED32" | "TYPE_SFIXED64" | "TYPE_SINT32" | "TYPE_SINT64"
[src]

The field type.

§
name?: string
[src]

The field name.

§
number?: number
[src]

The field number.

§
oneofIndex?: number
[src]

The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.

§
options?: Option[]
[src]

The protocol buffer options.

§
packed?: boolean
[src]

Whether to use alternative packed wire representation.

§
typeUrl?: string
[src]

The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp".