Skip to content

Commit df609f8

Browse files
chore(php): promote BeyondCorpAppConnections as stable (#7466)
chore(php): promote BeyondCorpAppConnectors as stable chore(php): promote BeyondCorpAppGateways as stable chore(php): promote BeyondCorpClientConnectorServices as stable chore(php): promote BeyondCorpClientGateway as stable PiperOrigin-RevId: 646188628 Source-Link: googleapis/googleapis@3d160b6 Source-Link: googleapis/googleapis-gen@3189b73 Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiIzMTg5YjczYTgyMmFlOGU5Nzg4Yzc0NWY2MzUzNzRhOTgwMDUyYWYyIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3RvcnMvLk93bEJvdC55YW1sIiwiaCI6IjMxODliNzNhODIyYWU4ZTk3ODhjNzQ1ZjYzNTM3NGE5ODAwNTJhZjIifQ== Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiIzMTg5YjczYTgyMmFlOGU5Nzg4Yzc0NWY2MzUzNzRhOTgwMDUyYWYyIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudENvbm5lY3RvclNlcnZpY2VzLy5Pd2xCb3QueWFtbCIsImgiOiIzMTg5YjczYTgyMmFlOGU5Nzg4Yzc0NWY2MzUzNzRhOTgwMDUyYWYyIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiIzMTg5YjczYTgyMmFlOGU5Nzg4Yzc0NWY2MzUzNzRhOTgwMDUyYWYyIn0=
1 parent cbf96ae commit df609f8

10 files changed

Lines changed: 105 additions & 10 deletions

File tree

BeyondCorpAppConnections/src/V1/Client/AppConnectionsServiceClient.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30-
use Google\ApiCore\LongRunning\OperationsClient;
3130
use Google\ApiCore\OperationResponse;
3231
use Google\ApiCore\PagedListResponse;
3332
use Google\ApiCore\ResourceHelperTrait;
@@ -50,6 +49,7 @@
5049
use Google\Cloud\Location\GetLocationRequest;
5150
use Google\Cloud\Location\ListLocationsRequest;
5251
use Google\Cloud\Location\Location;
52+
use Google\LongRunning\Client\OperationsClient;
5353
use Google\LongRunning\Operation;
5454
use GuzzleHttp\Promise\PromiseInterface;
5555

@@ -168,6 +168,25 @@ public function resumeOperation($operationName, $methodName = null)
168168
return $operation;
169169
}
170170

