Skip to content

Commit 10ac207

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add CustomHostConfig to configure custom hostnames for private instances
feat: Add option to require code owner approval in branch rules feat: Add force option to DeleteInstance request docs: Improve documentation for labels, pagination, and ListLocations PiperOrigin-RevId: 889991858
1 parent e7cd9a7 commit 10ac207

File tree

3 files changed

+121
-47
lines changed

3 files changed

+121
-47
lines changed

google/cloud/securesourcemanager/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ proto_library(
3030
"//google/api:annotations_proto",
3131
"//google/api:client_proto",
3232
"//google/api:field_behavior_proto",
33+
"//google/api:field_info_proto",
3334
"//google/api:resource_proto",
3435
"//google/iam/v1:iam_policy_proto",
3536
"//google/iam/v1:policy_proto",

google/cloud/securesourcemanager/v1/secure_source_manager.proto

Lines changed: 102 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 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.
@@ -19,6 +19,7 @@ package google.cloud.securesourcemanager.v1;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22+
import "google/api/field_info.proto";
2223
import "google/api/resource.proto";
2324
import "google/iam/v1/iam_policy.proto";
2425
import "google/iam/v1/policy.proto";
@@ -560,7 +561,7 @@ service SecureSourceManager {
560561
// Batch creates pull request comments. This function is used to create
561562
// multiple PullRequestComments for code review. There needs to be exactly one
562563
// PullRequestComment of type Review, and at most 100 PullRequestComments of
563-
// type Code per request. The Postition of the code comments must be unique
564+
// type Code per request. The Position of the code comments must be unique
564565
// within the request.
565566
rpc BatchCreatePullRequestComments(BatchCreatePullRequestCommentsRequest)
566567
returns (google.longrunning.Operation) {
@@ -727,6 +728,25 @@ message Instance {
727728

728729
// PrivateConfig includes settings for private instance.
729730
message PrivateConfig {
731+
// Custom host config for the instance.
732+
message CustomHostConfig {
733+
// Required. The custom UI hostname for the instance, e.g.,
734+
// "git.source.internal.mycompany.com"
735+
string html = 1 [(google.api.field_behavior) = REQUIRED];
736+
737+
// Required. The custom API hostname for the instance, e.g.,
738+
// "api.source.internal.mycompany.com"
739+
string api = 2 [(google.api.field_behavior) = REQUIRED];
740+
741+
// Required. The custom git ssh hostname for the instance, e.g.,
742+
// "ssh.source.internal.mycompany.com"
743+
string git_ssh = 3 [(google.api.field_behavior) = REQUIRED];
744+
745+
// Required. The custom git http hostname for the instance, e.g.,
746+
// "git.source.internal.mycompany.com"
747+
string git_http = 4 [(google.api.field_behavior) = REQUIRED];
748+
}
749+
730750
// Required. Immutable. Indicate if it's private instance.
731751
bool is_private = 1 [
732752
(google.api.field_behavior) = IMMUTABLE,
@@ -766,6 +786,10 @@ message Instance {
766786
// included in this list.
767787
repeated string psc_allowed_projects = 6
768788
[(google.api.field_behavior) = OPTIONAL];
789+
790+
// Optional. Custom host config for the instance.
791+
CustomHostConfig custom_host_config = 7
792+
[(google.api.field_behavior) = OPTIONAL];
769793
}
770794

771795
// WorkforceIdentityFederationConfig allows this instance to support users
@@ -778,7 +802,7 @@ message Instance {
778802
];
779803
}
780804

781-
// Optional. A unique identifier for an instance. The name should be of the
805+
// Identifier. A unique identifier for an instance. The name should be of the
782806
// format:
783807
// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`
784808
//
@@ -790,7 +814,7 @@ message Instance {
790814
//
791815
// `instance_id`: User provided name for the instance, must be unique for a
792816
// project_number and location_id combination.
793-
string name = 1 [(google.api.field_behavior) = OPTIONAL];
817+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
794818

795819
// Output only. Create timestamp.
796820
google.protobuf.Timestamp create_time = 2
@@ -801,6 +825,10 @@ message Instance {
801825
[(google.api.field_behavior) = OUTPUT_ONLY];
802826

803827
// Optional. Labels as key value pairs.
828+
// Keys and values can contain only lowercase letters, numeric characters,
829+
// underscores, and dashes.
830+
// For more information, see [Requirements for
831+
// labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding).
804832
map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
805833

806834
// Optional. Private settings for private instance.
@@ -990,10 +1018,10 @@ message Repository {
9901018
string readme = 4;
9911019
}
9921020

993-
// Optional. A unique identifier for a repository. The name should be of the
1021+
// Identifier. A unique identifier for a repository. The name should be of the
9941022
// format:
9951023
// `projects/{project}/locations/{location_id}/repositories/{repository_id}`
996-
string name = 1 [(google.api.field_behavior) = OPTIONAL];
1024+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
9971025

9981026
// Optional. Description of the repository, which cannot exceed 500
9991027
// characters.
@@ -1013,7 +1041,10 @@ message Repository {
10131041
];
10141042

10151043
// Output only. Unique identifier of the repository.
1016-
string uid = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1044+
string uid = 4 [
1045+
(google.api.field_info).format = UUID4,
1046+
(google.api.field_behavior) = OUTPUT_ONLY
1047+
];
10171048

10181049
// Output only. Create timestamp.
10191050
google.protobuf.Timestamp create_time = 5
@@ -1086,7 +1117,10 @@ message Hook {
10861117
[(google.api.field_behavior) = OUTPUT_ONLY];
10871118

10881119
// Output only. Unique identifier of the hook.
1089-
string uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1120+
string uid = 7 [
1121+
(google.api.field_info).format = UUID4,
1122+
(google.api.field_behavior) = OUTPUT_ONLY
1123+
];
10901124

10911125
// Optional. The trigger option for push events.
10921126
PushOption push_option = 9 [(google.api.field_behavior) = OPTIONAL];
@@ -1109,13 +1143,16 @@ message BranchRule {
11091143
string context = 1 [(google.api.field_behavior) = REQUIRED];
11101144
}
11111145

1112-
// Optional. A unique identifier for a BranchRule. The name should be of the
1146+
// Identifier. A unique identifier for a BranchRule. The name should be of the
11131147
// format:
11141148
// `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`
1115-
string name = 1 [(google.api.field_behavior) = OPTIONAL];
1149+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
11161150

11171151
// Output only. Unique identifier of the repository.
1118-
string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
1152+
string uid = 2 [
1153+
(google.api.field_info).format = UUID4,
1154+
(google.api.field_behavior) = OUTPUT_ONLY
1155+
];
11191156

11201157
// Output only. Create timestamp.
11211158
google.protobuf.Timestamp create_time = 3
@@ -1155,6 +1192,11 @@ message BranchRule {
11551192
// be matched.
11561193
int32 minimum_approvals_count = 11 [(google.api.field_behavior) = OPTIONAL];
11571194

1195+
// Optional. Determines if code owners must approve before merging to the
1196+
// branch.
1197+
bool require_code_owner_approval = 16
1198+
[(google.api.field_behavior) = OPTIONAL];
1199+
11581200
// Optional. Determines if require comments resolved before merging to the
11591201
// branch.
11601202
bool require_comments_resolved = 12 [(google.api.field_behavior) = OPTIONAL];
@@ -1204,10 +1246,13 @@ message PullRequest {
12041246
MERGED = 3;
12051247
}
12061248

1207-
// Output only. A unique identifier for a PullRequest. The number appended at
1208-
// the end is generated by the server. Format:
1249+
// Output only. Identifier. A unique identifier for a PullRequest. The number
1250+
// appended at the end is generated by the server. Format:
12091251
// `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}`
1210-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
1252+
string name = 1 [
1253+
(google.api.field_behavior) = IDENTIFIER,
1254+
(google.api.field_behavior) = OUTPUT_ONLY
1255+
];
12111256

12121257
// Required. The pull request title.
12131258
string title = 2 [(google.api.field_behavior) = REQUIRED];
@@ -1459,18 +1504,18 @@ message ListInstancesRequest {
14591504
}
14601505
];
14611506

1462-
// Requested page size. Server may return fewer items than requested.
1463-
// If unspecified, server will pick an appropriate default.
1464-
int32 page_size = 2;
1507+
// Optional. Requested page size. Server may return fewer items than
1508+
// requested. If unspecified, server will pick an appropriate default.
1509+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
14651510

1466-
// A token identifying a page of results the server should return.
1467-
string page_token = 3;
1511+
// Optional. A token identifying a page of results the server should return.
1512+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
14681513

1469-
// Filter for filtering results.
1470-
string filter = 4;
1514+
// Optional. Filter for filtering results.
1515+
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
14711516

1472-
// Hint for how to order the results.
1473-
string order_by = 5;
1517+
// Optional. Hint for how to order the results.
1518+
string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
14741519
}
14751520

14761521
message ListInstancesResponse {
@@ -1524,7 +1569,10 @@ message CreateInstanceRequest {
15241569
//
15251570
// The request ID must be a valid UUID with the exception that zero UUID is
15261571
// not supported (00000000-0000-0000-0000-000000000000).
1527-
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1572+
string request_id = 4 [
1573+
(google.api.field_info).format = UUID4,
1574+
(google.api.field_behavior) = OPTIONAL
1575+
];
15281576
}
15291577

15301578
// DeleteInstanceRequest is the request for deleting an instance.
@@ -1550,7 +1598,13 @@ message DeleteInstanceRequest {
15501598
//
15511599
// The request ID must be a valid UUID with the exception that zero UUID is
15521600
// not supported (00000000-0000-0000-0000-000000000000).
1553-
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1601+
string request_id = 2 [
1602+
(google.api.field_info).format = UUID4,
1603+
(google.api.field_behavior) = OPTIONAL
1604+
];
1605+
1606+
// Optional. If set to true, will force the deletion of the instance.
1607+
bool force = 3 [(google.api.field_behavior) = OPTIONAL];
15541608
}
15551609

15561610
// Represents the metadata of the long-running operation.
@@ -1593,12 +1647,12 @@ message ListRepositoriesRequest {
15931647
}
15941648
];
15951649

1596-
// Optional. Requested page size. Server may return fewer items than
1597-
// requested. If unspecified, server will pick an appropriate default.
1650+
// Optional. Requested page size. If unspecified, a default size of 30 will be
1651+
// used. The maximum value is 100; values above 100 will be coerced to 100.
15981652
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
15991653

1600-
// A token identifying a page of results the server should return.
1601-
string page_token = 3;
1654+
// Optional. A token identifying a page of results the server should return.
1655+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
16021656

16031657
// Optional. Filter results.
16041658
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
@@ -1703,8 +1757,8 @@ message ListHooksRequest {
17031757
}
17041758
];
17051759

1706-
// Optional. Requested page size. Server may return fewer items than
1707-
// requested. If unspecified, server will pick an appropriate default.
1760+
// Optional. Requested page size. If unspecified, a default size of 30 will be
1761+
// used. The maximum value is 100; values above 100 will be coerced to 100.
17081762
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
17091763

17101764
// Optional. A token identifying a page of results the server should return.
@@ -1757,13 +1811,13 @@ message CreateHookRequest {
17571811

17581812
// UpdateHookRequest is the request to update a hook.
17591813
message UpdateHookRequest {
1760-
// Required. Field mask is used to specify the fields to be overwritten in the
1814+
// Optional. Field mask is used to specify the fields to be overwritten in the
17611815
// hook resource by the update.
17621816
// The fields specified in the update_mask are relative to the resource, not
17631817
// the full request. A field will be overwritten if it is in the mask.
17641818
// The special value "*" means full replacement.
17651819
google.protobuf.FieldMask update_mask = 1
1766-
[(google.api.field_behavior) = REQUIRED];
1820+
[(google.api.field_behavior) = OPTIONAL];
17671821

17681822
// Required. The hook being updated.
17691823
Hook hook = 2 [(google.api.field_behavior) = REQUIRED];
@@ -1818,8 +1872,11 @@ message ListBranchRulesRequest {
18181872
}
18191873
];
18201874

1875+
// Optional. Requested page size. If unspecified, a default size of 30 will be
1876+
// used. The maximum value is 100; values above 100 will be coerced to 100.
18211877
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
18221878

1879+
// Optional. A token identifying a page of results the server should return.
18231880
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
18241881
}
18251882

@@ -1845,13 +1902,13 @@ message UpdateBranchRuleRequest {
18451902
// actually post it. (https://google.aip.dev/163, for declarative friendly)
18461903
bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL];
18471904

1848-
// Required. Field mask is used to specify the fields to be overwritten in the
1905+
// Optional. Field mask is used to specify the fields to be overwritten in the
18491906
// branchRule resource by the update.
18501907
// The fields specified in the update_mask are relative to the resource, not
18511908
// the full request. A field will be overwritten if it is in the mask.
18521909
// The special value "*" means full replacement.
18531910
google.protobuf.FieldMask update_mask = 3
1854-
[(google.api.field_behavior) = REQUIRED];
1911+
[(google.api.field_behavior) = OPTIONAL];
18551912
}
18561913

18571914
// ListBranchRulesResponse is the response to listing branchRules.
@@ -1902,8 +1959,8 @@ message ListPullRequestsRequest {
19021959
}
19031960
];
19041961

1905-
// Optional. Requested page size. Server may return fewer items than
1906-
// requested. If unspecified, server will pick an appropriate default.
1962+
// Optional. Requested page size. If unspecified, a default size of 30 will be
1963+
// used. The maximum value is 100; values above 100 will be coerced to 100.
19071964
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
19081965

19091966
// Optional. A token identifying a page of results the server should return.
@@ -1985,8 +2042,8 @@ message ListPullRequestFileDiffsRequest {
19852042
}
19862043
];
19872044

1988-
// Optional. Requested page size. Server may return fewer items than
1989-
// requested. If unspecified, server will pick an appropriate default.
2045+
// Optional. Requested page size. If unspecified, a default size of 30 will be
2046+
// used. The maximum value is 100; values above 100 will be coerced to 100.
19902047
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
19912048

19922049
// Optional. A token identifying a page of results the server should return.
@@ -2042,8 +2099,8 @@ message ListIssuesRequest {
20422099
}
20432100
];
20442101

2045-
// Optional. Requested page size. Server may return fewer items than
2046-
// requested. If unspecified, server will pick an appropriate default.
2102+
// Optional. Requested page size. If unspecified, a default size of 30 will be
2103+
// used. The maximum value is 100; values above 100 will be coerced to 100.
20472104
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
20482105

20492106
// Optional. A token identifying a page of results the server should return.
@@ -2238,9 +2295,8 @@ message ListPullRequestCommentsRequest {
22382295
}
22392296
];
22402297

2241-
// Optional. Requested page size. If unspecified, at most 100 pull request
2242-
// comments will be returned. The maximum value is 100; values above 100 will
2243-
// be coerced to 100.
2298+
// Optional. Requested page size. If unspecified, a default size of 30 will be
2299+
// used. The maximum value is 100; values above 100 will be coerced to 100.
22442300
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
22452301

22462302
// Optional. A token identifying a page of results the server should return.
@@ -2447,8 +2503,8 @@ message ListIssueCommentsRequest {
24472503
}
24482504
];
24492505

