Skip to content

Commit 887fe65

Browse files
authored
chore!: create V2 release candidates for some components (#7626)
* chore!: promote ApiGateway to v2 * chore!: promote AppEngineAdmin to v2 * chore!: promote BigQueryConnection to v2 * chore!: promote Channel to v2 * chore!: promote Datastream to v2 * chore!: promote IamCredentials to v2 * chore!: promote Asset to v2 * chore!: promote BigQueryStorage to v2 * chore!: promote Container to v2 * chore!: promote Iap to v2 * chore!: promote Memcache to v2 * chore!: promote Profiler to v2 * chore!: promote Redis to v2 * chore!: promote SecurityCenter to v2 * chore!: promote SecurityPrivateCa to v2 * chore!: promote ServiceControl to v2 * chore!: promote ServiceDirectory to v2 * chore!: promote ServiceManagement to v2 * chore!: promote ServiceUsage to v2 * chore!: promote Billing to v2
1 parent dc1dbc0 commit 887fe65

2,084 files changed

Lines changed: 11084 additions & 158681 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ApiGateway/.OwlBot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
deep-copy-regex:
2-
- source: /google/cloud/apigateway/v1/.*-php/(.*)
3-
dest: /owl-bot-staging/ApiGateway/v1/$1
2+
- source: /google/cloud/apigateway/(v1)/.*-php/(.*)
3+
dest: /owl-bot-staging/ApiGateway/$1/$2
44
api-name: ApiGateway

ApiGateway/owlbot.py

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 Google LLC
1+
# Copyright 2023 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -30,14 +30,7 @@
3030
# Added so that we can pass copy_excludes in the owlbot_main() call
3131
_tracked_paths.add(src)
3232

33-
php.owlbot_main(
34-
src=src,
35-
dest=dest,
36-
copy_excludes=[
37-
src / "**/[A-Z]*_*.php",
38-
src / "**/*GrpcClient.php",
39-
]
40-
)
33+
php.owlbot_main(src=src, dest=dest)
4134

4235
# remove class_alias code
4336
s.replace(
@@ -48,28 +41,16 @@
4841
+ "\n",
4942
'')
5043

51-
### [START] protoc backwards compatibility fixes
52-
53-
# roll back to private properties.
54-
s.replace(
55-
"src/**/V*/**/*.php",
56-
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
57-
r"""Generated from protobuf field \1
58-
*/
59-
private $""")
60-
61-
# Replace "Unwrapped" with "Value" for method names.
62-
s.replace(
63-
"src/**/V*/**/*.php",
64-
r"public function ([s|g]\w{3,})Unwrapped",
65-
r"public function \1Value"
66-
)
67-
68-
### [END] protoc backwards compatibility fixes
69-
70-
# fix relative cloud.google.com links
71-
s.replace(
72-
"src/**/V*/**/*.php",
73-
r"(.{0,})\]\((/.{0,})\)",
74-
r"\1](https://cloud.google.com\2)"
75-
)
44+
# format generated clients
45+
subprocess.run([
46+
'npm',
47+
'exec',
48+
'--yes',
49+
'--package=@prettier/plugin-php@^0.16',
50+
'--',
51+
'prettier',
52+
'**/Client/*',
53+
'--write',
54+
'--parser=php',
55+
'--single-quote',
56+
'--print-width=120'])

ApiGateway/src/V1/Api.php

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ApiGateway/src/V1/ApiConfig.php

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ApiGateway/src/V1/ApiConfig/File.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ApiGateway/src/V1/ApiConfig/GrpcServiceDefinition.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ApiGateway/src/V1/ApiConfig/OpenApiDocument.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ApiGateway/src/V1/ApiGatewayServiceClient.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

ApiGateway/src/V1/Client/ApiGatewayServiceClient.php

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2023 Google LLC
3+
* Copyright 2024 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -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;
@@ -53,6 +52,7 @@
5352
use Google\Cloud\ApiGateway\V1\UpdateApiConfigRequest;
5453
use Google\Cloud\ApiGateway\V1\UpdateApiRequest;
5554
use Google\Cloud\ApiGateway\V1\UpdateGatewayRequest;
55+
use Google\LongRunning\Client\OperationsClient;
5656
use Google\LongRunning\Operation;
5757
use GuzzleHttp\Promise\PromiseInterface;
5858

@@ -108,9 +108,7 @@ final class ApiGatewayServiceClient
108108
private const CODEGEN_NAME = 'gapic';
109109

110110
/** The default scopes required by the service. */
111-
public static $serviceScopes = [
112-
'https://www.googleapis.com/auth/cloud-platform',
113-
];
111+
public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'];
114112

115113
private $operationsClient;
116114

@@ -156,12 +154,33 @@ public function getOperationsClient()
156154
*/
157155
public function resumeOperation($operationName, $methodName = null)
158156
{
159-
$options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
157+
$options = isset($this->descriptors[$methodName]['longRunning'])
158+
? $this->descriptors[$methodName]['longRunning']
159+
: [];
160160
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
161161
$operation->reload();
162162
return $operation;
163163
}
164164

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

ApiGateway/src/V1/CreateApiConfigRequest.php

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)