Skip to content

Commit 5bfa3f0

Browse files
committed
feat: update ecs api
1 parent 71303ab commit 5bfa3f0

8 files changed

+47
-31
lines changed

volcenginesdkecs/models/create_deployment_set_request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ 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-
self.deployment_set_name = deployment_set_name
66+
if deployment_set_name is not None:
67+
self.deployment_set_name = deployment_set_name
6768
if description is not None:
6869
self.description = description
6970
if granularity is not None:
@@ -110,8 +111,6 @@ def deployment_set_name(self, deployment_set_name):
110111
:param deployment_set_name: The deployment_set_name of this CreateDeploymentSetRequest. # noqa: E501
111112
:type: str
112113
"""
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
115114

116115
self._deployment_set_name = deployment_set_name
117116

volcenginesdkecs/models/create_key_pair_request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ 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-
self.key_pair_name = key_pair_name
65+
if key_pair_name is not None:
66+
self.key_pair_name = key_pair_name
6667
if project_name is not None:
6768
self.project_name = project_name
6869

@@ -126,8 +127,6 @@ def key_pair_name(self, key_pair_name):
126127
:param key_pair_name: The key_pair_name of this CreateKeyPairRequest. # noqa: E501
127128
:type: str
128129
"""
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
131130

132131
self._key_pair_name = key_pair_name
133132

volcenginesdkecs/models/delete_deployment_set_request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ 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-
self.deployment_set_id = deployment_set_id
57+
if deployment_set_id is not None:
58+
self.deployment_set_id = deployment_set_id
5859

