This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
/
common.py
121 lines (92 loc) · 3.44 KB
/
common.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
__protobuf__ = proto.module(
package="google.cloud.oslogin.v1",
manifest={"OperatingSystemType", "PosixAccount", "SshPublicKey",},
)
class OperatingSystemType(proto.Enum):
r"""The operating system options for account entries."""
OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0
LINUX = 1
WINDOWS = 2
class PosixAccount(proto.Message):
r"""The POSIX account information associated with a Google
account.
Attributes:
primary (bool):
Only one POSIX account can be marked as
primary.
username (str):
The username of the POSIX account.
uid (int):
The user ID.
gid (int):
The default group ID.
home_directory (str):
The path to the home directory for this
account.
shell (str):
The path to the logic shell for this account.
gecos (str):
The GECOS (user information) entry for this
account.
system_id (str):
System identifier for which account the
username or uid applies to. By default, the
empty value is used.
account_id (str):
Output only. A POSIX account identifier.
operating_system_type (google.cloud.oslogin.v1.types.OperatingSystemType):
The operating system type where this account
applies.
name (str):
Output only. The canonical resource name.
"""
primary = proto.Field(proto.BOOL, number=1)
username = proto.Field(proto.STRING, number=2)
uid = proto.Field(proto.INT64, number=3)
gid = proto.Field(proto.INT64, number=4)
home_directory = proto.Field(proto.STRING, number=5)
shell = proto.Field(proto.STRING, number=6)
gecos = proto.Field(proto.STRING, number=7)
system_id = proto.Field(proto.STRING, number=8)
account_id = proto.Field(proto.STRING, number=9)
operating_system_type = proto.Field(
proto.ENUM, number=10, enum="OperatingSystemType",
)
name = proto.Field(proto.STRING, number=11)
class SshPublicKey(proto.Message):
r"""The SSH public key information associated with a Google
account.
Attributes:
key (str):
Public key text in SSH format, defined by RFC4253 section
6.6.
expiration_time_usec (int):
An expiration time in microseconds since
epoch.
fingerprint (str):
Output only. The SHA-256 fingerprint of the
SSH public key.
name (str):
Output only. The canonical resource name.
"""
key = proto.Field(proto.STRING, number=1)
expiration_time_usec = proto.Field(proto.INT64, number=2)
fingerprint = proto.Field(proto.STRING, number=3)
name = proto.Field(proto.STRING, number=4)
__all__ = tuple(sorted(__protobuf__.manifest))