Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit cef37bd

Browse files
docs: Add documentation for enums (#78)
* docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: googleapis/googleapis@a391fd1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1f69e6b commit cef37bd

File tree

7 files changed

+141
-13
lines changed

7 files changed

+141
-13
lines changed

google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,7 +2864,7 @@ def sample_update_nfs_share():
28642864
# Done; return the response.
28652865
return response
28662866

2867-
def __enter__(self):
2867+
def __enter__(self) -> "BareMetalSolutionClient":
28682868
return self
28692869

28702870
def __exit__(self, type, value, traceback):

google/cloud/bare_metal_solution_v2/types/instance.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,18 @@ class Instance(proto.Message):
103103
"""
104104

105105
class State(proto.Enum):
106-
r"""The possible states for this server."""
106+
r"""The possible states for this server.
107+
108+
Values:
109+
STATE_UNSPECIFIED (0):
110+
The server is in an unknown state.
111+
PROVISIONING (1):
112+
The server is being provisioned.
113+
RUNNING (2):
114+
The server is running.
115+
DELETED (3):
116+
The server has been deleted.
117+
"""
107118
STATE_UNSPECIFIED = 0
108119
PROVISIONING = 1
109120
RUNNING = 2
@@ -385,7 +396,16 @@ class LogicalInterface(proto.Message):
385396
"""
386397

387398
class InterfaceType(proto.Enum):
388-
r"""Interface type."""
399+
r"""Interface type.
400+
401+
Values:
402+
INTERFACE_TYPE_UNSPECIFIED (0):
403+
Unspecified value.
404+
BOND (1):
405+
Bond interface type.
406+
NIC (2):
407+
NIC interface type.
408+
"""
389409
INTERFACE_TYPE_UNSPECIFIED = 0
390410
BOND = 1
391411
NIC = 2

google/cloud/bare_metal_solution_v2/types/lun.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,20 @@ class Lun(proto.Message):
5959
"""
6060

6161
class State(proto.Enum):
62-
r"""The possible states for the LUN."""
62+
r"""The possible states for the LUN.
63+
64+
Values:
65+
STATE_UNSPECIFIED (0):
66+
The LUN is in an unknown state.
67+
CREATING (1):
68+
The LUN is being created.
69+
UPDATING (2):
70+
The LUN is being updated.
71+
READY (3):
72+
The LUN is ready for use.
73+
DELETING (4):
74+
The LUN has been requested to be deleted.
75+
"""
6376
STATE_UNSPECIFIED = 0
6477
CREATING = 1
6578
UPDATING = 2
@@ -69,12 +82,27 @@ class State(proto.Enum):
6982
class MultiprotocolType(proto.Enum):
7083
r"""Display the operating systems present for the LUN
7184
multiprotocol type.
85+
86+
Values:
87+
MULTIPROTOCOL_TYPE_UNSPECIFIED (0):
88+
Server has no OS specified.
89+
LINUX (1):
90+
Server with Linux OS.
7291
"""
7392
MULTIPROTOCOL_TYPE_UNSPECIFIED = 0
7493
LINUX = 1
7594

7695
class StorageType(proto.Enum):
77-
r"""The storage types for a LUN."""
96+
r"""The storage types for a LUN.
97+
98+
Values:
99+
STORAGE_TYPE_UNSPECIFIED (0):
100+
The storage type for this LUN is unknown.
101+
SSD (1):
102+
This storage type for this LUN is SSD.
103+
HDD (2):
104+
This storage type for this LUN is HDD.
105+
"""
78106
STORAGE_TYPE_UNSPECIFIED = 0
79107
SSD = 1
80108
HDD = 2

google/cloud/bare_metal_solution_v2/types/network.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,33 @@ class Network(proto.Message):
7575
"""
7676

7777
class Type(proto.Enum):
78-
r"""Network type."""
78+
r"""Network type.
79+
80+
Values:
81+
TYPE_UNSPECIFIED (0):
82+
Unspecified value.
83+
CLIENT (1):
84+
Client network, a network peered to a Google
85+
Cloud VPC.
86+
PRIVATE (2):
87+
Private network, a network local to the Bare
88+
Metal Solution environment.
89+
"""
7990
TYPE_UNSPECIFIED = 0
8091
CLIENT = 1
8192
PRIVATE = 2
8293

8394
class State(proto.Enum):
84-
r"""The possible states for this Network."""
95+
r"""The possible states for this Network.
96+
97+
Values:
98+
STATE_UNSPECIFIED (0):
99+
The Network is in an unknown state.
100+
PROVISIONING (1):
101+
The Network is provisioning.
102+
PROVISIONED (2):
103+
The Network has been provisioned.
104+
"""
85105
STATE_UNSPECIFIED = 0
86106
PROVISIONING = 1
87107
PROVISIONED = 2
@@ -188,7 +208,16 @@ class VRF(proto.Message):
188208
"""
189209

190210
class State(proto.Enum):
191-
r"""The possible states for this VRF."""
211+
r"""The possible states for this VRF.
212+
213+
Values:
214+
STATE_UNSPECIFIED (0):
215+
The unspecified state.
216+
PROVISIONING (1):
217+
The vrf is provisioning.
218+
PROVISIONED (2):
219+
The vrf is provisioned.
220+
"""
192221
STATE_UNSPECIFIED = 0
193222
PROVISIONING = 1
194223
PROVISIONED = 2

google/cloud/bare_metal_solution_v2/types/nfs_share.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,30 @@ class NfsShare(proto.Message):
5050
"""
5151

5252
class State(proto.Enum):
53-
r"""The possible states for this NFS share."""
53+
r"""The possible states for this NFS share.
54+
55+
Values:
56+
STATE_UNSPECIFIED (0):
57+
The share is in an unknown state.
58+
PROVISIONED (1):
59+
The share has been provisioned.
60+
"""
5461
STATE_UNSPECIFIED = 0
5562
PROVISIONED = 1
5663

5764
class MountPermissions(proto.Enum):
58-
r"""The possible mount permissions."""
65+
r"""The possible mount permissions.
66+
67+
Values:
68+
MOUNT_PERMISSIONS_UNSPECIFIED (0):
69+
Permissions were not specified.
70+
READ (1):
71+
NFS share can be mount with read-only
72+
permissions.
73+
READ_WRITE (2):
74+
NFS share can be mount with read-write
75+
permissions.
76+
"""
5977
MOUNT_PERMISSIONS_UNSPECIFIED = 0
6078
READ = 1
6179
READ_WRITE = 2

google/cloud/bare_metal_solution_v2/types/volume.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,34 @@ class Volume(proto.Message):
8181
"""
8282

8383
class StorageType(proto.Enum):
84-
r"""The storage type for a volume."""
84+
r"""The storage type for a volume.
85+
86+
Values:
87+
STORAGE_TYPE_UNSPECIFIED (0):
88+
The storage type for this volume is unknown.
89+
SSD (1):
90+
The storage type for this volume is SSD.
91+
HDD (2):
92+
This storage type for this volume is HDD.
93+
"""
8594
STORAGE_TYPE_UNSPECIFIED = 0
8695
SSD = 1
8796
HDD = 2
8897

8998
class State(proto.Enum):
90-
r"""The possible states for a storage volume."""
99+
r"""The possible states for a storage volume.
100+
101+
Values:
102+
STATE_UNSPECIFIED (0):
103+
The storage volume is in an unknown state.
104+
CREATING (1):
105+
The storage volume is being created.
106+
READY (2):
107+
The storage volume is ready for use.
108+
DELETING (3):
109+
The storage volume has been requested to be
110+
deleted.
111+
"""
91112
STATE_UNSPECIFIED = 0
92113
CREATING = 1
93114
READY = 2
@@ -96,6 +117,18 @@ class State(proto.Enum):
96117
class SnapshotAutoDeleteBehavior(proto.Enum):
97118
r"""The kinds of auto delete behavior to use when snapshot
98119
reserved space is full.
120+
121+
Values:
122+
SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED (0):
123+
The unspecified behavior.
124+
DISABLED (1):
125+
Don't delete any snapshots. This disables new
126+
snapshot creation, as long as the snapshot
127+
reserved space is full.
128+
OLDEST_FIRST (2):
129+
Delete the oldest snapshots first.
130+
NEWEST_FIRST (3):
131+
Delete the newest snapshots first.
99132
"""
100133
SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0
101134
DISABLED = 1

samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.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-bare-metal-solution",
11-
"version": "1.3.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)