Class: HeaderParameter
HeaderParameter a HTTP header parameter.
See: https://swagger.io/specification/v2/#parameter-object
Properties
description
description:
string
Description is a short description of the header.
format
format:
string
Format The extending format for the previously mentioned type.
name
name:
string
Name is the header name.
required
required:
boolean
Required indicates if the header is optional
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.
Methods
toJSON()
toJSON():
object
Converts this HeaderParameter to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):HeaderParameter&$Properties
Creates a new HeaderParameter instance using the specified properties.
Parameters
properties?
Properties to set
Returns
HeaderParameter & $Properties
HeaderParameter instance
Call Signature
staticcreate(properties?):HeaderParameter
Creates a new HeaderParameter instance using the specified properties.
Parameters
properties?
Properties to set
Returns
HeaderParameter
HeaderParameter instance
decode()
staticdecode(reader,length?):HeaderParameter&$Properties
Decodes a HeaderParameter 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
HeaderParameter & $Properties
HeaderParameter
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):HeaderParameter&$Properties
Decodes a HeaderParameter message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
HeaderParameter & $Properties
HeaderParameter
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 HeaderParameter message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.verify|verify messages.
Parameters
message
HeaderParameter message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified HeaderParameter message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.verify|verify messages.
Parameters
message
HeaderParameter message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):HeaderParameter
Creates a HeaderParameter message from a plain object. Also converts values to their respective internal types.
Parameters
object
{[k: string]: any; }
Plain object
Returns
HeaderParameter
HeaderParameter
toObject()
statictoObject(message,options?):object
Creates a plain object from a HeaderParameter message. Also converts values to other types if specified.
Parameters
message
HeaderParameter
HeaderParameter
options?
IConversionOptions
Conversion options
Returns
object
Plain object