Class: SecurityDefinitions
protoc_gen_openapiv2.options.SecurityDefinitions
SecurityDefinitions is a representation of OpenAPI v2 specification's
Security Definitions object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.
Implements
Constructors
constructor
• new SecurityDefinitions(properties?): SecurityDefinitions
Constructs a new SecurityDefinitions.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ISecurityDefinitions | Properties to set |
Returns
Properties
security
• security: Object
A single security scheme definition, mapping a "name" to the scheme it defines.
Index signature
▪ [k: string]: ISecurityScheme
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this SecurityDefinitions to JSON.
Returns
Object
JSON object
create
▸ create(properties?): SecurityDefinitions
Creates a new SecurityDefinitions instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ISecurityDefinitions | Properties to set |
Returns
SecurityDefinitions instance
decode
▸ decode(reader, length?): SecurityDefinitions
Decodes a SecurityDefinitions 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
SecurityDefinitions
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): SecurityDefinitions
Decodes a SecurityDefinitions message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
SecurityDefinitions
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 SecurityDefinitions message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ISecurityDefinitions | SecurityDefinitions message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified SecurityDefinitions message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ISecurityDefinitions | SecurityDefinitions message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): SecurityDefinitions
Creates a SecurityDefinitions message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
SecurityDefinitions
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for SecurityDefinitions
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 SecurityDefinitions message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | SecurityDefinitions | SecurityDefinitions |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object