andreasewering / elm-protoc-types / Proto.Google.Protobuf.FieldOptions

This file was automatically generated by

To run it, add a dependency via elm install on elm-protocol-buffers version latest or higher.


type CType
    = STRING
    | CORD
    | STRINGPIECE

CType enumeration


type JSType
    = JSNORMAL
    | JSSTRING
    | JSNUMBER

JSType enumeration


type OptionRetention
    = RETENTIONUNKNOWN
    | RETENTIONRUNTIME
    | RETENTIONSOURCE

If set to RETENTION_SOURCE, the option will be omitted from the binary. Note: as of January 2023, support for this is in progress and does not yet have an effect (b/264593489).


type OptionTargetType
    = TARGETTYPEUNKNOWN
    | TARGETTYPEFILE
    | TARGETTYPEEXTENSIONRANGE
    | TARGETTYPEMESSAGE
    | TARGETTYPEFIELD
    | TARGETTYPEONEOF
    | TARGETTYPEENUM
    | TARGETTYPEENUMENTRY
    | TARGETTYPESERVICE
    | TARGETTYPEMETHOD

This indicates the types of entities that the field may apply to when used as an option. If it is unset, then the field may be freely used as an option on any kind of entity. Note: as of January 2023, support for this is in progress and does not yet have an effect (b/264593489).

decodeCType : Protobuf.Decode.Decoder CType

Declares how to decode a CType from Bytes. To actually perform the conversion from Bytes, you need to use Protobuf.Decode.decode from eriktim/elm-protocol-buffers.

decodeJSType : Protobuf.Decode.Decoder JSType

Declares how to decode a JSType from Bytes. To actually perform the conversion from Bytes, you need to use Protobuf.Decode.decode from eriktim/elm-protocol-buffers.

decodeOptionRetention : Protobuf.Decode.Decoder OptionRetention

Declares how to decode a OptionRetention from Bytes. To actually perform the conversion from Bytes, you need to use Protobuf.Decode.decode from eriktim/elm-protocol-buffers.

decodeOptionTargetType : Protobuf.Decode.Decoder OptionTargetType

Declares how to decode a OptionTargetType from Bytes. To actually perform the conversion from Bytes, you need to use Protobuf.Decode.decode from eriktim/elm-protocol-buffers.

defaultCType : CType

Default for CType. Should only be used for 'required' decoders as an initial value.

defaultJSType : JSType

Default for JSType. Should only be used for 'required' decoders as an initial value.

defaultOptionRetention : OptionRetention

Default for OptionRetention. Should only be used for 'required' decoders as an initial value.

defaultOptionTargetType : OptionTargetType

Default for OptionTargetType. Should only be used for 'required' decoders as an initial value.

encodeCType : CType -> Protobuf.Encode.Encoder

Declares how to encode a CType to Bytes. To actually perform the conversion to Bytes, you need to use Protobuf.Encode.encode from eriktim/elm-protocol-buffers.

encodeJSType : JSType -> Protobuf.Encode.Encoder

Declares how to encode a JSType to Bytes. To actually perform the conversion to Bytes, you need to use Protobuf.Encode.encode from eriktim/elm-protocol-buffers.

encodeOptionRetention : OptionRetention -> Protobuf.Encode.Encoder

Declares how to encode a OptionRetention to Bytes. To actually perform the conversion to Bytes, you need to use Protobuf.Encode.encode from eriktim/elm-protocol-buffers.

encodeOptionTargetType : OptionTargetType -> Protobuf.Encode.Encoder

Declares how to encode a OptionTargetType to Bytes. To actually perform the conversion to Bytes, you need to use Protobuf.Encode.encode from eriktim/elm-protocol-buffers.

fieldNumbersCType : CType -> Basics.Int

The field numbers for the fields of CType. This is mostly useful for internals, like documentation generation.

fieldNumbersJSType : JSType -> Basics.Int

The field numbers for the fields of JSType. This is mostly useful for internals, like documentation generation.

fieldNumbersOptionRetention : OptionRetention -> Basics.Int

The field numbers for the fields of OptionRetention. This is mostly useful for internals, like documentation generation.

fieldNumbersOptionTargetType : OptionTargetType -> Basics.Int

The field numbers for the fields of OptionTargetType. This is mostly useful for internals, like documentation generation.

fromInternalCType : Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsCType -> CType

Convert the internal type Proto__Google__Protobuf__FieldOptions__CType into a CType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

fromInternalJSType : Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsJSType -> JSType

Convert the internal type Proto__Google__Protobuf__FieldOptions__JSType into a JSType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

fromInternalOptionRetention : Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsOptionRetention -> OptionRetention

Convert the internal type Proto__Google__Protobuf__FieldOptions__OptionRetention into a OptionRetention.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

fromInternalOptionTargetType : Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsOptionTargetType -> OptionTargetType

Convert the internal type Proto__Google__Protobuf__FieldOptions__OptionTargetType into a OptionTargetType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

jsonEncodeCType : CType -> Json.Encode.Value

Encode a CType to JSON. Uses the canonical encoding described here: https://protobuf.dev/programming-guides/proto3/#json

jsonEncodeJSType : JSType -> Json.Encode.Value

Encode a JSType to JSON. Uses the canonical encoding described here: https://protobuf.dev/programming-guides/proto3/#json

jsonEncodeOptionRetention : OptionRetention -> Json.Encode.Value

Encode a OptionRetention to JSON. Uses the canonical encoding described here: https://protobuf.dev/programming-guides/proto3/#json

jsonEncodeOptionTargetType : OptionTargetType -> Json.Encode.Value

Encode a OptionTargetType to JSON. Uses the canonical encoding described here: https://protobuf.dev/programming-guides/proto3/#json

toInternalCType : CType -> Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsCType

Convert a CType into its internal representation Proto__Google__Protobuf__FieldOptions__CType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

toInternalJSType : JSType -> Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsJSType

Convert a JSType into its internal representation Proto__Google__Protobuf__FieldOptions__JSType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

toInternalOptionRetention : OptionRetention -> Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsOptionRetention

Convert a OptionRetention into its internal representation Proto__Google__Protobuf__FieldOptions__OptionRetention.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

toInternalOptionTargetType : OptionTargetType -> Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFieldOptionsOptionTargetType

Convert a OptionTargetType into its internal representation Proto__Google__Protobuf__FieldOptions__OptionTargetType.

Using two different types is necessary to avoid recursive module references while having readable constructor names.