171+
/**
172+
* Create the default operation client for the service.
173+
*
174+
* @param array $options ClientOptions for the client.
175+
*
176+
* @return OperationsClient
177+
*/
178+
private function createOperationsClient(array $options)
179+
{
180+
// Unset client-specific configuration options
181+
unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
182+
183+
if (isset($options['operationsClient'])) {
184+
return $options['operationsClient'];
185+
}
186+
187+
return new OperationsClient($options);
188+
}
189+
171190
/**
172191
* Formats a string containing the fully-qualified path to represent a
173192
* app_connection resource.

BeyondCorpAppConnections/tests/Unit/V1/Client/AppConnectionsServiceClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
use Google\ApiCore\ApiException;
2626
use Google\ApiCore\CredentialsWrapper;
27-
use Google\ApiCore\LongRunning\OperationsClient;
2827
use Google\ApiCore\Testing\GeneratedTest;
2928
use Google\ApiCore\Testing\MockTransport;
3029
use Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection;
@@ -49,6 +48,7 @@
4948
use Google\Cloud\Location\ListLocationsRequest;
5049
use Google\Cloud\Location\ListLocationsResponse;
5150
use Google\Cloud\Location\Location;
51+
use Google\LongRunning\Client\OperationsClient;
5252
use Google\LongRunning\GetOperationRequest;
5353
use Google\LongRunning\Operation;
5454
use Google\Protobuf\Any;

BeyondCorpAppConnectors/src/V1/Client/AppConnectorsServiceClient.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30-
use Google\ApiCore\LongRunning\OperationsClient;
3130
use Google\ApiCore\OperationResponse;
3231
use Google\ApiCore\PagedListResponse;
3332
use Google\ApiCore\ResourceHelperTrait;
@@ -50,6 +49,7 @@
5049
use Google\Cloud\Location\GetLocationRequest;
5150
use Google\Cloud\Location\ListLocationsRequest;
5251
use Google\Cloud\Location\Location;
52+
use Google\LongRunning\Client\OperationsClient;
5353
use Google\LongRunning\Operation;
5454
use GuzzleHttp\Promise\PromiseInterface;
5555

@@ -168,6 +168,25 @@ public function resumeOperation($operationName, $methodName = null)
168168
return $operation;
169169
}
170170

171+
/**
172+
* Create the default operation client for the service.
173+
*
174+
* @param array $options ClientOptions for the client.
175+
*
176+
* @return OperationsClient
177+
*/
178+
private function createOperationsClient(array $options)
179+
{
180+
// Unset client-specific configuration options
181+
unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
182+
183+
if (isset($options['operationsClient'])) {
184+
return $options['operationsClient'];
185+
}
186+
187+
return new OperationsClient($options);
188+
}
189+
171190
/**
172191
* Formats a string containing the fully-qualified path to represent a
173192
* app_connector resource.

BeyondCorpAppConnectors/tests/Unit/V1/Client/AppConnectorsServiceClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
use Google\ApiCore\ApiException;
2626
use Google\ApiCore\CredentialsWrapper;
27-
use Google\ApiCore\LongRunning\OperationsClient;
2827
use Google\ApiCore\Testing\GeneratedTest;
2928
use Google\ApiCore\Testing\MockTransport;
3029
use Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector;
@@ -47,6 +46,7 @@
4746
use Google\Cloud\Location\ListLocationsRequest;
4847
use Google\Cloud\Location\ListLocationsResponse;
4948
use Google\Cloud\Location\Location;
49+
use Google\LongRunning\Client\OperationsClient;
5050
use Google\LongRunning\GetOperationRequest;
5151
use Google\LongRunning\Operation;
5252
use Google\Protobuf\Any;

BeyondCorpAppGateways/src/V1/Client/AppGatewaysServiceClient.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30-
use Google\ApiCore\LongRunning\OperationsClient;
3130
use Google\ApiCore\OperationResponse;
3231
use Google\ApiCore\PagedListResponse;
3332
use Google\ApiCore\ResourceHelperTrait;
@@ -48,6 +47,7 @@
4847
use Google\Cloud\Location\GetLocationRequest;
4948
use Google\Cloud\Location\ListLocationsRequest;
5049
use Google\Cloud\Location\Location;
50+
use Google\LongRunning\Client\OperationsClient;
5151
use Google\LongRunning\Operation;
5252
use GuzzleHttp\Promise\PromiseInterface;
5353

@@ -164,6 +164,25 @@ public function resumeOperation($operationName, $methodName = null)
164164
return $operation;
165165
}
166166

167+
/**
168+
* Create the default operation client for the service.
169+
*
170+
* @param array $options ClientOptions for the client.
171+
*
172+
* @return OperationsClient
173+
*/
174+
private function createOperationsClient(array $options)
175+
{
176+
// Unset client-specific configuration options
177+
unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
178+
179+
if (isset($options['operationsClient'])) {
180+
return $options['operationsClient'];
181+
}
182+
183+
return new OperationsClient($options);
184+
}
185+
167186
/**
168187
* Formats a string containing the fully-qualified path to represent a app_gateway
169188
* resource.

BeyondCorpAppGateways/tests/Unit/V1/Client/AppGatewaysServiceClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
use Google\ApiCore\ApiException;
2626
use Google\ApiCore\CredentialsWrapper;
27-
use Google\ApiCore\LongRunning\OperationsClient;
2827
use Google\ApiCore\Testing\GeneratedTest;
2928
use Google\ApiCore\Testing\MockTransport;
3029
use Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway;
@@ -45,6 +44,7 @@
4544
use Google\Cloud\Location\ListLocationsRequest;
4645
use Google\Cloud\Location\ListLocationsResponse;
4746
use Google\Cloud\Location\Location;
47+
use Google\LongRunning\Client\OperationsClient;
4848
use Google\LongRunning\GetOperationRequest;
4949
use Google\LongRunning\Operation;
5050
use Google\Protobuf\Any;

BeyondCorpClientConnectorServices/src/V1/Client/ClientConnectorServicesServiceClient.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30-
use Google\ApiCore\LongRunning\OperationsClient;
3130
use Google\ApiCore\OperationResponse;
3231
use Google\ApiCore\PagedListResponse;
3332
use Google\ApiCore\ResourceHelperTrait;
@@ -49,6 +48,7 @@
4948
use Google\Cloud\Location\GetLocationRequest;
5049
use Google\Cloud\Location\ListLocationsRequest;
5150
use Google\Cloud\Location\Location;
51+
use Google\LongRunning\Client\OperationsClient;
5252
use Google\LongRunning\Operation;
5353
use GuzzleHttp\Promise\PromiseInterface;
5454

@@ -163,6 +163,25 @@ public function resumeOperation($operationName, $methodName = null)
163163
return $operation;
164164
}
165165

166+
/**
167+
* Create the default operation client for the service.
168+
*
169+
* @param array $options ClientOptions for the client.
170+
*
171+
* @return OperationsClient
172+
*/
173+
private function createOperationsClient(array $options)
174+
{
175+
// Unset client-specific configuration options
176+
unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
177+
178+
if (isset($options['operationsClient'])) {
179+
return $options['operationsClient'];
180+
}
181+
182+
return new OperationsClient($options);
183+
}
184+
166185
/**
167186
* Formats a string containing the fully-qualified path to represent a
168187
* client_connector_service resource.

BeyondCorpClientConnectorServices/tests/Unit/V1/Client/ClientConnectorServicesServiceClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
use Google\ApiCore\ApiException;
2626
use Google\ApiCore\CredentialsWrapper;
27-
use Google\ApiCore\LongRunning\OperationsClient;
2827
use Google\ApiCore\Testing\GeneratedTest;
2928
use Google\ApiCore\Testing\MockTransport;
3029
use Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService;
@@ -46,6 +45,7 @@
4645
use Google\Cloud\Location\ListLocationsRequest;
4746
use Google\Cloud\Location\ListLocationsResponse;
4847
use Google\Cloud\Location\Location;
48+
use Google\LongRunning\Client\OperationsClient;
4949
use Google\LongRunning\GetOperationRequest;
5050
use Google\LongRunning\Operation;
5151
use Google\Protobuf\Any;

BeyondCorpClientGateways/src/V1/Client/ClientGatewaysServiceClient.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30-
use Google\ApiCore\LongRunning\OperationsClient;
3130
use Google\ApiCore\OperationResponse;
3231
use Google\ApiCore\PagedListResponse;
3332
use Google\ApiCore\ResourceHelperTrait;
@@ -48,6 +47,7 @@
4847
use Google\Cloud\Location\GetLocationRequest;
4948
use Google\Cloud\Location\ListLocationsRequest;
5049
use Google\Cloud\Location\Location;
50+
use Google\LongRunning\Client\OperationsClient;
5151
use Google\LongRunning\Operation;
5252
use GuzzleHttp\Promise\PromiseInterface;
5353

@@ -161,6 +161,25 @@ public function resumeOperation($operationName, $methodName = null)
161161
return $operation;
162162
}
163163

164+
/**
165+
* Create the default operation client for the service.
166+
*
167+
* @param array $options ClientOptions for the client.
168+
*
169+
* @return OperationsClient
170+
*/
171+
private function createOperationsClient(array $options)
172+
{
173+
// Unset client-specific configuration options
174+
unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']);
175+
176+
if (isset($options['operationsClient'])) {
177+
return $options['operationsClient'];
178+
}
179+
180+
return new OperationsClient($options);
181+
}
182+
164183
/**
165184
* Formats a string containing the fully-qualified path to represent a
166185
* client_gateway resource.

BeyondCorpClientGateways/tests/Unit/V1/Client/ClientGatewaysServiceClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
use Google\ApiCore\ApiException;
2626
use Google\ApiCore\CredentialsWrapper;
27-
use Google\ApiCore\LongRunning\OperationsClient;
2827
use Google\ApiCore\Testing\GeneratedTest;
2928
use Google\ApiCore\Testing\MockTransport;
3029
use Google\Cloud\BeyondCorp\ClientGateways\V1\ClientGateway;
@@ -43,6 +42,7 @@
4342
use Google\Cloud\Location\ListLocationsRequest;
4443
use Google\Cloud\Location\ListLocationsResponse;
4544
use Google\Cloud\Location\Location;
45+
use Google\LongRunning\Client\OperationsClient;
4646
use Google\LongRunning\GetOperationRequest;
4747
use Google\LongRunning\Operation;
4848
use Google\Protobuf\Any;

0 commit comments

Comments
 (0)