Skip to main content

Class: ExtensionRange

protobuf.DescriptorProto.ExtensionRange

Represents an ExtensionRange.

Implements

Constructors

constructor

new ExtensionRange(properties?)

Constructs a new ExtensionRange.

Parameters

NameTypeDescription
properties?IExtensionRangeProperties to set

Properties

end

end: number

ExtensionRange end.

Implementation of

IExtensionRange.end


start

start: number

ExtensionRange start.

Implementation of

IExtensionRange.start

Methods

toJSON

toJSON(): Object

Converts this ExtensionRange to JSON.

Returns

Object

JSON object


create

Static create(properties?): ExtensionRange

Creates a new ExtensionRange instance using the specified properties.

Parameters

NameTypeDescription
properties?IExtensionRangeProperties to set

Returns

ExtensionRange

ExtensionRange instance


decode

Static decode(reader, length?): ExtensionRange

Decodes an ExtensionRange message from the specified reader or buffer.

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing

Parameters

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

Returns

ExtensionRange

ExtensionRange


decodeDelimited

Static decodeDelimited(reader): ExtensionRange

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

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ExtensionRange

ExtensionRange


encode

Static encode(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIExtensionRangeExtensionRange message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

Static encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIExtensionRangeExtensionRange message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

Static 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


getTypeUrl

Static getTypeUrl(typeUrlPrefix?): string

Gets the default type url for ExtensionRange

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

Static 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