@@ -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
0 commit comments