Skip to content

Commit c1a00e0

Browse files
committed
feat: update ecs
1 parent ae24173 commit c1a00e0

8 files changed

+31
-21
lines changed

volcenginesdkecs/models/create_deployment_set_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ def __init__(self, client_token=None, deployment_set_name=None, description=None
6363

6464
if client_token is not None:
6565
self.client_token = client_token
66-
if deployment_set_name is not None:
67-
self.deployment_set_name = deployment_set_name
66+
self.deployment_set_name = deployment_set_name
6867
if description is not None:
6968
self.description = description
7069
if granularity is not None:
@@ -111,6 +110,8 @@ def deployment_set_name(self, deployment_set_name):
111110
:param deployment_set_name: The deployment_set_name of this CreateDeploymentSetRequest. # noqa: E501
112111
:type: str
113112
"""
113+
if self._configuration.client_side_validation and deployment_set_name is None:
114+
raise ValueError("Invalid value for `deployment_set_name`, must not be `None`") # noqa: E501
114115

115116
self._deployment_set_name = deployment_set_name
116117

volcenginesdkecs/models/create_key_pair_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ def __init__(self, client_token=None, description=None, key_pair_name=None, proj
6262
self.client_token = client_token
6363
if description is not None:
6464
self.description = description
65-
if key_pair_name is not None:
66-
self.key_pair_name = key_pair_name
65+
self.key_pair_name = key_pair_name
6766
if project_name is not None:
6867
self.project_name = project_name
6968

@@ -127,6 +126,8 @@ def key_pair_name(self, key_pair_name):
127126
:param key_pair_name: The key_pair_name of this CreateKeyPairRequest. # noqa: E501
128127
:type: str
129128
"""
129+
if self._configuration.client_side_validation and key_pair_name is None:
130+
raise ValueError("Invalid value for `key_pair_name`, must not be `None`") # noqa: E501
130131

131132
self._key_pair_name = key_pair_name
132133

volcenginesdkecs/models/delete_deployment_set_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, deployment_set_id=None, _configuration=Non
5454

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

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

100101
self._deployment_set_id = deployment_set_id
101102

volcenginesdkecs/models/import_key_pair_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ def __init__(self, client_token=None, description=None, key_pair_name=None, proj
6565
self.client_token = client_token
6666
if description is not None:
6767
self.description = description
68-
if key_pair_name is not None:
69-
self.key_pair_name = key_pair_name
68+
self.key_pair_name = key_pair_name
7069
if project_name is not None:
7170
self.project_name = project_name
7271
if public_key is not None:
@@ -132,6 +131,8 @@ def key_pair_name(self, key_pair_name):
132131
:param key_pair_name: The key_pair_name of this ImportKeyPairRequest. # noqa: E501
133132
:type: str
134133
"""
134+
if self._configuration.client_side_validation and key_pair_name is None:
135+
raise ValueError("Invalid value for `key_pair_name`, must not be `None`") # noqa: E501
135136

136137
self._key_pair_name = key_pair_name
137138

volcenginesdkecs/models/network_interface_for_run_instances_input.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ def __init__(self, primary_ip_address=None, security_group_ids=None, subnet_id=N
5959
self.primary_ip_address = primary_ip_address
6060
if security_group_ids is not None:
6161
self.security_group_ids = security_group_ids
62-
if subnet_id is not None:
63-
self.subnet_id = subnet_id
62+
self.subnet_id = subnet_id
6463

6564
@property
6665
def primary_ip_address(self):
@@ -122,6 +121,8 @@ def subnet_id(self, subnet_id):
122121
:param subnet_id: The subnet_id of this NetworkInterfaceForRunInstancesInput. # noqa: E501
123122
:type: str
124123
"""
124+
if self._configuration.client_side_validation and subnet_id is None:
125+
raise ValueError("Invalid value for `subnet_id`, must not be `None`") # noqa: E501
125126

126127
self._subnet_id = subnet_id
127128

volcenginesdkecs/models/run_instances_request.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,12 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
164164
self.hostname = hostname
165165
if hpc_cluster_id is not None:
166166
self.hpc_cluster_id = hpc_cluster_id
167-
if image_id is not None:
168-
self.image_id = image_id
167+
self.image_id = image_id
169168
if instance_charge_type is not None:
170169
self.instance_charge_type = instance_charge_type
171170
if instance_name is not None:
172171
self.instance_name = instance_name
173-
if instance_type is not None:
174-
self.instance_type = instance_type
172+
self.instance_type = instance_type
175173
if instance_type_id is not None:
176174
self.instance_type_id = instance_type_id
177175
if keep_image_credential is not None:
@@ -204,8 +202,7 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
204202
self.user_data = user_data
205203
if volumes is not None:
206204
self.volumes = volumes
207-
if zone_id is not None:
208-
self.zone_id = zone_id
205+
self.zone_id = zone_id
209206

210207
@property
211208
def auto_renew(self):
@@ -458,6 +455,8 @@ def image_id(self, image_id):
458455
:param image_id: The image_id of this RunInstancesRequest. # noqa: E501
459456
:type: str
460457
"""
458+
if self._configuration.client_side_validation and image_id is None:
459+
raise ValueError("Invalid value for `image_id`, must not be `None`") # noqa: E501
461460

462461
self._image_id = image_id
463462

@@ -521,6 +520,8 @@ def instance_type(self, instance_type):
521520
:param instance_type: The instance_type of this RunInstancesRequest. # noqa: E501
522521
:type: str
523522
"""
523+
if self._configuration.client_side_validation and instance_type is None:
524+
raise ValueError("Invalid value for `instance_type`, must not be `None`") # noqa: E501
524525

525526
self._instance_type = instance_type
526527

@@ -878,6 +879,8 @@ def zone_id(self, zone_id):
878879
:param zone_id: The zone_id of this RunInstancesRequest. # noqa: E501
879880
:type: str
880881
"""
882+
if self._configuration.client_side_validation and zone_id is None:
883+
raise ValueError("Invalid value for `zone_id`, must not be `None`") # noqa: E501
881884

882885
self._zone_id = zone_id
883886

volcenginesdkecs/models/system_event_for_describe_system_events_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def type(self, type):
264264
:param type: The type of this SystemEventForDescribeSystemEventsOutput. # noqa: E501
265265
:type: str
266266
"""
267-
allowed_values = ["UnknownType", "SystemFailure_Stop", "SystemFailure_Reboot", "SystemFailure_PleaseCheck", "DiskError_Redeploy", "HDDBadSector_Redeploy", "GpuError_Redeploy", "SystemMaintenance_Redeploy", "SystemFailure_Redeploy", "CreateInstance", "RunInstance", "StopInstance", "DeleteInstance", "SpotInstanceInterruption_Delete", "AccountUnbalanced_Stop", "AccountUnbalanced_Delete", "InstanceChargeType_Change", "InstanceConfiguration_Change", "FileSystemReadOnly_Change", "RebootInstance", "InstanceFailure", "ApplicationFailure"] # noqa: E501
267+
allowed_values = ["UnknownType", "SystemFailure_Stop", "SystemFailure_Reboot", "SystemFailure_PleaseCheck", "DiskError_Redeploy", "HDDBadSector_Redeploy", "GpuError_Redeploy", "SystemMaintenance_Redeploy", "SystemFailure_Redeploy", "CreateInstance", "RunInstance", "StopInstance", "DeleteInstance", "SpotInstanceInterruption_Delete", "AccountUnbalanced_Stop", "AccountUnbalanced_Delete", "InstanceChargeType_Change", "InstanceConfiguration_Change", "FileSystemReadOnly_Change", "RebootInstance", "InstanceFailure", "ApplicationFailure", "GpuRiskDetected"] # noqa: E501
268268
if (self._configuration.client_side_validation and
269269
type not in allowed_values):
270270
raise ValueError(

volcenginesdkecs/models/volume_for_run_instances_input.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, size=None, volume_type=None, _conf
5757

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

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

105105
self._size = size
106106

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

126128
self._volume_type = volume_type
127129

0 commit comments

Comments
 (0)