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
| Name | Type | Description |
|---|---|---|
properties? | IHeaderParameter | Properties to set |
Returns
Properties
description
• description: string
Description is a short description of the header.
Implementation of
format
• format: string
Format The extending format for the previously mentioned type.
Implementation of
name
• name: string
Name is the header name.
Implementation of
required
• required: boolean
Required indicates if the header is optional
Implementation of
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
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
| Name | Type | Description |
|---|---|---|
properties? | IHeaderParameter | Properties to set |
Returns
HeaderParameter instance
decode
▸ decode(reader, length?): HeaderParameter
Decodes a HeaderParameter message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
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
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
| Name | Type | Description |
|---|---|---|
message | IHeaderParameter | HeaderParameter message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | IHeaderParameter | HeaderParameter message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
HeaderParameter
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for HeaderParameter
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your 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
| Name | Type | Description |
|---|---|---|
message | HeaderParameter | HeaderParameter |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object