Skip to main content

Class: ExtensionRange

protobuf.DescriptorProto.ExtensionRange

Represents an ExtensionRange.

Properties

end

end: number

Exclusive.


options

Optional options: null | $Properties

ExtensionRange options.


start

start: number

Inclusive.

Methods

toJSON

toJSON(): Object

Converts this ExtensionRange to JSON.

Returns

Object

JSON object


create

create(properties?): ExtensionRange & $Properties

Creates a new ExtensionRange instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

ExtensionRange & $Properties

ExtensionRange instance

create(properties?): ExtensionRange

Parameters

NameType
properties?$Properties

Returns

ExtensionRange


decode

decode(reader, length?): ExtensionRange & $Properties

Decodes an ExtensionRange message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

ExtensionRange & $Properties

ExtensionRange

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): ExtensionRange & $Properties

Decodes an ExtensionRange message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ExtensionRange & $Properties

ExtensionRange

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 ExtensionRange message. Does not implicitly google.protobuf.DescriptorProto.ExtensionRange.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesExtensionRange message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified ExtensionRange message, length delimited. Does not implicitly google.protobuf.DescriptorProto.ExtensionRange.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesExtensionRange message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): ExtensionRange

Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

ExtensionRange

ExtensionRange


toObject

toObject(message, options?): Object

Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageExtensionRangeExtensionRange
options?IConversionOptionsConversion options

Returns

Object

Plain object