             "\n",
             "extension \(scopeSwiftFullName) {\n")
           p.indent()
-          p.print("enum Extensions {\n")
+          p.print("\(visibility)enum Extensions {\n")
           p.indent()
           addNewline = false
         }

        }

        func generateProtobufExtensionDeclarations(printer p: inout CodePrinter) {
            let scope = fieldDescriptor.extensionScope == nil ? "" : "static "
            let traitsType = fieldDescriptor.traitsType(namer: namer)
            let swiftRelativeExtensionName = namer.relativeName(extensionField: fieldDescriptor)


            p.print(
              comments,
              "\(visibility)\(scope)let \(swiftRelativeExtensionName) = SwiftProtobuf.MessageExtension<\(extensionFieldType)<\(traitsType)>, \(containingTypeSwiftFullName)>(\n")
            p.indent()
            p.print(
              "_protobuf_fieldNumber: \(fieldDescriptor.number),\n",
