Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ class Repository(proto.Message):
Optional. The name of the instance in which the repository
is hosted, formatted as
``projects/{project_number}/locations/{location_id}/instances/{instance_id}``
For data plane CreateRepository requests, this field is
output only. For control plane CreateRepository requests,
this field is used as input.
When creating repository via
securesourcemanager.googleapis.com (Control Plane API), this
field is used as input. When creating repository via
\*.sourcemanager.dev (Data Plane API), this field is output
only.
uid (str):
Output only. Unique identifier of the
repository.
Expand Down Expand Up @@ -833,6 +835,15 @@ class ListRepositoriesRequest(proto.Message):
server should return.
filter (str):
Optional. Filter results.
instance (str):
Optional. The name of the instance in which the repository
is hosted, formatted as
``projects/{project_number}/locations/{location_id}/instances/{instance_id}``.
When listing repositories via
securesourcemanager.googleapis.com (Control Plane API), this
field is required. When listing repositories via
\*.sourcemanager.dev (Data Plane API), this field is
ignored.
"""

parent: str = proto.Field(
Expand All @@ -851,6 +862,10 @@ class ListRepositoriesRequest(proto.Message):
proto.STRING,
number=4,
)
instance: str = proto.Field(
proto.STRING,
number=5,
)


class ListRepositoriesResponse(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class securesourcemanagerCallTransformer(cst.CSTTransformer):
'get_instance': ('name', ),
'get_repository': ('name', ),
'list_instances': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_repositories': ('parent', 'page_size', 'page_token', 'filter', ),
'list_repositories': ('parent', 'page_size', 'page_token', 'filter', 'instance', ),
'set_iam_policy_repo': ('resource', 'policy', 'update_mask', ),
'test_iam_permissions_repo': ('resource', 'permissions', ),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2831,6 +2831,7 @@ def test_list_repositories_non_empty_request_with_auto_populated_field():
parent="parent_value",
page_token="page_token_value",
filter="filter_value",
instance="instance_value",
)

# Mock the actual call within the gRPC stub, and fake the request.
Expand All @@ -2847,6 +2848,7 @@ def test_list_repositories_non_empty_request_with_auto_populated_field():
parent="parent_value",
page_token="page_token_value",
filter="filter_value",
instance="instance_value",
)


Expand Down Expand Up @@ -6351,6 +6353,7 @@ def test_list_repositories_rest_required_fields(
assert not set(unset_fields) - set(
(
"filter",
"instance",
"page_size",
"page_token",
)
Expand Down Expand Up @@ -6414,6 +6417,7 @@ def test_list_repositories_rest_unset_required_fields():
set(
(
"filter",
"instance",
"pageSize",
"pageToken",
)
Expand Down