Skip to content

Commit 022d677

Browse files
feat: [DeveloperConnect] Add Secure Source Manager and Generic HTTP Endpoint connection types (#8936)
* feat: Add Secure Source Manager and Generic HTTP Endpoint connection types feat: Add OAuth flow RPCs (StartOAuth, FinishOAuth) feat: Add Gemini Code Assist GitHub App type feat: Add HTTP Proxy base URI field feat: Add Deployment Events to Insights API (GetDeploymentEvent, ListDeploymentEvents) feat: Add Cloud Run and App Hub Service runtimes to InsightsConfig feat: Add Projects field to InsightsConfig for project tracking feat: A new message `google.cloud.developerconnect.v1.GenericHTTPEndpointConfig` is added feat: A new message `google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfig` is added feat: A new message `google.cloud.developerconnect.v1.StartOAuthRequest` is added feat: A new message `google.cloud.developerconnect.v1.StartOAuthResponse` is added feat: A new message `google.cloud.developerconnect.v1.FinishOAuthRequest` is added feat: A new message `google.cloud.developerconnect.v1.FinishOAuthResponse` is added feat: A new message `google.cloud.developerconnect.v1.insights.Projects` is added feat: A new message `google.cloud.developerconnect.v1.insights.GoogleCloudRun` is added feat: A new message `google.cloud.developerconnect.v1.insights.AppHubService` is added feat: A new message `google.cloud.developerconnect.v1.insights.DeploymentEvent` is added feat: A new message `google.cloud.developerconnect.v1.insights.GetDeploymentEventRequest` is added feat: A new message `google.cloud.developerconnect.v1.insights.ListDeploymentEventsRequest` is added feat: A new message `google.cloud.developerconnect.v1.insights.ListDeploymentEventsResponse` is added feat: A new message `google.cloud.developerconnect.v1.insights.ArtifactDeployment` is added feat: A new field `secure_source_manager_instance_config` is added to message `google.cloud.developerconnect.v1.Connection` feat: A new field `http_config` is added to message `google.cloud.developerconnect.v1.Connection` feat: A new field `http_proxy_base_uri` is added to message `google.cloud.developerconnect.v1.HTTPProxyConfig` feat: A new enum value `GEMINI_CODE_ASSIST` is added to enum `google.cloud.developerconnect.v1.GitHubConfig.GitHubApp` feat: A new field `organization` is added to message `google.cloud.developerconnect.v1.GitHubEnterpriseConfig` feat: A new field `projects` is added to message `google.cloud.developerconnect.v1.insights.InsightsConfig` feat: A new field `google_cloud_run` is added to message `google.cloud.developerconnect.v1.insights.RuntimeConfig` feat: A new field `app_hub_service` is added to message `google.cloud.developerconnect.v1.insights.RuntimeConfig` docs: Updated comments to include regional secret patterns for SecretManager fields in `GitHubConfig`, `OAuthCredential`, `UserCredential`, `GitLabConfig`, `GitLabEnterpriseConfig`, `BitbucketDataCenterConfig`, and `BitbucketCloudConfig` docs: Updated comment for `CreateGitRepositoryLink` RPC in `google.cloud.developerconnect.v1.DeveloperConnect` docs: Updated description for `google.cloud.location.Locations.ListLocations` in YAML docs: Corrected typos in comments for `google.cloud.developerconnect.v1.insights.InsightsConfig` and `google.cloud.developerconnect.v1.insights.ArtifactConfig` PiperOrigin-RevId: 872542190 Source-Link: googleapis/googleapis@7ed997c Source-Link: googleapis/googleapis-gen@6db7ec7 Copy-Tag: eyJwIjoiRGV2ZWxvcGVyQ29ubmVjdC8uT3dsQm90LnlhbWwiLCJoIjoiNmRiN2VjNzEzNDg3MmVmZjJhZGZiODk2MzJlNjA5ZjQ2MjFlYWY0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 684c905 commit 022d677

55 files changed

Lines changed: 4275 additions & 73 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.
2.64 KB
Binary file not shown.
2.33 KB
Binary file not shown.

DeveloperConnect/samples/V1/DeveloperConnectClient/create_git_repository_link.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
* Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
3535
* Connect will configure the Git Repository to send webhook events to
3636
* Developer Connect. Connections that use Firebase GitHub Application will
37-
* have events forwarded to the Firebase service. All other Connections will
38-
* have events forwarded to Cloud Build.
37+
* have events forwarded to the Firebase service. Connections that use Gemini
38+
* Code Assist will have events forwarded to Gemini Code Assist service. All
39+
* other Connections will have events forwarded to Cloud Build.
3940
*
4041
* @param string $formattedParent Value for parent. Please see
4142
* {@see DeveloperConnectClient::connectionName()} for help formatting this field.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
28+
use Google\Cloud\DeveloperConnect\V1\FinishOAuthRequest;
29+
use Google\Cloud\DeveloperConnect\V1\FinishOAuthResponse;
30+
31+
/**
32+
* Finishes OAuth flow for an account connector.
33+
*
34+
* @param string $formattedAccountConnector The resource name of the AccountConnector in the format
35+
* `projects/&#42;/locations/&#42;/accountConnectors/*`. Please see
36+
* {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
37+
*/
38+
function finish_o_auth_sample(string $formattedAccountConnector): void
39+
{
40+
// Create a client.
41+
$developerConnectClient = new DeveloperConnectClient();
42+
43+
// Prepare the request message.
44+
$request = (new FinishOAuthRequest())
45+
->setAccountConnector($formattedAccountConnector);
46+
47+
// Call the API and handle any network failures.
48+
try {
49+
/** @var FinishOAuthResponse $response */
50+
$response = $developerConnectClient->finishOAuth($request);
51+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
52+
} catch (ApiException $ex) {
53+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
54+
}
55+
}
56+
57+
/**
58+
* Helper to execute the sample.
59+
*
60+
* This sample has been automatically generated and should be regarded as a code
61+
* template only. It will require modifications to work:
62+
* - It may require correct/in-range values for request initialization.
63+
* - It may require specifying regional endpoints when creating the service client,
64+
* please see the apiEndpoint client configuration option for more details.
65+
*/
66+
function callSample(): void
67+
{
68+
$formattedAccountConnector = DeveloperConnectClient::accountConnectorName(
69+
'[PROJECT]',
70+
'[LOCATION]',
71+
'[ACCOUNT_CONNECTOR]'
72+
);
73+
74+
finish_o_auth_sample($formattedAccountConnector);
75+
}
76+
// [END developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync]

DeveloperConnect/samples/V1/DeveloperConnectClient/list_locations.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131

3232
/**
3333
* Lists information about the supported locations for this service.
34+
This method can be called in two ways:
35+
36+
* **List all public locations:** Use the path `GET /v1/locations`.
37+
* **List project-visible locations:** Use the path
38+
`GET /v1/projects/{project_id}/locations`. This may include public
39+
locations as well as private or other locations specifically visible
40+
to the project.
3441
*
3542
* This sample has been automatically generated and should be regarded as a code
3643
* template only. It will require modifications to work:
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
28+
use Google\Cloud\DeveloperConnect\V1\StartOAuthRequest;
29+
use Google\Cloud\DeveloperConnect\V1\StartOAuthResponse;
30+
31+
/**
32+
* Starts OAuth flow for an account connector.
33+
*
34+
* @param string $formattedAccountConnector The resource name of the AccountConnector in the format
35+
* `projects/&#42;/locations/&#42;/accountConnectors/*`. Please see
36+
* {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
37+
*/
38+
function start_o_auth_sample(string $formattedAccountConnector): void
39+
{
40+
// Create a client.
41+
$developerConnectClient = new DeveloperConnectClient();
42+
43+
// Prepare the request message.
44+
$request = (new StartOAuthRequest())
45+
->setAccountConnector($formattedAccountConnector);
46+
47+
// Call the API and handle any network failures.
48+
try {
49+
/** @var StartOAuthResponse $response */
50+
$response = $developerConnectClient->startOAuth($request);
51+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
52+
} catch (ApiException $ex) {
53+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
54+
}
55+
}
56+
57+
/**
58+
* Helper to execute the sample.
59+
*
60+
* This sample has been automatically generated and should be regarded as a code
61+
* template only. It will require modifications to work:
62+
* - It may require correct/in-range values for request initialization.
63+
* - It may require specifying regional endpoints when creating the service client,
64+
* please see the apiEndpoint client configuration option for more details.
65+
*/
66+
function callSample(): void
67+
{
68+
$formattedAccountConnector = DeveloperConnectClient::accountConnectorName(
69+
'[PROJECT]',
70+
'[LOCATION]',
71+
'[ACCOUNT_CONNECTOR]'
72+
);
73+
74+
start_o_auth_sample($formattedAccountConnector);
75+
}
76+
// [END developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync]

DeveloperConnect/samples/V1/InsightsConfigServiceClient/delete_insights_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
use Google\Rpc\Status;
3131

3232
/**
33-
* Delete a single Insight.
33+
* Deletes a single Insight.
3434
*
3535
* @param string $formattedName Value for parent. Please see
3636
* {@see InsightsConfigServiceClient::insightsConfigName()} for help formatting this field.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\DeveloperConnect\V1\Client\InsightsConfigServiceClient;
28+
use Google\Cloud\DeveloperConnect\V1\DeploymentEvent;
29+
use Google\Cloud\DeveloperConnect\V1\GetDeploymentEventRequest;
30+
31+
/**
32+
* Gets a single Deployment Event.
33+
*
34+
* @param string $formattedName The name of the deployment event to retrieve.
35+
* Format:
36+
* projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
37+
* Please see {@see InsightsConfigServiceClient::deploymentEventName()} for help formatting this field.
38+
*/
39+
function get_deployment_event_sample(string $formattedName): void
40+
{
41+
// Create a client.
42+
$insightsConfigServiceClient = new InsightsConfigServiceClient();
43+
44+
// Prepare the request message.
45+
$request = (new GetDeploymentEventRequest())
46+
->setName($formattedName);
47+
48+
// Call the API and handle any network failures.
49+
try {
50+
/** @var DeploymentEvent $response */
51+
$response = $insightsConfigServiceClient->getDeploymentEvent($request);
52+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
53+
} catch (ApiException $ex) {
54+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
55+
}
56+
}
57+
58+
/**
59+
* Helper to execute the sample.
60+
*
61+
* This sample has been automatically generated and should be regarded as a code
62+
* template only. It will require modifications to work:
63+
* - It may require correct/in-range values for request initialization.
64+
* - It may require specifying regional endpoints when creating the service client,
65+
* please see the apiEndpoint client configuration option for more details.
66+
*/
67+
function callSample(): void
68+
{
69+
$formattedName = InsightsConfigServiceClient::deploymentEventName(
70+
'[PROJECT]',
71+
'[LOCATION]',
72+
'[INSIGHTS_CONFIG]',
73+
'[DEPLOYMENT_EVENT]'
74+
);
75+
76+
get_deployment_event_sample($formattedName);
77+
}
78+
// [END developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync]
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\PagedListResponse;
28+
use Google\Cloud\DeveloperConnect\V1\Client\InsightsConfigServiceClient;
29+
use Google\Cloud\DeveloperConnect\V1\DeploymentEvent;
30+
use Google\Cloud\DeveloperConnect\V1\ListDeploymentEventsRequest;
31+
32+
/**
33+
* Lists Deployment Events in a given insights config.
34+
*
35+
* @param string $formattedParent The parent insights config that owns this collection of
36+
* deployment events. Format:
37+
* projects/{project}/locations/{location}/insightsConfigs/{insights_config}
38+
* Please see {@see InsightsConfigServiceClient::insightsConfigName()} for help formatting this field.
39+
*/
40+
function list_deployment_events_sample(string $formattedParent): void
41+
{
42+
// Create a client.
43+
$insightsConfigServiceClient = new InsightsConfigServiceClient();
44+
45+
// Prepare the request message.
46+
$request = (new ListDeploymentEventsRequest())
47+
->setParent($formattedParent);
48+
49+
// Call the API and handle any network failures.
50+
try {
51+
/** @var PagedListResponse $response */
52+
$response = $insightsConfigServiceClient->listDeploymentEvents($request);
53+
54+
/** @var DeploymentEvent $element */
55+
foreach ($response as $element) {
56+
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
57+
}
58+
} catch (ApiException $ex) {
59+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
60+
}
61+
}
62+
63+
/**
64+
* Helper to execute the sample.
65+
*
66+
* This sample has been automatically generated and should be regarded as a code
67+
* template only. It will require modifications to work:
68+
* - It may require correct/in-range values for request initialization.
69+
* - It may require specifying regional endpoints when creating the service client,
70+
* please see the apiEndpoint client configuration option for more details.
71+
*/
72+
function callSample(): void
73+
{
74+
$formattedParent = InsightsConfigServiceClient::insightsConfigName(
75+
'[PROJECT]',
76+
'[LOCATION]',
77+
'[INSIGHTS_CONFIG]'
78+
);
79+
80+
list_deployment_events_sample($formattedParent);
81+
}
82+
// [END developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync]

DeveloperConnect/samples/V1/InsightsConfigServiceClient/list_locations.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131

3232
/**
3333
* Lists information about the supported locations for this service.
34+
This method can be called in two ways:
35+
36+
* **List all public locations:** Use the path `GET /v1/locations`.
37+
* **List project-visible locations:** Use the path
38+
`GET /v1/projects/{project_id}/locations`. This may include public
39+
locations as well as private or other locations specifically visible
40+
to the project.
3441
*
3542
* This sample has been automatically generated and should be regarded as a code
3643
* template only. It will require modifications to work:

0 commit comments

Comments
 (0)