Skip to main content

Class: HeaderParameter

protoc_gen_openapiv2.options.HeaderParameter

HeaderParameter a HTTP header parameter. See: https://swagger.io/specification/v2/#parameter-object

Implements

Constructors

constructor

new HeaderParameter(properties?): HeaderParameter

Constructs a new HeaderParameter.

Parameters

NameTypeDescription
properties?IHeaderParameterProperties to set

Returns

HeaderParameter

Properties

description

description: string

Description is a short description of the header.

Implementation of

IHeaderParameter.description


format

format: string

Format The extending format for the previously mentioned type.

Implementation of

IHeaderParameter.format


name

name: string

Name is the header name.

Implementation of

IHeaderParameter.name


required

required: boolean

Required indicates if the header is optional

Implementation of

IHeaderParameter.required


type

type: Type

Type is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. See: https://swagger.io/specification/v2/#parameterType.

Implementation of

IHeaderParameter.type

Methods

toJSON

toJSON(): Object

Converts this HeaderParameter to JSON.

Returns

Object

JSON object


create

create(properties?): HeaderParameter

Creates a new HeaderParameter instance using the specified properties.

Parameters

NameTypeDescription
properties?IHeaderParameterProperties to set

Returns

HeaderParameter

HeaderParameter instance


decode

decode(reader, length?): HeaderParameter

Decodes a HeaderParameter message from the specified reader or buffer.

Parameters

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

Returns

HeaderParameter

HeaderParameter

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): HeaderParameter

Decodes a HeaderParameter message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

HeaderParameter

HeaderParameter

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 HeaderParameter message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.verify|verify messages.

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified HeaderParameter message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.verify|verify messages.

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): HeaderParameter

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

HeaderParameter

HeaderParameter


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for HeaderParameter

Parameters

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

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageHeaderParameterHeaderParameter
options?IConversionOptionsConversion options

Returns

Object

Plain object