Skip to content

Commit

Permalink
feat: Add support for apiEndpoint and deprecate serviceAddress client…
Browse files Browse the repository at this point in the history
… configuration option. (#2208)
  • Loading branch information
yoshi-automation authored and dwsupplee committed Aug 7, 2019
1 parent 12f2a15 commit 832fd81
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 19 deletions.
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/AgentsGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/agents_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/agents_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/agents_grpc_config.json',
Expand Down Expand Up @@ -276,6 +276,9 @@ public function resumeOperation($operationName, $methodName = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -303,7 +306,7 @@ public function resumeOperation($operationName, $methodName = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/ContextsGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/contexts_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/contexts_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/contexts_grpc_config.json',
Expand Down Expand Up @@ -272,6 +272,9 @@ public static function parseName($formattedName, $template = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -299,7 +302,7 @@ public static function parseName($formattedName, $template = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/EntityTypesGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/entity_types_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/entity_types_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/entity_types_grpc_config.json',
Expand Down Expand Up @@ -325,6 +325,9 @@ public function resumeOperation($operationName, $methodName = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -352,7 +355,7 @@ public function resumeOperation($operationName, $methodName = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/IntentsGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/intents_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/intents_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/intents_grpc_config.json',
Expand Down Expand Up @@ -356,6 +356,9 @@ public function resumeOperation($operationName, $methodName = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -383,7 +386,7 @@ public function resumeOperation($operationName, $methodName = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/SessionEntityTypesGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/session_entity_types_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/session_entity_types_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/session_entity_types_grpc_config.json',
Expand Down Expand Up @@ -266,6 +266,9 @@ public static function parseName($formattedName, $template = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -293,7 +296,7 @@ public static function parseName($formattedName, $template = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions Dialogflow/src/V2/Gapic/SessionsGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/sessions_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/sessions_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/sessions_grpc_config.json',
Expand Down Expand Up @@ -210,6 +210,9 @@ public static function parseName($formattedName, $template = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'dialogflow.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -237,7 +240,7 @@ public static function parseName($formattedName, $template = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
8 changes: 4 additions & 4 deletions Dialogflow/src/V2/QueryResult.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Dialogflow/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updateTime": "2019-07-25T16:39:11.221470Z",
"updateTime": "2019-08-07T18:00:00.736131Z",
"sources": [
{
"generator": {
Expand All @@ -12,8 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "4b12afe72950f36bef6f196a05f4430e4421a873",
"internalRef": "259790363"
"sha": "3a1b46a6668194a527e532a2c355b404c79b0e6a",
"internalRef": "262167956"
}
}
],
Expand Down

0 comments on commit 832fd81

Please sign in to comment.