Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d30f83d

Browse files
feat: [google-cloud-os-login] added field ImportSshPublicKeyRequest.regions (#12168)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 596735856 Source-Link: googleapis/googleapis@87e7305 Source-Link: googleapis/googleapis-gen@114ca4d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9zLWxvZ2luLy5Pd2xCb3QueWFtbCIsImgiOiIxMTRjYTRkMzc2ZTg0NTMzMTUwMDg4ZGY4YWM4NmUwOTgyNDFlOTY2In0= BEGIN_NESTED_COMMIT feat: [google-cloud-os-login] add regions field to ImportSshPublicKeyRequest PiperOrigin-RevId: 596667704 Source-Link: googleapis/googleapis@c340584 Source-Link: googleapis/googleapis-gen@53aa884 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9zLWxvZ2luLy5Pd2xCb3QueWFtbCIsImgiOiI1M2FhODg0MTY3NTcxMDQ0NTAxZDA3NDIyMGU2M2FiY2Q5OGM2YWMxIn0= END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 335ea12 commit d30f83d

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

packages/google-cloud-os-login/google/cloud/oslogin/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.12.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-os-login/google/cloud/oslogin_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.12.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-os-login/google/cloud/oslogin_v1/types/oslogin.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ class ImportSshPublicKeyRequest(proto.Message):
187187
project_id (str):
188188
The project ID of the Google Cloud Platform
189189
project.
190+
regions (MutableSequence[str]):
191+
Optional. The regions to which to assert that
192+
the key was written. If unspecified, defaults to
193+
all regions. Regions are listed at
194+
https://cloud.google.com/about/locations#region.
190195
"""
191196

192197
parent: str = proto.Field(
@@ -202,6 +207,10 @@ class ImportSshPublicKeyRequest(proto.Message):
202207
proto.STRING,
203208
number=3,
204209
)
210+
regions: MutableSequence[str] = proto.RepeatedField(
211+
proto.STRING,
212+
number=5,
213+
)
205214

206215

207216
class ImportSshPublicKeyResponse(proto.Message):

packages/google-cloud-os-login/samples/generated_samples/snippet_metadata_google.cloud.oslogin.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-os-login",
11-
"version": "2.12.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-os-login/scripts/fixup_oslogin_v1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class osloginCallTransformer(cst.CSTTransformer):
4444
'delete_ssh_public_key': ('name', ),
4545
'get_login_profile': ('name', 'project_id', 'system_id', ),
4646
'get_ssh_public_key': ('name', ),
47-
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', ),
47+
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', 'regions', ),
4848
'update_ssh_public_key': ('name', 'ssh_public_key', 'update_mask', ),
4949
}
5050

packages/google-cloud-os-login/tests/unit/gapic/oslogin_v1/test_os_login_service.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,7 +4039,12 @@ def test_import_ssh_public_key_rest_required_fields(
40394039
credentials=ga_credentials.AnonymousCredentials()
40404040
).import_ssh_public_key._get_unset_required_fields(jsonified_request)
40414041
# Check that path parameters and body parameters are not mixing in.
4042-
assert not set(unset_fields) - set(("project_id",))
4042+
assert not set(unset_fields) - set(
4043+
(
4044+
"project_id",
4045+
"regions",
4046+
)
4047+
)
40434048
jsonified_request.update(unset_fields)
40444049

40454050
# verify required fields with non-default values are left alone
@@ -4094,7 +4099,15 @@ def test_import_ssh_public_key_rest_unset_required_fields():
40944099
)
40954100

40964101
unset_fields = transport.import_ssh_public_key._get_unset_required_fields({})
4097-
assert set(unset_fields) == (set(("projectId",)) & set(("parent",)))
4102+
assert set(unset_fields) == (
4103+
set(
4104+
(
4105+
"projectId",
4106+
"regions",
4107+
)
4108+
)
4109+
& set(("parent",))
4110+
)
40984111

40994112

41004113
@pytest.mark.parametrize("null_interceptor", [True, False])

0 commit comments

Comments
 (0)