Skip to content

Commit 14400ad

Browse files
feat: add from_service_account_info factory and fix sphinx identifiers (#46)
feat: add 'from_service_account_info' factory to clients fix: fix sphinx identifiers PiperOrigin-RevId: 350246057 Source-Author: Google APIs <[email protected]> Source-Date: Tue Jan 5 16:44:11 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 520682435235d9c503983a360a2090025aa47cd1 Source-Link: googleapis/googleapis@5206824
1 parent a395245 commit 14400ad

File tree

10 files changed

+117
-55
lines changed

10 files changed

+117
-55
lines changed

packages/google-cloud-os-login/docs/oslogin_v1/common/types.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Types for Google Cloud Oslogin Common API
33

44
.. automodule:: google.cloud.oslogin_v1.common
55
:members:
6+
:undoc-members:
67
:show-inheritance:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
OsLoginService
2+
--------------------------------
3+
4+
.. automodule:: google.cloud.oslogin_v1.services.os_login_service
5+
:members:
6+
:inherited-members:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Services for Google Cloud Oslogin v1 API
22
========================================
3+
.. toctree::
4+
:maxdepth: 2
35

4-
.. automodule:: google.cloud.oslogin_v1.services.os_login_service
5-
:members:
6-
:inherited-members:
6+
os_login_service

packages/google-cloud-os-login/docs/oslogin_v1/types.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Types for Google Cloud Oslogin v1 API
33

44
.. automodule:: google.cloud.oslogin_v1.types
55
:members:
6+
:undoc-members:
67
:show-inheritance:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class PosixAccount(proto.Message):
5959
empty value is used.
6060
account_id (str):
6161
Output only. A POSIX account identifier.
62-
operating_system_type (~.common.OperatingSystemType):
62+
operating_system_type (google.cloud.oslogin.v1.types.OperatingSystemType):
6363
The operating system type where this account
6464
applies.
6565
name (str):

packages/google-cloud-os-login/google/cloud/oslogin_v1/services/os_login_service/async_client.py

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class OsLoginServiceAsyncClient:
8787
OsLoginServiceClient.parse_common_location_path
8888
)
8989

90+
from_service_account_info = OsLoginServiceClient.from_service_account_info
9091
from_service_account_file = OsLoginServiceClient.from_service_account_file
9192
from_service_account_json = from_service_account_file
9293

