    # File lib/fog/google/models/storage/directory.rb, line 48
            def public_url
              requires :key
              if service.get_bucket_acl(key).body['AccessControlList'].detect {|entry| entry['Scope']['type'] == 'AllUsers' && entry['Permission'] == 'READ'}
                if key.to_s =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/
                  "https://#{key}.storage.googleapis.com"
                else
                  "https://storage.googleapis.com/#{key}"
                end
              else
                nil
              end
            end