def exists(self, container_name, blob_name=None, snapshot=None, timeout=None):
_validate_not_none('<STR_LIT>', container_name)<EOL>try:<EOL><INDENT>if blob_name is None:<EOL><INDENT>self.get_container_properties(container_name, timeout=timeout)<EOL><DEDENT>else:<EOL><INDENT>self.get_blob_properties(container_name, blob_name, snapshot=snapshot, timeout=timeout)<EOL><DEDENT>return True<EOL><DEDENT>except AzureHttpError as ex:<EOL><INDENT>_dont_fail_not_exist(ex)<EOL>return False<EOL><DEDENT>
Returns a boolean indicating whether the container exists (if blob_name 
is None), or otherwise a boolean indicating whether the blob exists.

:param str container_name:
    Name of a container.
:param str blob_name:
    Name of a blob. If None, the container will be checked for existence.
:param str snapshot:
    The snapshot parameter is an opaque DateTime value that,
    when present, specifies the snapshot.
:param int timeout:
    The timeout parameter is expressed in seconds.
:return: A boolean indicating whether the resource exists.
:rtype: bool