@@ -163,14 +164,15 @@ async def delete_posix_account(
163164
r"""Deletes a POSIX account.
164165
165166
Args:
166-
request (:class:`~.oslogin.DeletePosixAccountRequest`):
167+
request (:class:`google.cloud.oslogin_v1.types.DeletePosixAccountRequest`):
167168
The request object. A request message for deleting a
168169
POSIX account entry.
169170
name (:class:`str`):
170171
Required. A reference to the POSIX account to update.
171172
POSIX accounts are identified by the project ID they are
172173
associated with. A reference to the POSIX account is in
173174
format ``users/{user}/projects/{project}``.
175+
174176
This corresponds to the ``name`` field
175177
on the ``request`` instance; if ``request`` is provided, this
176178
should not be set.
@@ -238,14 +240,15 @@ async def delete_ssh_public_key(
238240
r"""Deletes an SSH public key.
239241
240242
Args:
241-
request (:class:`~.oslogin.DeleteSshPublicKeyRequest`):
243+
request (:class:`google.cloud.oslogin_v1.types.DeleteSshPublicKeyRequest`):
242244
The request object. A request message for deleting an
243245
SSH public key.
244246
name (:class:`str`):
245247
Required. The fingerprint of the public key to update.
246248
Public keys are identified by their SHA-256 fingerprint.
247249
The fingerprint of the public key is in format
248250
``users/{user}/sshPublicKeys/{fingerprint}``.
251+
249252
This corresponds to the ``name`` field
250253
on the ``request`` instance; if ``request`` is provided, this
251254
should not be set.
@@ -314,12 +317,13 @@ async def get_login_profile(
314317
to a virtual machine on Google Compute Engine.
315318
316319
Args:
317-
request (:class:`~.oslogin.GetLoginProfileRequest`):
320+
request (:class:`google.cloud.oslogin_v1.types.GetLoginProfileRequest`):
318321
The request object. A request message for retrieving the
319322
login profile information for a user.
320323
name (:class:`str`):
321324
Required. The unique ID for the user in format
322325
``users/{user}``.
326+
323327
This corresponds to the ``name`` field
324328
on the ``request`` instance; if ``request`` is provided, this
325329
should not be set.
@@ -331,7 +335,7 @@ async def get_login_profile(
331335
sent along with the request as metadata.
332336
333337
Returns:
334-
~.oslogin.LoginProfile:
338+
google.cloud.oslogin_v1.types.LoginProfile:
335339
The user profile information used for
336340
logging in to a virtual machine on
337341
Google Compute Engine.
@@ -395,14 +399,15 @@ async def get_ssh_public_key(
395399
r"""Retrieves an SSH public key.
396400
397401
Args:
398-
request (:class:`~.oslogin.GetSshPublicKeyRequest`):
402+
request (:class:`google.cloud.oslogin_v1.types.GetSshPublicKeyRequest`):
399403
The request object. A request message for retrieving an
400404
SSH public key.
401405
name (:class:`str`):
402406
Required. The fingerprint of the public key to retrieve.
403407
Public keys are identified by their SHA-256 fingerprint.
404408
The fingerprint of the public key is in format
405409
``users/{user}/sshPublicKeys/{fingerprint}``.
410+
406411
This corresponds to the ``name`` field
407412
on the ``request`` instance; if ``request`` is provided, this
408413
should not be set.
@@ -414,7 +419,7 @@ async def get_ssh_public_key(
414419
sent along with the request as metadata.
415420
416421
Returns:
417-
~.common.SshPublicKey:
422+
google.cloud.oslogin.v1.common_pb2.SshPublicKey:
418423
The SSH public key information
419424
associated with a Google account.
420425
@@ -482,24 +487,27 @@ async def import_ssh_public_key(
482487
profile.
483488
484489
Args:
485-
request (:class:`~.oslogin.ImportSshPublicKeyRequest`):
490+
request (:class:`google.cloud.oslogin_v1.types.ImportSshPublicKeyRequest`):
486491
The request object. A request message for importing an
487492
SSH public key.
488493
parent (:class:`str`):
489494
Required. The unique ID for the user in format
490495
``users/{user}``.
496+
491497
This corresponds to the ``parent`` field
492498
on the ``request`` instance; if ``request`` is provided, this
493499
should not be set.
494-
ssh_public_key (:class:`~.common.SshPublicKey`):
500+
ssh_public_key (:class:`google.cloud.oslogin.v1.common_pb2.SshPublicKey`):
495501
Optional. The SSH public key and
496502
expiration time.
503+
497504
This corresponds to the ``ssh_public_key`` field
498505
on the ``request`` instance; if ``request`` is provided, this
499506
should not be set.
500507
project_id (:class:`str`):
501508
The project ID of the Google Cloud
502509
Platform project.
510+
503511
This corresponds to the ``project_id`` field
504512
on the ``request`` instance; if ``request`` is provided, this
505513
should not be set.
@@ -511,7 +519,7 @@ async def import_ssh_public_key(
511519
sent along with the request as metadata.
512520
513521
Returns:
514-
~.oslogin.ImportSshPublicKeyResponse:
522+
google.cloud.oslogin_v1.types.ImportSshPublicKeyResponse:
515523
A response message for importing an
516524
SSH public key.
517525
@@ -581,26 +589,29 @@ async def update_ssh_public_key(
581589
information. This method supports patch semantics.
582590
583591
Args:
584-
request (:class:`~.oslogin.UpdateSshPublicKeyRequest`):
592+
request (:class:`google.cloud.oslogin_v1.types.UpdateSshPublicKeyRequest`):
585593
The request object. A request message for updating an
586594
SSH public key.
587595
name (:class:`str`):
588596
Required. The fingerprint of the public key to update.
589597
Public keys are identified by their SHA-256 fingerprint.
590598
The fingerprint of the public key is in format
591599
``users/{user}/sshPublicKeys/{fingerprint}``.
600+
592601
This corresponds to the ``name`` field
593602
on the ``request`` instance; if ``request`` is provided, this
594603
should not be set.
595-
ssh_public_key (:class:`~.common.SshPublicKey`):
604+
ssh_public_key (:class:`google.cloud.oslogin.v1.common_pb2.SshPublicKey`):
596605
Required. The SSH public key and
597606
expiration time.
607+
598608
This corresponds to the ``ssh_public_key`` field
599609
on the ``request`` instance; if ``request`` is provided, this
600610
should not be set.
601-
update_mask (:class:`~.field_mask.FieldMask`):
611+
update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`):
602612
Mask to control which fields get
603613
updated. Updates all if not present.
614+
604615
This corresponds to the ``update_mask`` field
605616
on the ``request`` instance; if ``request`` is provided, this
606617
should not be set.
@@ -612,7 +623,7 @@ async def update_ssh_public_key(
612623
sent along with the request as metadata.
613624
614625
Returns:
615-
~.common.SshPublicKey:
626+
google.cloud.oslogin.v1.common_pb2.SshPublicKey:
616627
The SSH public key information
617628
associated with a Google account.
618629

0 commit comments

Comments
 (0)