Class: FieldOptions
Represents a FieldOptions.
Implements
Constructors
constructor
• new FieldOptions(properties?
): FieldOptions
Constructs a new FieldOptions.
Parameters
Name | Type | Description |
---|---|---|
properties? | IFieldOptions | Properties to set |
Returns
Properties
ctype
• ctype: CType
FieldOptions ctype.
Implementation of
deprecated
• deprecated: boolean
FieldOptions deprecated.
Implementation of
jstype
• jstype: JSType
FieldOptions jstype.
Implementation of
lazy
• lazy: boolean
FieldOptions lazy.
Implementation of
packed
• packed: boolean
FieldOptions packed.
Implementation of
uninterpretedOption
• uninterpretedOption: IUninterpretedOption
[]
FieldOptions uninterpretedOption.
Implementation of
IFieldOptions.uninterpretedOption
weak
• weak: boolean
FieldOptions weak.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this FieldOptions to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): FieldOptions
Creates a new FieldOptions instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IFieldOptions | Properties to set |
Returns
FieldOptions instance
decode
▸ decode(reader
, length?
): FieldOptions
Decodes a FieldOptions message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
FieldOptions
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): FieldOptions
Decodes a FieldOptions message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
FieldOptions
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode
▸ encode(message
, writer?
): Writer
Encodes the specified FieldOptions message. Does not implicitly google.protobuf.FieldOptions.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IFieldOptions | FieldOptions message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified FieldOptions message, length delimited. Does not implicitly google.protobuf.FieldOptions.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IFieldOptions | FieldOptions message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): FieldOptions
Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
FieldOptions
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for FieldOptions
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message
, options?
): Object
Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | FieldOptions | FieldOptions |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object