5960
@property
6061
def client_token(self):
@@ -95,8 +96,6 @@ def deployment_set_id(self, deployment_set_id):
9596
:param deployment_set_id: The deployment_set_id of this DeleteDeploymentSetRequest. # noqa: E501
9697
:type: str
9798
"""
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
10099

101100
self._deployment_set_id = deployment_set_id
102101

volcenginesdkecs/models/describe_images_request.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class DescribeImagesRequest(object):
3434
"""
3535
swagger_types = {
3636
'image_ids': 'list[str]',
37+
'image_name': 'str',
3738
'image_status': 'str',
3839
'instance_type_id': 'str',
3940
'is_support_cloud_init': 'bool',
@@ -48,6 +49,7 @@ class DescribeImagesRequest(object):
4849

4950
attribute_map = {
5051
'image_ids': 'ImageIds',
52+
'image_name': 'ImageName',
5153
'image_status': 'ImageStatus',
5254
'instance_type_id': 'InstanceTypeId',
5355
'is_support_cloud_init': 'IsSupportCloudInit',
@@ -60,13 +62,14 @@ class DescribeImagesRequest(object):
6062
'visibility': 'Visibility'
6163
}
6264

63-
def __init__(self, image_ids=None, image_status=None, instance_type_id=None, is_support_cloud_init=None, max_results=None, next_token=None, os_type=None, project_name=None, status=None, tag_filters=None, visibility=None, _configuration=None): # noqa: E501
65+
def __init__(self, image_ids=None, image_name=None, image_status=None, instance_type_id=None, is_support_cloud_init=None, max_results=None, next_token=None, os_type=None, project_name=None, status=None, tag_filters=None, visibility=None, _configuration=None): # noqa: E501
6466
"""DescribeImagesRequest - a model defined in Swagger""" # noqa: E501
6567
if _configuration is None:
6668
_configuration = Configuration()
6769
self._configuration = _configuration
6870

6971
self._image_ids = None
72+
self._image_name = None
7073
self._image_status = None
7174
self._instance_type_id = None
7275
self._is_support_cloud_init = None
@@ -81,6 +84,8 @@ def __init__(self, image_ids=None, image_status=None, instance_type_id=None, is_
8184

8285
if image_ids is not None:
8386
self.image_ids = image_ids
87+
if image_name is not None:
88+
self.image_name = image_name
8489
if image_status is not None:
8590
self.image_status = image_status
8691
if instance_type_id is not None:
@@ -123,6 +128,27 @@ def image_ids(self, image_ids):
123128

124129
self._image_ids = image_ids
125130

131+
@property
132+
def image_name(self):
133+
"""Gets the image_name of this DescribeImagesRequest. # noqa: E501
134+
135+
136+
:return: The image_name of this DescribeImagesRequest. # noqa: E501
137+
:rtype: str
138+
"""
139+
return self._image_name
140+
141+
@image_name.setter
142+
def image_name(self, image_name):
143+
"""Sets the image_name of this DescribeImagesRequest.
144+
145+
146+
:param image_name: The image_name of this DescribeImagesRequest. # noqa: E501
147+
:type: str
148+
"""
149+
150+
self._image_name = image_name
151+
126152
@property
127153
def image_status(self):
128154
"""Gets the image_status of this DescribeImagesRequest. # noqa: E501

volcenginesdkecs/models/import_key_pair_request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ 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-
self.key_pair_name = key_pair_name
68+
if key_pair_name is not None:
69+
self.key_pair_name = key_pair_name
6970
if project_name is not None:
7071
self.project_name = project_name
7172
if public_key is not None:
@@ -131,8 +132,6 @@ def key_pair_name(self, key_pair_name):
131132
:param key_pair_name: The key_pair_name of this ImportKeyPairRequest. # noqa: E501
132133
:type: str
133134
"""
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
136135

137136
self._key_pair_name = key_pair_name
138137

volcenginesdkecs/models/network_interface_for_run_instances_input.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ 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-
self.subnet_id = subnet_id
62+
if subnet_id is not None:
63+
self.subnet_id = subnet_id
6364

6465
@property
6566
def primary_ip_address(self):
@@ -121,8 +122,6 @@ def subnet_id(self, subnet_id):
121122
:param subnet_id: The subnet_id of this NetworkInterfaceForRunInstancesInput. # noqa: E501
122123
:type: str
123124
"""
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
126125

127126
self._subnet_id = subnet_id
128127

volcenginesdkecs/models/run_instances_request.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,14 @@ 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-
self.image_id = image_id
167+
if image_id is not None:
168+
self.image_id = image_id
168169
if instance_charge_type is not None:
169170
self.instance_charge_type = instance_charge_type
170171
if instance_name is not None:
171172
self.instance_name = instance_name
172-
self.instance_type = instance_type
173+
if instance_type is not None:
174+
self.instance_type = instance_type
173175
if instance_type_id is not None:
174176
self.instance_type_id = instance_type_id
175177
if keep_image_credential is not None:
@@ -202,7 +204,8 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
202204
self.user_data = user_data
203205
if volumes is not None:
204206
self.volumes = volumes
205-
self.zone_id = zone_id
207+
if zone_id is not None:
208+
self.zone_id = zone_id
206209

207210
@property
208211
def auto_renew(self):
@@ -455,8 +458,6 @@ def image_id(self, image_id):
455458
:param image_id: The image_id of this RunInstancesRequest. # noqa: E501
456459
:type: str
457460
"""
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
460461

461462
self._image_id = image_id
462463

@@ -520,8 +521,6 @@ def instance_type(self, instance_type):
520521
:param instance_type: The instance_type of this RunInstancesRequest. # noqa: E501
521522
:type: str
522523
"""
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
525524

526525
self._instance_type = instance_type
527526

@@ -879,8 +878,6 @@ def zone_id(self, zone_id):
879878
:param zone_id: The zone_id of this RunInstancesRequest. # noqa: E501
880879
:type: str
881880
"""
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
884881

885882
self._zone_id = zone_id
886883

volcenginesdkecs/models/volume_for_run_instances_input.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ 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-
self.size = size
61-
self.volume_type = volume_type
60+
if size is not None:
61+
self.size = size
62+
if volume_type is not None:
63+
self.volume_type = volume_type
6264

6365
@property
6466
def delete_with_instance(self):
@@ -99,8 +101,6 @@ def size(self, size):
99101
:param size: The size of this VolumeForRunInstancesInput. # noqa: E501
100102
:type: int
101103
"""
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,8 +122,6 @@ 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
127125

128126
self._volume_type = volume_type
129127

0 commit comments

Comments
 (0)