Skip to main content

Class: Parameters

Parameters is a representation of OpenAPI v2 specification's parameters object. Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only allow header parameters to be set here since we do not want users specifying custom non-header parameters beyond those inferred from the Protobuf schema. See: https://swagger.io/specification/v2/#parameter-object

Properties​

headers​

headers: $Properties[]

Headers is one or more HTTP header parameter. See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters

Methods​

toJSON()​

toJSON(): object

Converts this Parameters to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): Parameters & $Properties

Creates a new Parameters instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

Parameters & $Properties

Parameters instance

Call Signature​

static create(properties?): Parameters

Creates a new Parameters instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

Parameters

Parameters instance


decode()​

static decode(reader, length?): Parameters & $Properties

Decodes a Parameters message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

Parameters & $Properties

Parameters

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): Parameters & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

Parameters & $Properties

Parameters

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified Parameters message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Parameters.verify|verify messages.

Parameters​

message​

$Properties

Parameters message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

Parameters message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): Parameters

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

Parameters

Parameters


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

Parameters

Parameters

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object