         
         // MARK: - Internal Properties
         
-        internal var storage: Storage
+        // internal class is never mutated
+        internal let storage: Storage
         
         // MARK: - Initialization
         

}

// MARK: - Internal

internal extension MongoDB.URI {
    
    mutating func ensureUnique() {
        if !isUniquelyReferencedNonObjC(&storage) {
            storage = storage.copy
        }
    }
}

internal extension MongoDB.URI {
    

        
        // MARK: - Properties
        
        public lazy var rawValue: String = {
            
            let charBuffer = mongoc_uri_get_string(self.storage.internalPointer)
            
            return String.fromCString(charBuffer)!
        }()
        
        /// Fetches the ```authMechanism``` parameter to an URI if provided.
        public lazy var authenticationMechanism: String? = {
            
            // C string should not be freed
            return String.fromCString(mongoc_uri_get_auth_mechanism(self.storage.internalPointer))
        }()
        
        /// Fetches the ```authSource``` parameter of an URI if provided.
        public lazy var authenticationSource: String? = {
            
            // C string should not be freed
            return String.fromCString(mongoc_uri_get_auth_source(self.storage.internalPointer))
        }()
        
        /// Fetches the database portion of an URI if provided. This is the portion after the / but before the ?. 
        public lazy var database: String? = {
            
            // C string should not be freed
            return String.fromCString(mongoc_uri_get_database(self.storage.internalPointer))
        }()
        
        /// Fetches an array of hosts that were defined in the URI (the comma-separated host section).
        public lazy var hosts: [Host] = {
            
            let hostListPointer = mongoc_uri_get_hosts(self.storage.internalPointer)
            
            return Host.fromHostList(hostListPointer.memory)
        }()
        
        // MARK: - Static Methods
        
