Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class ApiKeyConfig.
Config for authentication with API key.
Generated from protobuf message google.cloud.dialogflow.v2.Tool.Authentication.ApiKeyConfig
Namespace
Google \ Cloud \ Dialogflow \ V2 \ Tool \ AuthenticationMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ key_name |
string
Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=
|
↳ api_key |
string
Optional. The API key. If the |
↳ secret_version_for_api_key |
string
Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the |
↳ request_location |
int
Required. Key location in the request. |
getKeyName
Required. The parameter name or the header name of the API key.
E.g., If the API request is "https://example.com/act?X-Api-Key=
| Returns | |
|---|---|
| Type | Description |
string |
|
setKeyName
Required. The parameter name or the header name of the API key.
E.g., If the API request is "https://example.com/act?X-Api-Key=
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getApiKey
Optional. The API key. If the secret_version_for_api_key field is
set, this field will be ignored.
| Returns | |
|---|---|
| Type | Description |
string |
|
setApiKey
Optional. The API key. If the secret_version_for_api_key field is
set, this field will be ignored.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSecretVersionForApiKey
Optional. The name of the SecretManager secret version resource storing
the API key. If this field is set, the api_key field will be ignored.
Format: projects/{project}/secrets/{secret}/versions/{version}
| Returns | |
|---|---|
| Type | Description |
string |
|
setSecretVersionForApiKey
Optional. The name of the SecretManager secret version resource storing
the API key. If this field is set, the api_key field will be ignored.
Format: projects/{project}/secrets/{secret}/versions/{version}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRequestLocation
Required. Key location in the request.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type RequestLocation. |
setRequestLocation
Required. Key location in the request.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type RequestLocation. |
| Returns | |
|---|---|
| Type | Description |
$this |
|