2450-
// Optional. Requested page size. Server may return fewer items than
2451-
// requested. If unspecified, server will pick an appropriate default.
2506+
// Optional. Requested page size. If unspecified, a default size of 30 will be
2507+
// used. The maximum value is 100; values above 100 will be coerced to 100.
24522508
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
24532509

24542510
// Optional. A token identifying a page of results the server should return.

google/cloud/securesourcemanager/v1/securesourcemanager_v1.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,24 @@ documentation:
2424
description: Gets information about a location.
2525

2626
- selector: google.cloud.location.Locations.ListLocations
27-
description: Lists information about the supported locations for this service.
27+
description: |-
28+
Lists information about the supported locations for this service.
29+
30+
This method lists locations based on the resource scope provided in
31+
the [ListLocationsRequest.name] field:
32+
33+
* **Global locations**: If `name` is empty, the method lists the
34+
public locations available to all projects. * **Project-specific
35+
locations**: If `name` follows the format
36+
`projects/{project}`, the method lists locations visible to that
37+
specific project. This includes public, private, or other
38+
project-specific locations enabled for the project.
39+
40+
For gRPC and client library implementations, the resource name is
41+
passed as the `name` field. For direct service calls, the resource
42+
name is
43+
incorporated into the request path based on the specific service
44+
implementation and version.
2845
2946
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
3047
description: |-

0 commit comments

Comments
 (0)