'Instantiate a BucketStorageUri from scheme,bucket,object tuple.
@type scheme: string
@param scheme: URI scheme naming the storage provider (gs, s3, etc.)
@type bucket_name: string
@param bucket_name: bucket name
@type object_name: string
@param object_name: object name, excluding generation/version.
@type debug: int
@param debug: debug level to pass in to connection (range 0..2)
@type connection_args: map
@param connection_args: optional map containing args to be
passed to {S3,GS}Connection constructor (e.g., to override
https_connection_factory).
@param suppress_consec_slashes: If provided, controls whether
consecutive slashes will be suppressed in key paths.
@param version_id: Object version id (S3-specific).
@param generation: Object generation number (GCS-specific).
@param is_latest: boolean indicating that a versioned object is the
current version
After instantiation the components are available in the following
fields: scheme, bucket_name, object_name, version_id, generation,
is_latest, versionless_uri, version_specific_uri, uri.
Note: If instantiated without version info, the string representation
for a URI stays versionless; similarly, if instantiated with version
info, the string representation for a URI stays version-specific. If you
call one of the uri.set_contents_from_xyz() methods, a specific object
version will be created, and its version-specific URI string can be
retrieved from version_specific_uri even if the URI was instantiated
without version info.'

def __init__(self, scheme, bucket_name=None, object_name=None, debug=0, connection_args=None, suppress_consec_slashes=True, version_id=None, generation=None, is_latest=False):

    self.scheme = scheme
    self.bucket_name = bucket_name
    self.object_name = object_name
    self.debug = debug
    if connection_args:
        self.connection_args = connection_args
    self.suppress_consec_slashes = suppress_consec_slashes
    self.version_id = version_id
    self.generation = (generation and int(generation))
    self.is_latest = is_latest
    self.is_version_specific = (bool(self.generation) or bool(version_id))
    self._build_uri_strings()
