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
staticcreate(properties?):Parameters&$Properties
Creates a new Parameters instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Parameters & $Properties
Parameters instance
Call Signature
staticcreate(properties?):Parameters
Creates a new Parameters instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Parameters
Parameters instance
decode()
staticdecode(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()
staticdecodeDelimited(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()
staticencode(message,writer?):Writer
Encodes the specified Parameters message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.Parameters.verify|verify messages.
Parameters
message
Parameters message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(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
Parameters message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(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()
statictoObject(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