Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if status_code != 200:
error = AzureHttpError(body, response.status_code)
raise error
# Create Result
result = None
# Deserialize Response
if status_code == 200:
response_content = body
result = StorageAccountUpdateResponse()
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
storage_account_instance = StorageAccount(tags={})
result.storage_account = storage_account_instance
id_value = response_doc.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_instance.id = id_instance
name_value = response_doc.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_instance.name = name_instance
type_value = response_doc.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_instance.type = type_instance
if status_code != 200 and status_code != 202 and status_code != 500:
error = AzureHttpError(body, response.status_code)
raise error
# Create Result
result = None
# Deserialize Response
if status_code == 200 or status_code == 202 or status_code == 500:
response_content = body
result = StorageAccountCreateResponse()
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
storage_account_instance = StorageAccount(tags={})
result.storage_account = storage_account_instance
id_value = response_doc.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_instance.id = id_instance
name_value = response_doc.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_instance.name = name_instance
type_value = response_doc.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_instance.type = type_instance
# Create Result
result = None
# Deserialize Response
if status_code == 200:
response_content = body
result = StorageAccountListResponse(storage_accounts=[])
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
value_array = response_doc.get('value', None)
if value_array is not None:
for value_value in value_array:
storage_account_json_instance = StorageAccount(tags={})
result.storage_accounts.append(storage_account_json_instance)
id_value = value_value.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_json_instance.id = id_instance
name_value = value_value.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_json_instance.name = name_instance
type_value = value_value.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_json_instance.type = type_instance
# Create Result
result = None
# Deserialize Response
if status_code == 200:
response_content = body
result = StorageAccountListResponse(storage_accounts=[])
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
value_array = response_doc.get('value', None)
if value_array is not None:
for value_value in value_array:
storage_account_json_instance = StorageAccount(tags={})
result.storage_accounts.append(storage_account_json_instance)
id_value = value_value.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_json_instance.id = id_instance
name_value = value_value.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_json_instance.name = name_instance
type_value = value_value.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_json_instance.type = type_instance
if status_code != 200:
error = AzureHttpError(body, response.status_code)
raise error
# Create Result
result = None
# Deserialize Response
if status_code == 200:
response_content = body
result = StorageAccountGetPropertiesResponse()
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
storage_account_instance = StorageAccount(tags={})
result.storage_account = storage_account_instance
id_value = response_doc.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_instance.id = id_instance
name_value = response_doc.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_instance.name = name_instance
type_value = response_doc.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_instance.type = type_instance
def __init__(self, **kwargs):
super(StorageAccount, self).__init__(**kwargs)
self._provisioning_state = kwargs.get('provisioning_state')
self._account_type = kwargs.get('account_type')
self._primary_endpoints = kwargs.get('primary_endpoints')
self._primary_location = kwargs.get('primary_location')
self._status_of_primary = kwargs.get('status_of_primary')
self._last_geo_failover_time = kwargs.get('last_geo_failover_time')
self._secondary_endpoints = kwargs.get('secondary_endpoints')
self._secondary_location = kwargs.get('secondary_location')
self._status_of_secondary = kwargs.get('status_of_secondary')
self._creation_time = kwargs.get('creation_time')
self._custom_domain = kwargs.get('custom_domain')
if status_code != 200 and status_code != 202:
error = AzureHttpError(body, response.status_code)
raise error
# Create Result
result = None
# Deserialize Response
if status_code == 200 or status_code == 202:
response_content = body
result = StorageAccountCreateResponse()
response_doc = None
if response_content:
response_doc = json.loads(response_content.decode())
if response_doc is not None:
storage_account_instance = StorageAccount(tags={})
result.storage_account = storage_account_instance
id_value = response_doc.get('id', None)
if id_value is not None:
id_instance = id_value
storage_account_instance.id = id_instance
name_value = response_doc.get('name', None)
if name_value is not None:
name_instance = name_value
storage_account_instance.name = name_instance
type_value = response_doc.get('type', None)
if type_value is not None:
type_instance = type_value
storage_account_instance.type = type_instance