Skip to content

Commit 73a929a

Browse files
committed
update
2 parents f731cc5 + 4beb488 commit 73a929a

13 files changed

+59
-40
lines changed

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"lasted": "1.0.76",
3-
"meta_commit": "c4d97da0a28535a1afbeee9aad571519f8fbd07f"
4-
}
3+
"meta_commit": "56b1982053425dd43b77d9e3c616bbe5c4c66a3c"
4+
}

volcenginesdkstorageebs/models/attach_volume_request.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,8 @@ def __init__(self, delete_with_instance=None, instance_id=None, volume_id=None,
5757

5858
if delete_with_instance is not None:
5959
self.delete_with_instance = delete_with_instance
60-
if instance_id is not None:
61-
self.instance_id = instance_id
62-
if volume_id is not None:
63-
self.volume_id = volume_id
60+
self.instance_id = instance_id
61+
self.volume_id = volume_id
6462

6563
@property
6664
def delete_with_instance(self):
@@ -101,6 +99,8 @@ def instance_id(self, instance_id):
10199
:param instance_id: The instance_id of this AttachVolumeRequest. # noqa: E501
102100
:type: str
103101
"""
102+
if self._configuration.client_side_validation and instance_id is None:
103+
raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501
104104

105105
self._instance_id = instance_id
106106

@@ -122,6 +122,8 @@ def volume_id(self, volume_id):
122122
:param volume_id: The volume_id of this AttachVolumeRequest. # noqa: E501
123123
:type: str
124124
"""
125+
if self._configuration.client_side_validation and volume_id is None:
126+
raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501
125127

126128
self._volume_id = volume_id
127129

volcenginesdkstorageebs/models/create_auto_snapshot_policy_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ def __init__(self, auto_snapshot_policy_name=None, project_name=None, repeat_day
7171
self.repeat_days = repeat_days
7272
if repeat_weekdays is not None:
7373
self.repeat_weekdays = repeat_weekdays
74-
if retention_days is not None:
75-
self.retention_days = retention_days
74+
self.retention_days = retention_days
7675
if time_points is not None:
7776
self.time_points = time_points
7877

@@ -180,6 +179,8 @@ def retention_days(self, retention_days):
180179
:param retention_days: The retention_days of this CreateAutoSnapshotPolicyRequest. # noqa: E501
181180
:type: int
182181
"""
182+
if self._configuration.client_side_validation and retention_days is None:
183+
raise ValueError("Invalid value for `retention_days`, must not be `None`") # noqa: E501
183184

184185
self._retention_days = retention_days
185186

volcenginesdkstorageebs/models/create_tags_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ def __init__(self, resource_ids=None, resource_type=None, tags=None, _configurat
5757

5858
if resource_ids is not None:
5959
self.resource_ids = resource_ids
60-
if resource_type is not None:
61-
self.resource_type = resource_type
60+
self.resource_type = resource_type
6261
if tags is not None:
6362
self.tags = tags
6463

@@ -101,6 +100,8 @@ def resource_type(self, resource_type):
101100
:param resource_type: The resource_type of this CreateTagsRequest. # noqa: E501
102101
:type: str
103102
"""
103+
if self._configuration.client_side_validation and resource_type is None:
104+
raise ValueError("Invalid value for `resource_type`, must not be `None`") # noqa: E501
104105

105106
self._resource_type = resource_type
106107

volcenginesdkstorageebs/models/create_volume_request.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,15 @@ def __init__(self, client_token=None, description=None, instance_id=None, kind=N
9292
self.kind = kind
9393
if project_name is not None:
9494
self.project_name = project_name
95-
if size is not None:
96-
self.size = size
95+
self.size = size
9796
if snapshot_id is not None:
9897
self.snapshot_id = snapshot_id
9998
if tags is not None:
10099
self.tags = tags
101100
if volume_charge_type is not None:
102101
self.volume_charge_type = volume_charge_type
103-
if volume_name is not None:
104-
self.volume_name = volume_name
105-
if volume_type is not None:
106-
self.volume_type = volume_type
102+
self.volume_name = volume_name
103+
self.volume_type = volume_type
107104
if zone_id is not None:
108105
self.zone_id = zone_id
109106

@@ -230,6 +227,8 @@ def size(self, size):
230227
:param size: The size of this CreateVolumeRequest. # noqa: E501
231228
:type: str
232229
"""
230+
if self._configuration.client_side_validation and size is None:
231+
raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
233232

234233
self._size = size
235234

@@ -314,6 +313,8 @@ def volume_name(self, volume_name):
314313
:param volume_name: The volume_name of this CreateVolumeRequest. # noqa: E501
315314
:type: str
316315
"""
316+
if self._configuration.client_side_validation and volume_name is None:
317+
raise ValueError("Invalid value for `volume_name`, must not be `None`") # noqa: E501
317318

318319
self._volume_name = volume_name
319320

@@ -335,6 +336,8 @@ def volume_type(self, volume_type):
335336
:param volume_type: The volume_type of this CreateVolumeRequest. # noqa: E501
336337
:type: str
337338
"""
339+
if self._configuration.client_side_validation and volume_type is None:
340+
raise ValueError("Invalid value for `volume_type`, must not be `None`") # noqa: E501
338341

339342
self._volume_type = volume_type
340343

volcenginesdkstorageebs/models/delete_tags_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ def __init__(self, resource_ids=None, resource_type=None, tag_keys=None, _config
5757

5858
if resource_ids is not None:
5959
self.resource_ids = resource_ids
60-
if resource_type is not None:
61-
self.resource_type = resource_type
60+
self.resource_type = resource_type
6261
if tag_keys is not None:
6362
self.tag_keys = tag_keys
6463

@@ -101,6 +100,8 @@ def resource_type(self, resource_type):
101100
:param resource_type: The resource_type of this DeleteTagsRequest. # noqa: E501
102101
:type: str
103102
"""
103+
if self._configuration.client_side_validation and resource_type is None:
104+
raise ValueError("Invalid value for `resource_type`, must not be `None`") # noqa: E501
104105

105106
self._resource_type = resource_type
106107

volcenginesdkstorageebs/models/delete_volume_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ def __init__(self, client_token=None, volume_id=None, _configuration=None): # n
5454

5555
if client_token is not None:
5656
self.client_token = client_token
57-
if volume_id is not None:
58-
self.volume_id = volume_id
57+
self.volume_id = volume_id
5958

6059
@property
6160
def client_token(self):
@@ -96,6 +95,8 @@ def volume_id(self, volume_id):
9695
:param volume_id: The volume_id of this DeleteVolumeRequest. # noqa: E501
9796
:type: str
9897
"""
98+
if self._configuration.client_side_validation and volume_id is None:
99+
raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501
99100

100101
self._volume_id = volume_id
101102

volcenginesdkstorageebs/models/describe_tags_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def __init__(self, page_number=None, page_size=None, resource_ids=None, resource
7070
self.page_size = page_size
7171
if resource_ids is not None:
7272
self.resource_ids = resource_ids
73-
if resource_type is not None:
74-
self.resource_type = resource_type
73+
self.resource_type = resource_type
7574
if sys_tag_visible is not None:
7675
self.sys_tag_visible = sys_tag_visible
7776
if tag_filters is not None:
@@ -158,6 +157,8 @@ def resource_type(self, resource_type):
158157
:param resource_type: The resource_type of this DescribeTagsRequest. # noqa: E501
159158
:type: str
160159
"""
160+
if self._configuration.client_side_validation and resource_type is None:
161+
raise ValueError("Invalid value for `resource_type`, must not be `None`") # noqa: E501
161162

162163
self._resource_type = resource_type
163164

volcenginesdkstorageebs/models/detach_volume_request.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ def __init__(self, instance_id=None, volume_id=None, _configuration=None): # no
5252
self._volume_id = None
5353
self.discriminator = None
5454

55-
if instance_id is not None:
56-
self.instance_id = instance_id
57-
if volume_id is not None:
58-
self.volume_id = volume_id
55+
self.instance_id = instance_id
56+
self.volume_id = volume_id
5957

6058
@property
6159
def instance_id(self):
@@ -75,6 +73,8 @@ def instance_id(self, instance_id):
7573
:param instance_id: The instance_id of this DetachVolumeRequest. # noqa: E501
7674
:type: str
7775
"""
76+
if self._configuration.client_side_validation and instance_id is None:
77+
raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501
7878

7979
self._instance_id = instance_id
8080

@@ -96,6 +96,8 @@ def volume_id(self, volume_id):
9696
:param volume_id: The volume_id of this DetachVolumeRequest. # noqa: E501
9797
:type: str
9898
"""
99+
if self._configuration.client_side_validation and volume_id is None:
100+
raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501
99101

100102
self._volume_id = volume_id
101103

volcenginesdkstorageebs/models/extend_volume_request.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,8 @@ def __init__(self, client_token=None, new_size=None, volume_id=None, _configurat
5757

5858
if client_token is not None:
5959
self.client_token = client_token
60-
if new_size is not None:
61-
self.new_size = new_size
62-
if volume_id is not None:
63-
self.volume_id = volume_id
60+
self.new_size = new_size
61+
self.volume_id = volume_id
6462

6563
@property
6664
def client_token(self):
@@ -101,6 +99,8 @@ def new_size(self, new_size):
10199
:param new_size: The new_size of this ExtendVolumeRequest. # noqa: E501
102100
:type: str
103101
"""
102+
if self._configuration.client_side_validation and new_size is None:
103+
raise ValueError("Invalid value for `new_size`, must not be `None`") # noqa: E501
104104

105105
self._new_size = new_size
106106

@@ -122,6 +122,8 @@ def volume_id(self, volume_id):
122122
:param volume_id: The volume_id of this ExtendVolumeRequest. # noqa: E501
123123
:type: str
124124
"""
125+
if self._configuration.client_side_validation and volume_id is None:
126+
raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501
125127

126128
self._volume_id = volume_id
127129

0 commit comments

Comments
 (0)