MCPcopy
hub / github.com/protocolbuffers/protobuf-go / FileOptions

Struct FileOptions

types/descriptorpb/descriptor.pb.go:2358–2457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2356}
2357
2358type FileOptions struct {
2359 state protoimpl.MessageState `protogen:"open.v1"`
2360 // Sets the Java package where classes generated from this .proto will be
2361 // placed. By default, the proto package is used, but this is often
2362 // inappropriate because proto packages do not normally start with backwards
2363 // domain names.
2364 JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"`
2365 // Controls the name of the wrapper Java class generated for the .proto file.
2366 // That class will always contain the .proto file's getDescriptor() method as
2367 // well as any top-level extensions defined in the .proto file.
2368 // If java_multiple_files is disabled, then all the other classes from the
2369 // .proto file will be nested inside the single wrapper outer class.
2370 JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"`
2371 // If enabled, then the Java code generator will generate a separate .java
2372 // file for each top-level message, enum, and service defined in the .proto
2373 // file. Thus, these types will *not* be nested inside the wrapper class
2374 // named by java_outer_classname. However, the wrapper class will still be
2375 // generated to contain the file's getDescriptor() method as well as any
2376 // top-level extensions defined in the file.
2377 JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
2378 // This option does nothing.
2379 //
2380 // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.
2381 JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
2382 // A proto2 file can set this to true to opt in to UTF-8 checking for Java,
2383 // which will throw an exception if invalid UTF-8 is parsed from the wire or
2384 // assigned to a string field.
2385 //
2386 // TODO: clarify exactly what kinds of field types this option
2387 // applies to, and update these docs accordingly.
2388 //
2389 // Proto3 files already perform these checks. Setting the option explicitly to
2390 // false has no effect: it cannot be used to opt proto3 files out of UTF-8
2391 // checks.
2392 JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"`
2393 OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"`
2394 // Sets the Go package where structs generated from this .proto will be
2395 // placed. If omitted, the Go package will be derived from the following:
2396 // - The basename of the package import path, if provided.
2397 // - Otherwise, the package statement in the .proto file, if present.
2398 // - Otherwise, the basename of the .proto file, without extension.
2399 GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"`
2400 // Should generic services be generated in each language? "Generic" services
2401 // are not specific to any particular RPC system. They are generated by the
2402 // main code generators in each language (without additional plugins).
2403 // Generic services were the only kind of service generation supported by
2404 // early versions of google.protobuf.
2405 //
2406 // Generic services are now considered deprecated in favor of using plugins
2407 // that generate code specific to your particular RPC system. Therefore,
2408 // these default to false. Old code which depends on generic services should
2409 // explicitly set them to true.
2410 CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"`
2411 JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"`
2412 PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"`
2413 // Is this file deprecated?
2414 // Depending on the target platform, this can emit Deprecated annotations
2415 // for everything in the file, or it will be completely ignored; in the very

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected