Skip to content

Commit

Permalink
feat: Add support for apiEndpoint and deprecate serviceAddress… (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and jdpedrie committed Aug 7, 2019
1 parent 19a0e96 commit 463e488
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 13 deletions.
7 changes: 5 additions & 2 deletions Monitoring/src/V3/Gapic/AlertPolicyServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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/alert_policy_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/alert_policy_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/alert_policy_service_grpc_config.json',
Expand Down Expand Up @@ -292,6 +292,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 'monitoring.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -319,7 +322,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 Monitoring/src/V3/Gapic/GroupServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,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/group_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/group_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/group_service_grpc_config.json',
Expand Down Expand Up @@ -265,6 +265,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 'monitoring.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -292,7 +295,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 Monitoring/src/V3/Gapic/MetricServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,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/metric_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/metric_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/metric_service_grpc_config.json',
Expand Down Expand Up @@ -292,6 +292,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 'monitoring.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -319,7 +322,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
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,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/notification_channel_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/notification_channel_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/notification_channel_service_grpc_config.json',
Expand Down Expand Up @@ -292,6 +292,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 'monitoring.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -319,7 +322,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 Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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/uptime_check_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/uptime_check_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/uptime_check_service_grpc_config.json',
Expand Down Expand Up @@ -261,6 +261,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 'monitoring.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -288,7 +291,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
6 changes: 3 additions & 3 deletions Monitoring/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updateTime": "2019-08-01T10:01:29.921345Z",
"updateTime": "2019-08-07T18:02:37.067154Z",
"sources": [
{
"generator": {
Expand All @@ -12,8 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "e3b51e761db720974bc153a380a2f7ae5baee43d",
"internalRef": "260992170"
"sha": "3a1b46a6668194a527e532a2c355b404c79b0e6a",
"internalRef": "262167956"
}
}
],
Expand Down

0 comments on commit 463e488

Please sign in to comment.