scalapb.options
Members list
Type members
Classlikes
Represents a custom Collection type in Scala. This allows ScalaPB to integrate with collection types that are different enough from the ones in the standard library.
Represents a custom Collection type in Scala. This allows ScalaPB to integrate with collection types that are different enough from the ones in the standard library.
Value parameters
- adapter
-
An Adapter is a Scala object available at runtime that provides certain static methods that can operate on this collection type.
- nonEmpty
-
Set to true if this collection type is not allowed to be empty, for example cats.data.NonEmptyList. When true, ScalaPB will not generate
clearX
for the repeated field and not provide a default argument in the constructor. - type
-
Type of the collection
Attributes
- Companion
- object
- Supertypes
-
trait Updatable[Collection]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Collection.type
Value parameters
- baseAnnotations
-
Custom annotations to add to the generated enum's base class.
- companionExtends
-
Additional classes and traits to mix in to the companion object.
- extends
-
Additional classes and traits to mix in to the base trait
- recognizedAnnotations
-
Custom annotations to add to the generated trait.
- type
-
All instances of this enum will be converted to this type. An implicit TypeMapper must be present.
- unrecognizedAnnotations
-
Custom annotations to add to the generated Unrecognized case class.
Attributes
- Companion
- object
- Supertypes
-
trait ExtendableMessage[EnumOptions]trait Updatable[EnumOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
EnumOptions.type
Value parameters
- annotations
-
Custom annotations to add to the generated case object for this enum value.
- extends
-
Additional classes and traits to mix in to an individual enum value.
- scalaName
-
Name in Scala to use for this enum value.
Attributes
- Companion
- object
- Supertypes
-
trait Updatable[EnumValueOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
EnumValueOptions.type
Value parameters
- annotations
-
Custom annotations to add to the field.
- collectionType
-
Can be specified only if this field is repeated. If unspecified, it falls back to the file option named
collection_type
, which defaults toscala.collection.Seq
. - keyType
-
If the field is a map, you can specify custom Scala types for the key or value.
- mapType
-
Can be specified only if this field is a map. If unspecified, it falls back to the file option named
map_type
which defaults toscala.collection.immutable.Map
- noBox
-
Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box
- noDefaultValueInConstructor
-
If true, no default value will be generated for this field in the message constructor. If this field is set, it has the highest precedence and overrides the values at the message-level and file-level.
- required
-
Like no_box it does not box a value in Option[T], but also fails parsing when a value is not provided. This enables to emulate required fields in proto3.
Attributes
- Companion
- object
- Supertypes
-
trait ExtendableMessage[FieldOptions]trait Updatable[FieldOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
FieldOptions.type
Attributes
- Companion
- object
- Supertypes
-
trait Updatable[FieldTransformation]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
FieldTransformation.type
Attributes
- Companion
- object
- Supertypes
-
trait GeneratedEnumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrortrait GeneratedEnumCompanion[MatchType]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
MatchType.type
Value parameters
- annotations
-
Custom annotations to add to the generated case class.
- companionAnnotations
-
Custom annotations to add to the companion object of the generated class.
- companionExtends
-
Additional classes and traits to mix in to the companion object.
- derives
-
Adds a derives clause to the message case class
- extends
-
Additional classes and traits to mix in to the case class.
- noBox
-
If true, when this message is used as an optional field, do not wrap it in an
Option
. This is equivalent of setting(field).no_box
to true on each field with the message type. - noDefaultValuesInConstructor
-
If true, no default values will be generated in message constructors. If set (to true or false), the message-level setting overrides the file-level value, and can be overridden by the field-level setting.
- sealedOneofCompanionExtends
-
Additional classes and traits to mix in to generated sealed oneof base trait's companion object.
- sealedOneofDerives
-
Additional classes and traits to add to the derives clause of a sealed oneof.
- sealedOneofEmptyExtends
-
Additional traits to mixin for the empty case object of sealed oneofs.
- sealedOneofExtends
-
Additional classes and traits to mix in to generated sealed_oneof base trait.
- type
-
All instances of this message will be converted to this type. An implicit TypeMapper must be present.
- unknownFieldsAnnotations
-
Custom annotations to add to the generated
unknownFields
case class field.
Attributes
- Companion
- object
- Supertypes
-
trait ExtendableMessage[MessageOptions]trait Updatable[MessageOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
MessageOptions.type
Value parameters
- extends
-
Additional traits to mix in to a oneof.
- scalaName
-
Name in Scala to use for this oneof field.
Attributes
- Companion
- object
- Supertypes
-
trait ExtendableMessage[OneofOptions]trait Updatable[OneofOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
OneofOptions.type
Attributes
- Companion
- object
- Supertypes
-
trait Updatable[PreprocessorOutput]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
PreprocessorOutput.type
Value parameters
- auxEnumOptions
-
List of message options to apply to some enums.
- auxEnumValueOptions
-
List of enum value options to apply to some enum values.
- auxFieldOptions
-
List of message options to apply to some fields.
- auxMessageOptions
-
List of message options to apply to some messages.
- bytesType
-
Scala type to use for bytes fields.
- collectionType
-
Scala type to be used for repeated fields. If unspecified,
scala.collection.Seq
will be used. - enumStripPrefix
-
Indicate if prefix (enum name + optional underscore) should be removed in scala code Strip is applied before enum value naming changes.
- flatPackage
-
If true, the compiler does not append the proto base file name into the generated package name. If false (the default), the generated scala package name is the package_name.basename where basename is the proto file name without the .proto extension.
- getters
-
If true, getters will be generated.
- ignoreAllTransformations
-
Ignores all transformations for this file. This is meant to allow specific files to opt out from transformations inherited through package-scoped options.
- import
-
Adds the following imports at the top of the file (this is meant to provide implicit TypeMappers)
- javaConversions
-
Enable java conversions for this file.
- lenses
-
If true, lenses will be generated.
- mapType
-
Scala type to be used for maps. If unspecified,
scala.collection.immutable.Map
will be used. - noDefaultValuesInConstructor
-
If true, no default values will be generated in message constructors. This setting can be overridden at the message-level and for individual fields.
- noPrimitiveWrappers
-
By default, wrappers defined at https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto, are mapped to an Option[T] where T is a primitive type. When this field is set to true, we do not perform this transformation.
- objectName
-
If defined, sets the name of the file-level object that would be generated. This object extends
GeneratedFileObject
and contains descriptors, and list of message and enum companions. - packageName
-
If set then it overrides the java_package and package.
- preamble
-
Text to add to the generated scala file. This can be used only when single_file is true.
- preprocessors
-
List of preprocessors to apply.
- preserveUnknownFields
-
If set to true, all generated messages in this file will preserve unknown fields.
- primitiveWrappers
-
DEPRECATED. In ScalaPB <= 0.5.47, it was necessary to explicitly enable primitive_wrappers. This field remains here for backwards compatibility, but it has no effect on generated code. It is an error to set both
primitive_wrappers
andno_primitive_wrappers
. - publicConstructorParameters
-
Makes constructor parameters public, including defaults and TypeMappers.
- retainSourceCodeInfo
-
If true, then source-code info information will be included in the generated code - normally the source code info is cleared out to reduce code size. The source code info is useful for extracting source code location from the descriptors as well as comments.
- scala3Sources
-
Generate sources that are compatible with Scala 3
- scope
-
Experimental: scope to apply the given options.
- singleFile
-
If true, all messages and enums (but not services) will be written to a single Scala file.
- testOnlyNoJavaConversions
-
For use in tests only. Inhibit Java conversions even when when generator parameters request for it.
Attributes
- Companion
- object
- Supertypes
-
trait ExtendableMessage[ScalaPbOptions]trait Updatable[ScalaPbOptions]trait GeneratedMessagetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
ScalaPbOptions.type
Attributes
- Supertypes
- Self type
-
ScalapbProto.type